diff options
Diffstat (limited to 'src/tools/qdoc/generator.h')
-rw-r--r-- | src/tools/qdoc/generator.h | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/src/tools/qdoc/generator.h b/src/tools/qdoc/generator.h index 110a8d9e73..3165e8d449 100644 --- a/src/tools/qdoc/generator.h +++ b/src/tools/qdoc/generator.h @@ -1,7 +1,7 @@ /**************************************************************************** ** -** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal +** Copyright (C) 2015 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ ** ** This file is part of the tools applications of the Qt Toolkit. ** @@ -10,9 +10,9 @@ ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see http://www.qt.io/terms-conditions. For further +** information use the contact form at http://www.qt.io/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser @@ -23,8 +23,8 @@ ** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception +** As a special exception, The Qt Company gives you certain additional +** rights. These rights are described in The Qt Company LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** $QT_END_LICENSE$ @@ -61,7 +61,7 @@ class Generator Q_DECLARE_TR_FUNCTIONS(QDoc::Generator) public: - enum Passes { Both, Prepare, Generate }; + enum QDocPass { Neither, Prepare, Generate }; enum ListType { Generic, Obsolete }; Generator(); @@ -91,32 +91,39 @@ public: static bool debugging() { return debugging_; } static bool noLinkErrors() { return noLinkErrors_; } static bool autolinkErrors() { return autolinkErrors_; } - static void setQDocPass(Passes pass) { qdocPass_ = pass; } - static bool runPrepareOnly() { return (qdocPass_ == Prepare); } - static bool runGenerateOnly() { return (qdocPass_ == Generate); } - static QString defaultModuleName() { return project; } + static void setQDocPass(QDocPass t) { qdocPass_ = t; } + static bool preparing() { return (qdocPass_ == Prepare); } + static bool generating() { return (qdocPass_ == Generate); } + static bool singleExec() { return qdocSingleExec_; } + static bool writeQaPages() { return qdocWriteQaPages_; } + static void setSingleExec() { qdocSingleExec_ = true; } + static void setWriteQaPages() { qdocWriteQaPages_ = true; } + static QString defaultModuleName() { return project_; } static void resetUseOutputSubdirs() { useOutputSubdirs_ = false; } static bool useOutputSubdirs() { return useOutputSubdirs_; } + static void setQmlTypeContext(QmlTypeNode* t) { qmlTypeContext_ = t; } + static QmlTypeNode* qmlTypeContext() { return qmlTypeContext_; } protected: virtual void beginSubPage(const InnerNode* node, const QString& fileName); virtual void endSubPage(); virtual QString fileBase(const Node* node) const; virtual QString fileExtension() const = 0; + virtual void generateQAPage() { } virtual void generateAlsoList(const Node *node, CodeMarker *marker); virtual int generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker); virtual void generateBody(const Node *node, CodeMarker *marker); virtual void generateClassLikeNode(InnerNode* inner, CodeMarker* marker); - virtual void generateQmlTypePage(QmlClassNode* , CodeMarker* ) { } + virtual void generateQmlTypePage(QmlTypeNode* , CodeMarker* ) { } virtual void generateQmlBasicTypePage(QmlBasicTypeNode* , CodeMarker* ) { } - virtual void generateDocNode(DocNode* dn, CodeMarker* marker); + virtual void generateDocumentNode(DocumentNode* dn, CodeMarker* marker); virtual void generateCollectionNode(CollectionNode* cn, CodeMarker* marker); virtual void generateInheritedBy(const ClassNode *classe, CodeMarker *marker); virtual void generateInherits(const ClassNode *classe, CodeMarker *marker); virtual void generateInnerNode(InnerNode* node); virtual void generateMaintainerList(const InnerNode* node, CodeMarker* marker); - virtual void generateQmlInheritedBy(const QmlClassNode* qcn, CodeMarker* marker); - virtual void generateQmlInherits(QmlClassNode* qcn, CodeMarker* marker); + virtual void generateQmlInheritedBy(const QmlTypeNode* qcn, CodeMarker* marker); + virtual void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker); virtual bool generateQmlText(const Text& text, const Node *relative, CodeMarker *marker, @@ -142,8 +149,8 @@ protected: CodeMarker *marker, bool generate, int& numGeneratedAtoms); - void generateExampleFiles(const DocNode *dn, CodeMarker *marker); - void generateFileList(const DocNode* dn, + void generateExampleFiles(const DocumentNode *dn, CodeMarker *marker); + void generateFileList(const DocumentNode* dn, CodeMarker* marker, Node::SubType subtype, const QString& tag); @@ -198,7 +205,7 @@ private: static QStringList imageDirs; static QStringList imageFiles; static QMap<QString, QStringList> imgFileExts; - static QString project; + static QString project_; static QString outDir_; static QString outSubdir_; static QStringList outFileNames_; @@ -212,8 +219,11 @@ private: static bool noLinkErrors_; static bool autolinkErrors_; static bool redirectDocumentationToDevNull_; - static Passes qdocPass_; + static QDocPass qdocPass_; + static bool qdocSingleExec_; + static bool qdocWriteQaPages_; static bool useOutputSubdirs_; + static QmlTypeNode* qmlTypeContext_; void generateReimplementedFrom(const FunctionNode *func, CodeMarker *marker); @@ -232,6 +242,7 @@ private: bool inTableHeader_; bool threeColumnEnumValueTable_; bool showInternal_; + bool singleExec_; int numTableRows_; QString link_; QString sectionNumber_; |