Changeset 561 for trunk/tools/qdoc3/htmlgenerator.h
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/tools/qdoc3/htmlgenerator.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the tools applications of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 46 46 #ifndef HTMLGENERATOR_H 47 47 #define HTMLGENERATOR_H 48 49 #define QDOC_NAME_ALIGNMENT 48 50 49 51 #include <qmap.h> … … 66 68 #endif 67 69 70 typedef QMultiMap<QString, Node*> NodeMultiMap; 71 typedef QMap<QString, NodeMultiMap> NewSinceMaps; 72 typedef QMap<Node*, NodeMultiMap> ParentMaps; 73 typedef QMap<QString, const Node*> NodeMap; 74 typedef QMap<QString, NodeMap> NewClassMaps; 75 68 76 class HelpProjectWriter; 69 77 70 78 class HtmlGenerator : public PageGenerator 71 79 { 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 72 98 public: 73 99 HtmlGenerator(); … … 81 107 static QString protect(const QString& string); 82 108 static QString cleanRef(const QString& ref); 109 static QString sinceTitle(int i) { return sinceTitles[i]; } 83 110 84 111 protected: … … 130 157 void generateClassHierarchy(const Node *relative, 131 158 CodeMarker *marker, 132 const QMap<QString,const Node *>&classMap);159 const NodeMap &classMap); 133 160 void generateAnnotatedList(const Node *relative, 134 161 CodeMarker *marker, 135 const QMap<QString, const Node *>&nodeMap);162 const NodeMap &nodeMap); 136 163 void generateCompactList(const Node *relative, 137 164 CodeMarker *marker, 138 const QMap<QString, const Node *> &classMap); 165 const NodeMap &classMap, 166 QString commonPrefix = QString()); 139 167 void generateFunctionIndex(const Node *relative, CodeMarker *marker); 140 168 void generateLegaleseList(const Node *relative, CodeMarker *marker); 141 169 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 142 209 void generateSynopsis(const Node *node, 143 210 const Node *relative, 144 211 CodeMarker *marker, 145 212 CodeMarker::SynopsisStyle style); 146 void generateSectionList(const Section& section,147 const Node *relative,148 CodeMarker *marker,149 CodeMarker::SynopsisStyle style);150 213 void generateSectionInheritedList(const Section& section, 151 214 const Node *relative, 152 215 CodeMarker *marker); 216 QString highlightedCode(const QString& markedCode, 217 CodeMarker *marker, 218 const Node *relative); 219 #endif 153 220 void generateFullName(const Node *apparentNode, 154 221 const Node *relative, 155 222 CodeMarker *marker, 156 223 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); 159 230 void generateStatus(const Node *node, CodeMarker *marker); 160 231 161 232 QString registerRef(const QString& ref); 162 QString highlightedCode(const QString& markedCode, CodeMarker *marker, const Node *relative);163 233 QString fileBase(const Node *node); 164 234 #if 0 … … 173 243 void findAllQmlClasses(const InnerNode *node); 174 244 #endif 245 void findAllSince(const InnerNode *node); 175 246 static int hOffset(const Node *node); 176 247 static bool isThreeColumnEnumValueTable(const Atom *atom); … … 178 249 const Node *relative, 179 250 CodeMarker *marker, 180 const Node *node = 0);251 const Node** node); 181 252 virtual void generateDcf(const QString &fileBase, 182 253 const QString &startPage, … … 206 277 HelpProjectWriter *helpProjectWriter; 207 278 bool inLink; 279 bool inObsoleteLink; 208 280 bool inContents; 209 281 bool inSectionHeading; … … 225 297 QStringList stylesheets; 226 298 QStringList customHeadElements; 227 const Tree * tre;299 const Tree *myTree; 228 300 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; 236 310 #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; 240 314 QMap<Text, const Node *> legaleseTexts; 315 NewSinceMaps newSinceMaps; 316 static QString sinceTitles[]; 317 NewClassMaps newClassMaps; 241 318 }; 242 319 … … 252 329 253 330 #endif 331
Note:
See TracChangeset
for help on using the changeset viewer.