Doc: modularize Qt Designer custom plugin docs
authorLeena Miettinen <riitta-leena.miettinen@digia.com>
Mon, 10 Dec 2012 09:44:00 +0000 (10:44 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 11 Dec 2012 06:50:39 +0000 (07:50 +0100)
Create index and module pages for Qt Designer custom
plugin classes. Modify the qdocconf file to also build
the Qt Designer plugin class docs. Move snippets from
qtdoc to qttools. Fix links to the classes page in example docs.

Change-Id: Ie191fdb07fb0b00379a15d44c1355f00815053e6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
29 files changed:
examples/designer/doc/src/containerextension.qdoc
examples/designer/doc/src/taskmenuextension.qdoc
src/designer/src/designer/doc/qtdesigner.qdocconf
src/designer/src/designer/doc/snippets/plugins/doc_src_qtdesigner.cpp [new file with mode: 0644]
src/designer/src/designer/doc/snippets/plugins/doc_src_qtdesigner.pro [new file with mode: 0644]
src/designer/src/designer/doc/src/designer-manual.qdoc
src/designer/src/designer/doc/src/qtdesigner-index.qdoc [new file with mode: 0644]
src/designer/src/designer/doc/src/qtdesigner-module.qdoc [new file with mode: 0644]
src/designer/src/lib/extension/default_extensionfactory.cpp
src/designer/src/lib/extension/extension.cpp
src/designer/src/lib/extension/qextensionmanager.cpp
src/designer/src/lib/sdk/abstractformeditor.cpp
src/designer/src/lib/sdk/abstractformwindow.cpp
src/designer/src/lib/sdk/abstractformwindowcursor.cpp
src/designer/src/lib/sdk/abstractformwindowmanager.cpp
src/designer/src/lib/sdk/abstractobjectinspector.cpp
src/designer/src/lib/sdk/abstractpromotioninterface.cpp
src/designer/src/lib/sdk/abstractpropertyeditor.cpp
src/designer/src/lib/sdk/abstractwidgetbox.cpp
src/designer/src/lib/sdk/membersheet.qdoc
src/designer/src/lib/sdk/propertysheet.qdoc
src/designer/src/lib/sdk/taskmenu.qdoc
src/designer/src/lib/shared/layout.cpp
src/designer/src/lib/shared/qdesigner_formwindowmanager.cpp
src/designer/src/lib/shared/qdesigner_qsettings.cpp
src/designer/src/lib/uilib/abstractformbuilder.cpp
src/designer/src/lib/uilib/container.qdoc
src/designer/src/lib/uilib/customwidget.qdoc
src/designer/src/lib/uilib/formbuilder.cpp

index c97b028..07231a6 100644 (file)
@@ -64,7 +64,7 @@
 
     You can use all the extensions following the same pattern as in
     this example, only replacing the respective extension base
-    class. For more information, see the \l {QtDesigner Module}.
+    class. For more information, see \l{Qt Designer C++ Classes}.
 
     The Container Extension example consists of four classes:
 
index e6dcae3..7712486 100644 (file)
@@ -64,7 +64,7 @@
 
     You can use all the extensions following the same pattern as in
     this example, only replacing the respective extension base
-    class. For more information, see the \l {QtDesigner Module}.
+    class. For more information, see the \l{Qt Designer C++ Classes}.
 
     The Task Menu Extension example consists of five classes:
 
index 329853c..d477390 100644 (file)
@@ -22,17 +22,28 @@ qhp.QtDesigner.subprojects.examples.title = Examples
 qhp.QtDesigner.subprojects.examples.indexTitle = Qt Examples
 qhp.QtDesigner.subprojects.examples.selectors = fake:example
 qhp.QtDesigner.subprojects.examples.sortPages = true
+qhp.QtDesigner.subprojects         = classes
+qhp.QtDesigner.subprojects.classes.title = C++ Classes
+qhp.QtDesigner.subprojects.classes.indexTitle = Qt Designer C++ Classes
+qhp.QtDesigner.subprojects.classes.selectors = class fake:headerfile
+qhp.QtDesigner.subprojects.classes.sortPages = true
 
 language                = Cpp
 
-sourcedirs              = ..
+headerdirs             += .. \
+                          ../../lib
+
+sourcedirs              = .. \
+                          ../../lib
 
 exampledirs             = ../../../../../examples/designer \
                           ../../../../../examples/uitools \
                           snippets
 
+excludefiles           += ../../lib/uilib/extension.h
+
 imagedirs               = images
 
 outputdir               = $QT_INSTALL_DOCS/qtdesigner
 
-depends                 += qtdoc qtbase qtwidgets qtcore
+depends                 += qtdoc qtwidgets qtcore
diff --git a/src/designer/src/designer/doc/snippets/plugins/doc_src_qtdesigner.cpp b/src/designer/src/designer/doc/snippets/plugins/doc_src_qtdesigner.cpp
new file mode 100644 (file)
index 0000000..b2c1a47
--- /dev/null
@@ -0,0 +1,328 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+**     of its contributors may be used to endorse or promote products derived
+**     from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtDesigner>
+//! [0]
+
+
+//! [2]
+QDesignerMemberSheetExtension *memberSheet  = 0;
+QExtensionManager manager = formEditor->extensionManager();
+
+memberSheet = qt_extension<QDesignerMemberSheetExtension*>(manager, widget);
+int index = memberSheet->indexOf(setEchoMode);
+memberSheet->setVisible(index, false);
+
+delete memberSheet;
+//! [2]
+
+
+//! [3]
+class MyMemberSheetExtension : public QObject,
+        public QDesignerMemberSheetExtension
+{
+    Q_OBJECT
+    Q_INTERFACES(QDesignerMemberSheetExtension)
+
+public:
+    ...
+}
+//! [3]
+
+
+//! [4]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    if (iid != Q_TYPEID(QDesignerMemberSheetExtension))
+        return 0;
+
+    if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+           (object))
+        return new MyMemberSheetExtension(widget, parent);
+
+    return 0;
+}
+//! [4]
+
+
+//! [5]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+    if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+        return new MyTaskMenuExtension(widget, parent);
+
+    } else if (widget && (iid == Q_TYPEID(QDesignerMemberSheetExtension))) {
+        return new MyMemberSheetExtension(widget, parent);
+
+    } else {
+        return 0;
+    }
+}
+//! [5]
+
+
+//! [6]
+class MyContainerExtension : public QObject,
+       public QDesignerContainerExtension
+{
+    Q_OBJECT
+    Q_INTERFACES(QDesignerContainerExtension)
+
+public:
+    MyContainerExtension(MyCustomWidget *widget,
+                         QObject *parent = 0);
+    int count() const;
+    QWidget *widget(int index) const;
+    int currentIndex() const;
+    void setCurrentIndex(int index);
+    void addWidget(QWidget *widget);
+    void insertWidget(int index, QWidget *widget);
+    void remove(int index);
+
+private:
+    MyCustomWidget *myWidget;
+};
+//! [6]
+
+
+//! [7]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    if (iid != Q_TYPEID(QDesignerContainerExtension))
+        return 0;
+
+    if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+           (object))
+        return new MyContainerExtension(widget, parent);
+
+    return 0;
+}
+//! [7]
+
+
+//! [8]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+    if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+        return new MyTaskMenuExtension(widget, parent);
+
+    } else if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+        return new MyContainerExtension(widget, parent);
+
+    } else {
+        return 0;
+    }
+}
+//! [8]
+
+
+//! [9]
+class MyTaskMenuExtension : public QObject,
+        public QDesignerTaskMenuExtension
+{
+    Q_OBJECT
+    Q_INTERFACES(QDesignerTaskMenuExtension)
+
+public:
+    MyTaskMenuExtension(MyCustomWidget *widget, QObject *parent);
+
+    QAction *preferredEditAction() const;
+    QList<QAction *> taskActions() const;
+
+private slots:
+    void mySlot();
+
+private:
+    MyCustomWidget *widget;
+    QAction *myAction;
+};
+//! [9]
+
+
+//! [10]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    if (iid != Q_TYPEID(QDesignerTaskMenuExtension))
+        return 0;
+
+    if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object))
+        return new MyTaskMenuExtension(widget, parent);
+
+    return 0;
+}
+//! [10]
+
+
+//! [11]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+    if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) {
+        return new MyContainerExtension(widget, parent);
+
+    } else if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+        return new MyTaskMenuExtension(widget, parent);
+
+    } else {
+        return 0;
+    }
+}
+//! [11]
+
+
+//! [12]
+#include customwidgetoneinterface.h
+#include customwidgettwointerface.h
+#include customwidgetthreeinterface.h
+
+#include <QtDesigner/QtDesigner>
+#include <QtCore/qplugin.h>
+
+class MyCustomWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
+{
+    Q_OBJECT
+    Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
+
+public:
+    MyCustomWidgets(QObject *parent = 0);
+
+    virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
+
+private:
+    QList<QDesignerCustomWidgetInterface*> widgets;
+};
+//! [12]
+
+
+//! [13]
+MyCustomWidgets::MyCustomWidgets(QObject *parent)
+        : QObject(parent)
+{
+    widgets.append(new CustomWidgetOneInterface(this));
+    widgets.append(new CustomWidgetTwoInterface(this));
+    widgets.append(new CustomWidgetThreeInterface(this));
+}
+
+QList<QDesignerCustomWidgetInterface*> MyCustomWidgets::customWidgets() const
+{
+    return widgets;
+}
+
+Q_EXPORT_PLUGIN2(customwidgetsplugin, MyCustomWidgets)
+//! [13]
+
+
+//! [14]
+Q_EXPORT_PLUGIN2(customwidgetplugin, MyCustomWidget)
+//! [14]
+
+
+//! [15]
+QDesignerPropertySheetExtension *propertySheet  = 0;
+QExtensionManager manager = formEditor->extensionManager();
+
+propertySheet = qt_extension<QDesignerPropertySheetExtension*>(manager, widget);
+int index = propertySheet->indexOf(QLatin1String("margin"));
+
+propertySheet->setProperty(index, 10);
+propertySheet->setChanged(index, true);
+
+delete propertySheet;
+//! [15]
+
+
+//! [16]
+class MyPropertySheetExtension : public QObject,
+        public QDesignerPropertySheetExtension
+{
+    Q_OBJECT
+    Q_INTERFACES(QDesignerPropertySheetExtension)
+
+public:
+    ...
+}
+//! [16]
+
+
+//! [17]
+QObject *ANewExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    if (iid != Q_TYPEID(QDesignerPropertySheetExtension))
+        return 0;
+
+    if (MyCustomWidget *widget = qobject_cast<MyCustomWidget*>
+           (object))
+        return new MyPropertySheetExtension(widget, parent);
+
+    return 0;
+}
+//! [17]
+
+
+//! [18]
+QObject *AGeneralExtensionFactory::createExtension(QObject *object,
+        const QString &iid, QObject *parent) const
+{
+    MyCustomWidget *widget = qobject_cast<MyCustomWidget*>(object);
+
+    if (widget && (iid == Q_TYPEID(QDesignerTaskMenuExtension))) {
+        return new MyTaskMenuExtension(widget, parent);
+
+    } else if (widget && (iid == Q_TYPEID(QDesignerPropertySheetExtension))) {
+        return new MyPropertySheetExtension(widget, parent);
+
+    } else {
+        return 0;
+    }
+}
+//! [18]
diff --git a/src/designer/src/designer/doc/snippets/plugins/doc_src_qtdesigner.pro b/src/designer/src/designer/doc/snippets/plugins/doc_src_qtdesigner.pro
new file mode 100644 (file)
index 0000000..719782d
--- /dev/null
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+**   * Redistributions of source code must retain the above copyright
+**     notice, this list of conditions and the following disclaimer.
+**   * Redistributions in binary form must reproduce the above copyright
+**     notice, this list of conditions and the following disclaimer in
+**     the documentation and/or other materials provided with the
+**     distribution.
+**   * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
+**     of its contributors may be used to endorse or promote products derived
+**     from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+CONFIG += designer
+#! [1]
index 834339e..a93c906 100644 (file)
@@ -26,7 +26,7 @@
 ****************************************************************************/
 
 /*!
-    \page qtdesigner-index.html
+    \page qtdesigner-manual.html
 
     \title Qt Designer Manual
     \ingroup qttools
diff --git a/src/designer/src/designer/doc/src/qtdesigner-index.qdoc b/src/designer/src/designer/doc/src/qtdesigner-index.qdoc
new file mode 100644 (file)
index 0000000..2f709f7
--- /dev/null
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.  Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+    \page qtdesigner-index.html
+    \title Qt Designer
+
+    \brief Provides classes to create your own custom widget plugins for
+    Qt Designer and classes to access Qt Designer components.
+
+    In addition, the QFormBuilder class provides the possibility of
+    constructing user interfaces from UI files at run-time.
+
+    \section1 Getting Started
+
+    To use Qt Designer classes,add this directive into the C++ files:
+
+    \snippet plugins/doc_src_qtdesigner.cpp 0
+
+    To link against the Qt Designer module, add this line to the project file:
+
+    \snippet plugins/doc_src_qtdesigner.pro 1
+
+    \section1 Articles and Guides
+
+    These articles contain information about Qt Designer.
+
+    \list
+    \li \l{Creating and Using Components for Qt Designer} - Creating and using
+        custom widget plugins
+    \li \l{Qt Designer Manual} - Using Qt Designer
+    \endlist
+
+    \section1 API Reference
+
+    These are links to the API reference material.
+
+    \list
+    \li \l{Qt Designer C++ Classes}{C++ Classes}
+    \endlist
+
+*/
diff --git a/src/designer/src/designer/doc/src/qtdesigner-module.qdoc b/src/designer/src/designer/doc/src/qtdesigner-module.qdoc
new file mode 100644 (file)
index 0000000..d667eec
--- /dev/null
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** 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.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.  Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: http://www.gnu.org/copyleft/fdl.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+    \module QtDesigner
+    \title Qt Designer C++ Classes
+    \ingroup modules
+
+    \brief Provides classes to create your own custom widget plugins for
+    Qt Designer and classes to access Qt Designer components.
+
+    In addition, the QFormBuilder class provides the possibility of
+    constructing user interfaces from UI files at run-time.
+
+    To include the definitions of the module classes, use the following
+    directive:
+
+    \snippet plugins/doc_src_qtdesigner.cpp 0
+
+    To link against the module, add this line to your \c qmake .pro file:
+
+    \snippet plugins/doc_src_qtdesigner.pro 1
+*/
index 39f71dd..ada383e 100644 (file)
@@ -80,16 +80,16 @@ QT_BEGIN_NAMESPACE
     You can either create a new QExtensionFactory and reimplement the
     QExtensionFactory::createExtension() function. For example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp 0
