Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/qdoc3/htmlgenerator.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the tools applications of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4646#ifndef HTMLGENERATOR_H
    4747#define HTMLGENERATOR_H
     48
     49#define QDOC_NAME_ALIGNMENT
    4850
    4951#include <qmap.h>
     
    6668#endif
    6769
     70typedef QMultiMap<QString, Node*> NodeMultiMap;
     71typedef QMap<QString, NodeMultiMap> NewSinceMaps;
     72typedef QMap<Node*, NodeMultiMap> ParentMaps;
     73typedef QMap<QString, const Node*> NodeMap;
     74typedef QMap<QString, NodeMap> NewClassMaps;
     75
    6876class HelpProjectWriter;
    6977
    7078class HtmlGenerator : public PageGenerator
    7179{
     80 public:
     81    enum SinceType {
     82        Namespace,
     83        Class,
     84        MemberFunction,
     85        NamespaceFunction,
     86        GlobalFunction,
     87        Macro,
     88        Enum,
     89        Typedef,
     90        Property,
     91        Variable,
     92        QmlProperty,
     93        QmlSignal,
     94        QmlMethod,
     95        LastSinceType
     96    };
     97
    7298 public:
    7399    HtmlGenerator();
     
    81107    static QString protect(const QString& string);
    82108    static QString cleanRef(const QString& ref);
     109    static QString sinceTitle(int i) { return sinceTitles[i]; }
    83110
    84111 protected:
     
    130157    void generateClassHierarchy(const Node *relative,
    131158                                CodeMarker *marker,
    132                                 const QMap<QString,const Node *> &classMap);
     159                                const NodeMap &classMap);
    133160    void generateAnnotatedList(const Node *relative,
    134161                               CodeMarker *marker,
    135                                const QMap<QString, const Node *> &nodeMap);
     162                               const NodeMap &nodeMap);
    136163    void generateCompactList(const Node *relative,
    137164                             CodeMarker *marker,
    138                              const QMap<QString, const Node *> &classMap);
     165                             const NodeMap &classMap,
     166                             QString commonPrefix = QString());
    139167    void generateFunctionIndex(const Node *relative, CodeMarker *marker);
    140168    void generateLegaleseList(const Node *relative, CodeMarker *marker);
    141169    void generateOverviewList(const Node *relative, CodeMarker *marker);
     170    void generateSectionList(const Section& section,
     171                             const Node *relative,
     172                             CodeMarker *marker,
     173                             CodeMarker::SynopsisStyle style);
     174#ifdef QDOC_QML
     175    void generateQmlSummary(const Section& section,
     176                            const Node *relative,
     177                            CodeMarker *marker);
     178    void generateQmlItem(const Node *node,
     179                         const Node *relative,
     180                         CodeMarker *marker,
     181                         bool summary);
     182    void generateDetailedQmlMember(const Node *node,
     183                                   const InnerNode *relative,
     184                                   CodeMarker *marker);
     185    void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker);
     186    void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker);
     187    void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker);
     188#endif
     189#ifdef QDOC_NAME_ALIGNMENT
     190    void generateSection(const NodeList& nl,
     191                         const Node *relative,
     192                         CodeMarker *marker,
     193                         CodeMarker::SynopsisStyle style);
     194    void generateSynopsis(const Node *node,
     195                          const Node *relative,
     196                          CodeMarker *marker,
     197                          CodeMarker::SynopsisStyle style,
     198                          bool nameAlignment = false);
     199    void generateSectionInheritedList(const Section& section,
     200                                      const Node *relative,
     201                                      CodeMarker *marker,
     202                                      bool nameAlignment = false);
     203    QString highlightedCode(const QString& markedCode,
     204                            CodeMarker *marker,
     205                            const Node *relative,
     206                            CodeMarker::SynopsisStyle style = CodeMarker::Accessors,
     207                            bool nameAlignment = false);
     208#else
    142209    void generateSynopsis(const Node *node,
    143210                          const Node *relative,
    144211                          CodeMarker *marker,
    145212                          CodeMarker::SynopsisStyle style);
    146     void generateSectionList(const Section& section,
    147                              const Node *relative,
    148                              CodeMarker *marker,
    149                              CodeMarker::SynopsisStyle style);
    150213    void generateSectionInheritedList(const Section& section,
    151214                                      const Node *relative,
    152215                                      CodeMarker *marker);
     216    QString highlightedCode(const QString& markedCode,
     217                            CodeMarker *marker,
     218                            const Node *relative);
     219#endif
    153220    void generateFullName(const Node *apparentNode,
    154221                          const Node *relative,
    155222                          CodeMarker *marker,
    156223                          const Node *actualNode = 0);
    157     void generateDetailedMember(const Node *node, const InnerNode *relative, CodeMarker *marker);
    158     void generateLink(const Atom *atom, const Node *relative, CodeMarker *marker);
     224    void generateDetailedMember(const Node *node,
     225                                const InnerNode *relative,
     226                                CodeMarker *marker);
     227    void generateLink(const Atom *atom,
     228                      const Node *relative,
     229                      CodeMarker *marker);
    159230    void generateStatus(const Node *node, CodeMarker *marker);
    160231   
    161232    QString registerRef(const QString& ref);
    162     QString highlightedCode(const QString& markedCode, CodeMarker *marker, const Node *relative);
    163233    QString fileBase(const Node *node);
    164234#if 0
     
    173243    void findAllQmlClasses(const InnerNode *node);
    174244#endif
     245    void findAllSince(const InnerNode *node);
    175246    static int hOffset(const Node *node);
    176247    static bool isThreeColumnEnumValueTable(const Atom *atom);
     
    178249                            const Node *relative,
    179250                            CodeMarker *marker,
    180                             const Node *node = 0);
     251                            const Node** node);
    181252    virtual void generateDcf(const QString &fileBase,
    182253                             const QString &startPage,
     
    206277    HelpProjectWriter *helpProjectWriter;
    207278    bool inLink;
     279    bool inObsoleteLink;
    208280    bool inContents;
    209281    bool inSectionHeading;
     
    225297    QStringList stylesheets;
    226298    QStringList customHeadElements;
    227     const Tree *tre;
     299    const Tree *myTree;
    228300    bool slow;
    229     QMap<QString, QMap<QString, const Node *> > moduleClassMap;
    230     QMap<QString, QMap<QString, const Node *> > moduleNamespaceMap;
    231     QMap<QString, const Node *> nonCompatClasses;
    232     QMap<QString, const Node *> mainClasses;
    233     QMap<QString, const Node *> compatClasses;
    234     QMap<QString, const Node *> namespaceIndex;
    235     QMap<QString, const Node *> serviceClasses;
     301    bool obsoleteLinks;
     302    QMap<QString, NodeMap > moduleClassMap;
     303    QMap<QString, NodeMap > moduleNamespaceMap;
     304    NodeMap nonCompatClasses;
     305    NodeMap mainClasses;
     306    NodeMap compatClasses;
     307    NodeMap obsoleteClasses;
     308    NodeMap namespaceIndex;
     309    NodeMap serviceClasses;
    236310#ifdef QDOC_QML   
    237     QMap<QString, const Node *> qmlClasses;
    238 #endif
    239     QMap<QString, QMap<QString, const Node *> > funcIndex;
     311    NodeMap qmlClasses;
     312#endif
     313    QMap<QString, NodeMap > funcIndex;
    240314    QMap<Text, const Node *> legaleseTexts;
     315    NewSinceMaps newSinceMaps;
     316    static QString sinceTitles[];
     317    NewClassMaps newClassMaps;
    241318};
    242319
     
    252329
    253330#endif
     331
Note: See TracChangeset for help on using the changeset viewer.