102 virtual void initializeGenerator(const Config& config); |
104 virtual void initializeGenerator(const Config& config); |
103 virtual void terminateGenerator(); |
105 virtual void terminateGenerator(); |
104 virtual QString format(); |
106 virtual QString format(); |
105 virtual void generateTree(const Tree *tree, CodeMarker *marker); |
107 virtual void generateTree(const Tree *tree, CodeMarker *marker); |
106 |
108 |
107 static QString protect(const QString& string); |
109 QString protectEnc(const QString &string); |
|
110 static QString protect(const QString &string, const QString &encoding = "ISO-8859-1"); |
108 static QString cleanRef(const QString& ref); |
111 static QString cleanRef(const QString& ref); |
109 static QString sinceTitle(int i) { return sinceTitles[i]; } |
112 static QString sinceTitle(int i) { return sinceTitles[i]; } |
110 |
113 |
111 protected: |
114 protected: |
112 virtual void startText(const Node *relative, CodeMarker *marker); |
115 virtual void startText(const Node *relative, CodeMarker *marker); |
113 virtual int generateAtom(const Atom *atom, |
116 virtual int generateAtom(const Atom *atom, |
114 const Node *relative, |
117 const Node *relative, |
115 CodeMarker *marker); |
118 CodeMarker *marker); |
116 virtual void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker); |
119 virtual void generateClassLikeNode(const InnerNode *inner, CodeMarker *marker); |
117 virtual void generateFakeNode(const FakeNode *fake, CodeMarker *marker); |
120 virtual void generateFakeNode(const FakeNode *fake, CodeMarker *marker); |
118 virtual QString fileExtension(const Node *node); |
121 virtual QString fileExtension(const Node *node) const; |
119 virtual QString refForNode(const Node *node); |
122 virtual QString refForNode(const Node *node); |
120 virtual QString linkForNode(const Node *node, const Node *relative); |
123 virtual QString linkForNode(const Node *node, const Node *relative); |
121 virtual QString refForAtom(Atom *atom, const Node *node); |
124 virtual QString refForAtom(Atom *atom, const Node *node); |
122 |
125 |
123 private: |
126 private: |
126 const QPair<QString,QString> anchorForNode(const Node *node); |
129 const QPair<QString,QString> anchorForNode(const Node *node); |
127 const Node *findNodeForTarget(const QString &target, |
130 const Node *findNodeForTarget(const QString &target, |
128 const Node *relative, |
131 const Node *relative, |
129 CodeMarker *marker, |
132 CodeMarker *marker, |
130 const Atom *atom = 0); |
133 const Atom *atom = 0); |
131 void generateHeader(const QString& title, const Node *node = 0, |
134 void generateBreadCrumbs(const QString& title, |
132 CodeMarker *marker = 0, bool mainPage = true); |
135 const Node *node, |
|
136 CodeMarker *marker); |
|
137 void generateHeader(const QString& title, |
|
138 const Node *node = 0, |
|
139 CodeMarker *marker = 0); |
133 void generateTitle(const QString& title, |
140 void generateTitle(const QString& title, |
134 const Text &subTitle, |
141 const Text &subTitle, |
135 SubTitleSize subTitleSize, |
142 SubTitleSize subTitleSize, |
136 const Node *relative, |
143 const Node *relative, |
137 CodeMarker *marker); |
144 CodeMarker *marker); |
148 void generateTableOfContents(const Node *node, |
155 void generateTableOfContents(const Node *node, |
149 CodeMarker *marker, |
156 CodeMarker *marker, |
150 Doc::SectioningUnit sectioningUnit, |
157 Doc::SectioningUnit sectioningUnit, |
151 int numColumns, |
158 int numColumns, |
152 const Node *relative = 0); |
159 const Node *relative = 0); |
|
160 void generateTableOfContents(const Node *node, |
|
161 CodeMarker *marker, |
|
162 QList<Section>* sections = 0); |
153 QString generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker); |
163 QString generateListOfAllMemberFile(const InnerNode *inner, CodeMarker *marker); |
154 QString generateLowStatusMemberFile(const InnerNode *inner, |
164 QString generateLowStatusMemberFile(const InnerNode *inner, |
155 CodeMarker *marker, |
165 CodeMarker *marker, |
156 CodeMarker::Status status); |
166 CodeMarker::Status status); |
157 void generateClassHierarchy(const Node *relative, |
167 void generateClassHierarchy(const Node *relative, |
161 CodeMarker *marker, |
171 CodeMarker *marker, |
162 const NodeMap &nodeMap); |
172 const NodeMap &nodeMap); |
163 void generateCompactList(const Node *relative, |
173 void generateCompactList(const Node *relative, |
164 CodeMarker *marker, |
174 CodeMarker *marker, |
165 const NodeMap &classMap, |
175 const NodeMap &classMap, |
|
176 bool includeAlphabet, |
166 QString commonPrefix = QString()); |
177 QString commonPrefix = QString()); |
167 void generateFunctionIndex(const Node *relative, CodeMarker *marker); |
178 void generateFunctionIndex(const Node *relative, CodeMarker *marker); |
168 void generateLegaleseList(const Node *relative, CodeMarker *marker); |
179 void generateLegaleseList(const Node *relative, CodeMarker *marker); |
169 void generateOverviewList(const Node *relative, CodeMarker *marker); |
180 void generateOverviewList(const Node *relative, CodeMarker *marker); |
170 void generateSectionList(const Section& section, |
181 void generateSectionList(const Section& section, |
181 bool summary); |
192 bool summary); |
182 void generateDetailedQmlMember(const Node *node, |
193 void generateDetailedQmlMember(const Node *node, |
183 const InnerNode *relative, |
194 const InnerNode *relative, |
184 CodeMarker *marker); |
195 CodeMarker *marker); |
185 void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker); |
196 void generateQmlInherits(const QmlClassNode* cn, CodeMarker* marker); |
|
197 void generateQmlInheritedBy(const QmlClassNode* cn, CodeMarker* marker); |
186 void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker); |
198 void generateQmlInstantiates(const QmlClassNode* qcn, CodeMarker* marker); |
187 void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker); |
199 void generateInstantiatedBy(const ClassNode* cn, CodeMarker* marker); |
188 #endif |
200 #endif |
189 #ifdef QDOC_NAME_ALIGNMENT |
201 #ifdef QDOC_NAME_ALIGNMENT |
190 void generateSection(const NodeList& nl, |
202 void generateSection(const NodeList& nl, |
253 const QString &startPage, |
265 const QString &startPage, |
254 const QString &title, DcfSection &dcfRoot); |
266 const QString &title, DcfSection &dcfRoot); |
255 virtual void generateIndex(const QString &fileBase, |
267 virtual void generateIndex(const QString &fileBase, |
256 const QString &url, |
268 const QString &url, |
257 const QString &title); |
269 const QString &title); |
|
270 #ifdef GENERATE_MAC_REFS |
258 void generateMacRef(const Node *node, CodeMarker *marker); |
271 void generateMacRef(const Node *node, CodeMarker *marker); |
|
272 #endif |
259 void beginLink(const QString &link, |
273 void beginLink(const QString &link, |
260 const Node *node, |
274 const Node *node, |
261 const Node *relative, |
275 const Node *relative, |
262 CodeMarker *marker); |
276 CodeMarker *marker); |
263 void endLink(); |
277 void endLink(); |
|
278 bool generatePageElement(QXmlStreamWriter& writer, |
|
279 const Node* node, |
|
280 CodeMarker* marker) const; |
|
281 void generatePageElements(QXmlStreamWriter& writer, |
|
282 const Node* node, |
|
283 CodeMarker* marker) const; |
|
284 void generatePageIndex(const QString& fileName, |
|
285 CodeMarker* marker) const; |
264 |
286 |
265 #if 0 |
287 #if 0 |
266 NavigationBar currentNavigationBar; |
288 NavigationBar currentNavigationBar; |
267 #endif |
289 #endif |
268 QMap<QString, QString> refMap; |
290 QMap<QString, QString> refMap; |
280 bool inContents; |
302 bool inContents; |
281 bool inSectionHeading; |
303 bool inSectionHeading; |
282 bool inTableHeader; |
304 bool inTableHeader; |
283 int numTableRows; |
305 int numTableRows; |
284 bool threeColumnEnumValueTable; |
306 bool threeColumnEnumValueTable; |
|
307 bool offlineDocs; |
285 QString link; |
308 QString link; |
286 QStringList sectionNumber; |
309 QStringList sectionNumber; |
287 QRegExp funcLeftParen; |
310 QRegExp funcLeftParen; |
288 QString style; |
311 QString style; |
289 QString postHeader; |
312 QString postHeader; |
|
313 QString postPostHeader; |
290 QString footer; |
314 QString footer; |
291 QString address; |
315 QString address; |
292 bool pleaseGenerateMacRef; |
316 bool pleaseGenerateMacRef; |
293 QString project; |
317 QString project; |
294 QString projectDescription; |
318 QString projectDescription; |
313 QMap<QString, NodeMap > funcIndex; |
337 QMap<QString, NodeMap > funcIndex; |
314 QMap<Text, const Node *> legaleseTexts; |
338 QMap<Text, const Node *> legaleseTexts; |
315 NewSinceMaps newSinceMaps; |
339 NewSinceMaps newSinceMaps; |
316 static QString sinceTitles[]; |
340 static QString sinceTitles[]; |
317 NewClassMaps newClassMaps; |
341 NewClassMaps newClassMaps; |
|
342 NewClassMaps newQmlClassMaps; |
|
343 static int id; |
318 }; |
344 }; |
319 |
345 |
320 #define HTMLGENERATOR_ADDRESS "address" |
346 #define HTMLGENERATOR_ADDRESS "address" |
321 #define HTMLGENERATOR_FOOTER "footer" |
347 #define HTMLGENERATOR_FOOTER "footer" |
322 #define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me |
348 #define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me |
323 #define HTMLGENERATOR_POSTHEADER "postheader" |
349 #define HTMLGENERATOR_POSTHEADER "postheader" |
|
350 #define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" |
324 #define HTMLGENERATOR_STYLE "style" |
351 #define HTMLGENERATOR_STYLE "style" |
325 #define HTMLGENERATOR_STYLESHEETS "stylesheets" |
352 #define HTMLGENERATOR_STYLESHEETS "stylesheets" |
326 #define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements" |
353 #define HTMLGENERATOR_CUSTOMHEADELEMENTS "customheadelements" |
327 |
354 |
328 QT_END_NAMESPACE |
355 QT_END_NAMESPACE |