+    \snippet lib/tools_designer_src_lib_extension_default_extensionfactory.cpp 0
 
     Or you can use an existing factory, expanding the
     QExtensionFactory::createExtension() function to make the factory
     able to create your extension as well. For example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_extension_default_extensionfactory.cpp 1
+    \snippet lib/tools_designer_src_lib_extension_default_extensionfactory.cpp 1
 
     For a complete example using the QExtensionFactory class, see the
-    \l {designer/taskmenuextension}{Task Menu Extension example}. The
+    \l {taskmenuextension}{Task Menu Extension example}. The
     example shows how to create a custom widget plugin for Qt
     Designer, and how to to use the QDesignerTaskMenuExtension class
     to add custom items to Qt Designer's task menu.
index dd53eeb..39d02d7 100644 (file)
@@ -147,7 +147,7 @@ QT_BEGIN_NAMESPACE
    object is of type T (or of a subclass); otherwise returns 0. The
    extension is retrieved using the given extension \a manager.
 
-   \snippet doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp 0
+   \snippet lib/tools_designer_src_lib_extension_extension.cpp 0
 
    When implementing a custom widget plugin, a pointer to \QD's
    current QDesignerFormEditorInterface object (\c formEditor) is
@@ -169,7 +169,7 @@ QT_BEGIN_NAMESPACE
    extension class called \a ExtensionName. The \a Identifier must be
    unique. For example:
 
