0
|
1 |
/****************************************************************************
|
|
2 |
**
|
|
3 |
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
4 |
** All rights reserved.
|
|
5 |
** Contact: Nokia Corporation (qt-info@nokia.com)
|
|
6 |
**
|
|
7 |
** This file is part of the Qt Designer of the Qt Toolkit.
|
|
8 |
**
|
|
9 |
** $QT_BEGIN_LICENSE:LGPL$
|
|
10 |
** No Commercial Usage
|
|
11 |
** This file contains pre-release code and may not be distributed.
|
|
12 |
** You may use this file in accordance with the terms and conditions
|
|
13 |
** contained in the Technology Preview License Agreement accompanying
|
|
14 |
** this package.
|
|
15 |
**
|
|
16 |
** GNU Lesser General Public License Usage
|
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
18 |
** General Public License version 2.1 as published by the Free Software
|
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
20 |
** packaging of this file. Please review the following information to
|
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
23 |
**
|
|
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 |
**
|
|
28 |
** If you have questions regarding the use of this file, please contact
|
|
29 |
** Nokia at qt-info@nokia.com.
|
|
30 |
**
|
|
31 |
**
|
|
32 |
**
|
|
33 |
**
|
|
34 |
**
|
|
35 |
**
|
|
36 |
**
|
|
37 |
**
|
|
38 |
** $QT_END_LICENSE$
|
|
39 |
**
|
|
40 |
****************************************************************************/
|
|
41 |
|
|
42 |
#ifndef FORMBUILDER_H
|
|
43 |
#define FORMBUILDER_H
|
|
44 |
|
|
45 |
#include <QtDesigner/uilib_global.h>
|
|
46 |
#include <QtDesigner/QAbstractFormBuilder>
|
|
47 |
|
|
48 |
#include <QtCore/QStringList>
|
|
49 |
#include <QtCore/QMap>
|
|
50 |
|
|
51 |
QT_BEGIN_HEADER
|
|
52 |
|
|
53 |
QT_BEGIN_NAMESPACE
|
|
54 |
#if 0
|
|
55 |
// pragma for syncqt, don't remove.
|
|
56 |
|
|
57 |
#pragma qt_class(QFormBuilder)
|
|
58 |
#endif
|
|
59 |
|
|
60 |
class QDesignerCustomWidgetInterface;
|
|
61 |
|
|
62 |
#ifdef QFORMINTERNAL_NAMESPACE
|
|
63 |
namespace QFormInternal
|
|
64 |
{
|
|
65 |
#endif
|
|
66 |
|
|
67 |
class QDESIGNER_UILIB_EXPORT QFormBuilder: public QAbstractFormBuilder
|
|
68 |
{
|
|
69 |
public:
|
|
70 |
QFormBuilder();
|
|
71 |
virtual ~QFormBuilder();
|
|
72 |
|
|
73 |
QStringList pluginPaths() const;
|
|
74 |
|
|
75 |
void clearPluginPaths();
|
|
76 |
void addPluginPath(const QString &pluginPath);
|
|
77 |
void setPluginPath(const QStringList &pluginPaths);
|
|
78 |
|
|
79 |
QList<QDesignerCustomWidgetInterface*> customWidgets() const;
|
|
80 |
|
|
81 |
protected:
|
|
82 |
virtual QWidget *create(DomUI *ui, QWidget *parentWidget);
|
|
83 |
virtual QWidget *create(DomWidget *ui_widget, QWidget *parentWidget);
|
|
84 |
virtual QLayout *create(DomLayout *ui_layout, QLayout *layout, QWidget *parentWidget);
|
|
85 |
virtual QLayoutItem *create(DomLayoutItem *ui_layoutItem, QLayout *layout, QWidget *parentWidget);
|
|
86 |
virtual QAction *create(DomAction *ui_action, QObject *parent);
|
|
87 |
virtual QActionGroup *create(DomActionGroup *ui_action_group, QObject *parent);
|
|
88 |
|
|
89 |
virtual QWidget *createWidget(const QString &widgetName, QWidget *parentWidget, const QString &name);
|
|
90 |
virtual QLayout *createLayout(const QString &layoutName, QObject *parent, const QString &name);
|
|
91 |
|
|
92 |
virtual void createConnections(DomConnections *connections, QWidget *widget);
|
|
93 |
|
|
94 |
virtual bool addItem(DomLayoutItem *ui_item, QLayoutItem *item, QLayout *layout);
|
|
95 |
virtual bool addItem(DomWidget *ui_widget, QWidget *widget, QWidget *parentWidget);
|
|
96 |
|
|
97 |
virtual void updateCustomWidgets();
|
|
98 |
virtual void applyProperties(QObject *o, const QList<DomProperty*> &properties);
|
|
99 |
|
|
100 |
static QWidget *widgetByName(QWidget *topLevel, const QString &name);
|
|
101 |
|
|
102 |
private:
|
|
103 |
QStringList m_pluginPaths;
|
|
104 |
QMap<QString, QDesignerCustomWidgetInterface*> m_customWidgets;
|
|
105 |
};
|
|
106 |
|
|
107 |
#ifdef QFORMINTERNAL_NAMESPACE
|
|
108 |
}
|
|
109 |
#endif
|
|
110 |
|
|
111 |
QT_END_NAMESPACE
|
|
112 |
|
|
113 |
QT_END_HEADER
|
|
114 |
|
|
115 |
#endif // FORMBUILDER_H
|