-   \snippet doc/src/snippets/code/tools_designer_src_lib_extension_extension.cpp 1
+   \snippet lib/tools_designer_src_lib_extension_extension.cpp 1
 
    Using the company and product names is a good way to ensure
    uniqueness of the identifier.
index eefbd80..bda2e22 100644 (file)
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
     The registration of an extension factory is typically made in the
     QDesignerCustomWidgetInterface::initialize() function:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_extension_qextensionmanager.cpp 0
+    \snippet lib/tools_designer_src_lib_extension_qextensionmanager.cpp 0
 
     The QExtensionManager is not intended to be instantiated
     directly. You can retrieve an interface to \QD's extension manager
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
     sheet, a property sheet or a task menu.
 
     For a complete example using the QExtensionManager class, see the
-    \l {designer/taskmenuextension}{Task Menu Extension example}. The
+    \l {taskmenuextension}{Task Menu Extension example}. The
     example shows how to create a custom widget plugin for Qt
     Designer, and how to to use the QDesignerTaskMenuExtension class
     to add custom items to \QD's task menu.
index 1ab0e6a..59fee9e 100644 (file)
@@ -149,7 +149,7 @@ QDesignerFormEditorInterfacePrivate::~QDesignerFormEditorInterfacePrivate()
     these components. They are typically used to query (and
     manipulate) the respective component. For example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformeditor.cpp 0
+    \snippet lib/tools_designer_src_lib_sdk_abstractformeditor.cpp 0
 
     QDesignerFormEditorInterface is not intended to be instantiated
     directly. A pointer to \QD's current QDesignerFormEditorInterface
index 50be10d..572c613 100644 (file)
@@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE
     widget, you can use the static
     QDesignerFormWindowInterface::findFormWindow() function:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp 0
+    \snippet lib/tools_designer_src_lib_sdk_abstractformwindow.cpp 0
 
     But in addition, you can access any of the current form windows
     through \QD's form window manager: Use the
@@ -86,7 +86,7 @@ QT_BEGIN_NAMESPACE
     through the QDesignerFormWindowManagerInterface::formWindow()
     function. For example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp 1
+    \snippet lib/tools_designer_src_lib_sdk_abstractformwindow.cpp 1
 
     The pointer to \QD's current QDesignerFormEditorInterface object
     (\c formEditor in the example above) is provided by the
@@ -102,7 +102,7 @@ QT_BEGIN_NAMESPACE
     with functions that enables you to control whether a widget should
     be managed by \QD, or not:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindow.cpp 2
+    \snippet lib/tools_designer_src_lib_sdk_abstractformwindow.cpp 2
 
     The complete list of functions concerning widget management is:
     isManaged(), manageWidget() and unmanageWidget(). There is also
index d834974..6655655 100644 (file)
@@ -68,7 +68,7 @@ QT_BEGIN_NAMESPACE
     QDesignerFormWindowInterface::findFormWindow() functions. For
     example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp 0
+    \snippet lib/tools_designer_src_lib_sdk_abstractformwindowcursor.cpp 0
 
     You can retrieve any of \QD's current form windows through
     \QD's \l {QDesignerFormWindowManagerInterface}{form window
index 7ff95e3..832d8ef 100644 (file)
@@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE
     the QDesignerFormEditorInterface::formWindowManager()
     function. For example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp 0
+    \snippet lib/tools_designer_src_lib_sdk_abstractformwindowmanager.cpp 0
 
     When implementing a custom widget plugin, a pointer to \QD's
     current QDesignerFormEditorInterface object (\c formEditor in the
@@ -409,7 +409,7 @@ QAction *QDesignerFormWindowManagerInterface::actionSimplifyLayout() const
 */
 
 /*!
-   \n virtual void QDesignerFormWindowManagerInterface::removeFormWindow(QDesignerFormWindowInterface *formWindow)
+   \fn virtual void QDesignerFormWindowManagerInterface::removeFormWindow(QDesignerFormWindowInterface *formWindow)
    Removes the given \a formWindow from the collection of windows that
    \QD's form window manager maintains.
 
@@ -488,7 +488,7 @@ QAction *QDesignerFormWindowManagerInterface::actionRedo() const
     \fn void QDesignerFormWindowManagerInterface::formWindowSettingsChanged(QDesignerFormWindowInterface *formWindow)
 
     This signal is emitted when the settings of the form window change. It can be used to update
-    window titles, etc. accordingly.
+    window titles, etc. accordingly. A pointer to the \a formWindow is passed as an argument.
 
     \sa FormWindowSettingsDialogAction
 */
index 98042ca..6abeb8c 100644 (file)
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
     current form window selection. For example, when implementing a
     custom widget plugin:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractobjectinspector.cpp 0
+    \snippet lib/tools_designer_src_lib_sdk_abstractobjectinspector.cpp 0
 
     The QDesignerObjectInspectorInterface class is not intended to be
     instantiated directly. You can retrieve an interface to \QD's
index 0942665..3f9d437 100644 (file)
@@ -59,16 +59,20 @@ QDesignerPromotionInterface::~QDesignerPromotionInterface()
 
 /*!
     \class QDesignerPromotionInterface::PromotedClass
+    \inmodule QtDesigner
     A pair of database items containing the base class and the promoted class.
+*/
 
+/*!
     \typedef QDesignerPromotionInterface::PromotedClasses
     A list of PromotedClass items.
+*/
 
-    virtual QDesignerPromotionInterface::PromotedClasses promotedClasses()  const
+/*!
+    \fn virtual QDesignerPromotionInterface::PromotedClasses promotedClasses()  const
 
     Returns a list of promoted classes along with their base classes in alphabetical order.
     It can be used to populate tree models for editing promoted widgets.
-
 */
 
 /*!
index b973116..10cba4d 100644 (file)
@@ -63,13 +63,13 @@ QT_BEGIN_NAMESPACE
     For example, when implementing a custom widget plugin, you can
     connect the signal to a custom slot:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp 0
+    \snippet lib/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp 0
 
     Then the custom slot can check if the new value is within the
     range we want when a specified property, belonging to a particular
     widget, changes:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp 1
+    \snippet lib/tools_designer_src_lib_sdk_abstractpropertyeditor.cpp 1
 
     The QDesignerPropertyEditorInterface class is not intended to be
     instantiated directly. You can retrieve an interface to \QD's
index 9268b52..f608918 100644 (file)
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
     without calling the save() function, the original content can be
     restored by a simple invocation of the load() function:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 0
+    \snippet lib/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 0
 
     The QDesignerWidgetBoxInterface class is not intended to be
     instantiated directly. You can retrieve an interface to Qt
@@ -84,16 +84,16 @@ QT_BEGIN_NAMESPACE
     with the setFileName() function to save your changes into another
     file. Remember to store the name of the original file first:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 1
+    \snippet lib/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 1
 
     Then you can restore the original contents of the widget box by
     resetting the file name to the original file and calling load():
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 2
+    \snippet lib/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 2
 
     In a similar way, you can later use your customized XML file:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 3
+    \snippet lib/tools_designer_src_lib_sdk_abstractwidgetbox.cpp 3
 
 
     \sa QDesignerFormEditorInterface
index 9d19534..7be8754 100644 (file)
@@ -40,7 +40,7 @@
     manipulate the member functions' appearance in \QD's signals and
     slots editing mode. For example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 2
+    \snippet plugins/doc_src_qtdesigner.cpp 2
 
     When implementing a custom widget plugin, a pointer to \QD's
     current QDesignerFormEditorInterface object (\c formEditor in the
@@ -69,7 +69,7 @@
     made known to the meta object system using the Q_INTERFACES()
     macro:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 3
+    \snippet plugins/doc_src_qtdesigner.cpp 3
 
     This enables \QD to use qobject_cast() to query for
     supported interfaces using nothing but a QObject pointer.
     QExtensionFactory and reimplement the
     QExtensionFactory::createExtension() function. For example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 4
+    \snippet plugins/doc_src_qtdesigner.cpp 4
 
     Or you can use an existing factory, expanding the
     QExtensionFactory::createExtension() function to make the factory
     able to create a member sheet extension as well. For example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 5
+    \snippet plugins/doc_src_qtdesigner.cpp 5
 
     For a complete example using an extension class, see \l
-    {designer/taskmenuextension}{Task Menu Extension example}. The
+    {taskmenuextension}{Task Menu Extension example}. The
     example shows how to create a custom widget plugin for Qt
     Designer, and how to to use the QDesignerTaskMenuExtension class
     to add custom items to \QD's task menu.
index 0c14a3a..035ea83 100644 (file)
@@ -41,7 +41,7 @@
     manipulate the properties' appearance in the property editor. For
     example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 15
+    \snippet plugins/doc_src_qtdesigner.cpp 15
 
     Note that if you change the value of a property using the
     QDesignerPropertySheetExtension::setProperty() function, the undo
@@ -86,7 +86,7 @@
     an interface, we must ensure that it's made known to the meta
     object system using the Q_INTERFACES() macro:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 16
+    \snippet plugins/doc_src_qtdesigner.cpp 16
 
     This enables \QD to use qobject_cast() to query for supported
     interfaces using nothing but a QObject pointer.
     reimplement the QExtensionFactory::createExtension() function. For
     example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 17
+    \snippet plugins/doc_src_qtdesigner.cpp 17
 
     Or you can use an existing factory, expanding the
     QExtensionFactory::createExtension() function to make the factory
     able to create a property sheet extension extension as well. For
     example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 18
+    \snippet plugins/doc_src_qtdesigner.cpp 18
 
     For a complete example using an extension class, see the \l
-    {designer/taskmenuextension}{Task Menu Extension example}. The
+    {taskmenuextension}{Task Menu Extension example}. The
     example shows how to create a custom widget plugin for Qt
     Designer, and how to to use the QDesignerTaskMenuExtension class
     to add custom items to \QD's task menu.
index 9dcf99b..e97421c 100644 (file)
@@ -51,7 +51,7 @@
     inherit from both QObject and QDesignerTaskMenuExtension. For
     example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 9
+    \snippet plugins/doc_src_qtdesigner.cpp 9
 
     Since we are implementing an interface, we must ensure that it
     is made known to the meta-object system using the Q_INTERFACES()
     reimplement the QExtensionFactory::createExtension() function. For
     example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 10
+    \snippet plugins/doc_src_qtdesigner.cpp 10
 
     Or you can use an existing factory, expanding the
     QExtensionFactory::createExtension() function to make the factory
     able to create a task menu extension as well. For example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 11
+    \snippet plugins/doc_src_qtdesigner.cpp 11
 
     For a complete example using the QDesignerTaskMenuExtension class,
-    see the \l {designer/taskmenuextension}{Task Menu Extension
+    see the \l {taskmenuextension}{Task Menu Extension
     example}. The example shows how to create a custom widget plugin
     for \QD, and how to to use the QDesignerTaskMenuExtension
     class to add custom items to \QD's task menu.
index 9995f12..266190e 100644 (file)
@@ -100,7 +100,7 @@ void updateWizardLayout(QWidget *layoutBase)
 }
 
 /*!
-  \class Layout layout.h
+  \class qdesigner_internal::Layout
   \brief Baseclass for layouting widgets in the Designer (Helper for Layout commands)
   \internal
 
index 629a36f..80b8a32 100644 (file)
@@ -50,6 +50,7 @@ using namespace qdesigner_internal;
 
 /*!
     \class QDesignerFormWindowManager
+    \inmodule QtDesigner
 
     Extends QDesignerFormWindowManagerInterface with methods to control
     the preview and printing of forms. It provides a facade that simplifies
@@ -85,8 +86,7 @@ void QDesignerFormWindowManager::showPluginDialog()
 }
 
 /*!
-    \fn
-    void QDesignerFormWindowManager::formWindowSettingsChanged(QDesignerFormWindowInterface *fw);
+    \fn void QDesignerFormWindowManager::formWindowSettingsChanged(QDesignerFormWindowInterface *fw);
 
     This signal is emitted when the form settings dialog was shown
     and changes have been made to the form.
index 8f8bf21..1da82ef 100644 (file)
 #include <QtCore/QString>
 #include <QtCore/QDebug>
 
-/*!
-  \class QDesignerSettingsSimple
-
-  \brief Implements QDesignerSettingsInterface by calls to QSettings
-  */
-
 QDesignerQSettings::QDesignerQSettings() :
     m_settings(qApp->organizationName(), settingsApplicationName())
 {
index 2ed0d2c..097952e 100644 (file)
@@ -127,7 +127,7 @@ public:
     QFormBuilder class to create user interfaces from UI files at
     run-time. For example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_uilib_abstractformbuilder.cpp 0
+    \snippet lib/tools_designer_src_lib_uilib_abstractformbuilder.cpp 0
 
     To override certain aspects of the form builder's behavior,
     subclass QAbstractFormBuilder and reimplement the relevant virtual
index 95ef518..852b164 100644 (file)
@@ -44,7 +44,7 @@
     To create a container extension, your extension class must inherit
     from both QObject and QDesignerContainerExtension. For example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 6
+    \snippet plugins/doc_src_qtdesigner.cpp 6
 
     Since we are implementing an interface, we must ensure that it's
     made known to the meta object system using the Q_INTERFACES()
     reimplement the QExtensionFactory::createExtension() function. For
     example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 7
+    \snippet plugins/doc_src_qtdesigner.cpp 7
 
     Or you can use an existing factory, expanding the
     QExtensionFactory::createExtension() function to make the factory
     able to create a container extension as well. For example:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 8
+    \snippet plugins/doc_src_qtdesigner.cpp 8
 
     For a complete example using the QDesignerContainerExtension
-    class, see the \l {designer/containerextension}{Container
+    class, see the \l {containerextension}{Container
     Extension example}. The example shows how to create a custom
     multi-page plugin for \QD.
 
index ebf5a2e..97ca87c 100644 (file)
@@ -46,7 +46,7 @@
     \l{Custom Widget Plugin Example}{Custom Widget Plugin example} that
     enables an analog clock custom widget to be used by \QD:
 
-    \snippet examples/designer/customwidgetplugin/customwidgetplugin.h 0
+    \snippet customwidgetplugin/customwidgetplugin.h 0
 
     Note that the only part of the class definition that is specific
     to this particular custom widget is the class name. In addition,
@@ -72,7 +72,7 @@
     class called \c MyCustomWidget, we can export it by adding the
     following line to the file containing the plugin header:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 14
+    \snippet plugins/doc_src_qtdesigner.cpp 14
 
     This macro ensures that \QD can access and construct the custom widget.
     Without this macro, there is no way for \QD to use it.
     \endlist
 
     For a complete example using the QDesignerCustomWidgetInterface
-    class, see the \l {designer/customwidgetplugin}{Custom Widget
+    class, see the \l {customwidgetplugin}{Custom Widget
     Example}. The example shows how to create a custom widget plugin
     for \QD.
 
     Using this macro ensures that the symbols are retained on those platforms,
     and has no side effects on other platforms.
 
-    For example, the \l{designer/worldtimeclockplugin}{World Time Clock Plugin}
+    For example, the \l{worldtimeclockplugin}{World Time Clock Plugin}
     example exports a custom widget class with the following declaration:
 
-    \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 0
+    \snippet worldtimeclockplugin/worldtimeclock.h 0
     \dots
-    \snippet examples/designer/worldtimeclockplugin/worldtimeclock.h 2
+    \snippet worldtimeclockplugin/worldtimeclock.h 2
 
     \sa {Creating Custom Widgets for Qt Designer}
 */
     several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and
     \c CustomWidgetThree, the class definition may look like this:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 12
+    \snippet plugins/doc_src_qtdesigner.cpp 12
 
     In the class constructor you add the interfaces to your custom
     widgets to the list which you return in the customWidgets()
     function:
 
-    \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 13
+    \snippet plugins/doc_src_qtdesigner.cpp 13
 
     Note that instead of exporting each custom widget plugin using the
     Q_PLUGIN_METADATA() macro, you export the entire collection. The
index 2d7bb7f..b285eaf 100644 (file)
@@ -64,13 +64,13 @@ namespace QFormInternal {
     creating user interfaces at run-time, based on UI files
     created with \QD. For example:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp 0
+    \snippet lib/tools_designer_src_lib_uilib_formbuilder.cpp 0
 
     By including the user interface in the example's resources (\c
     myForm.qrc), we ensure that it will be present when the example is
     run:
 
-    \snippet doc/src/snippets/code/tools_designer_src_lib_uilib_formbuilder.cpp 1
+    \snippet lib/tools_designer_src_lib_uilib_formbuilder.cpp 1
 
     QFormBuilder extends the QAbstractFormBuilder base class with a
     number of functions that are used to support custom widget