Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
widgetdatabase_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant reason:default
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16
17#ifndef WIDGETDATABASE_H
18#define WIDGETDATABASE_H
19
21
22#include <QtDesigner/abstractwidgetdatabase.h>
23
24#include <QtGui/qicon.h>
25#include <QtCore/qstring.h>
26#include <QtCore/qvariant.h>
27#include <QtCore/qstringlist.h>
28
29#include <utility>
30
31QT_BEGIN_NAMESPACE
32
33class QObject;
35
36namespace qdesigner_internal {
37
39{
40public:
41 explicit WidgetDataBaseItem(const QString &name = QString(),
42 const QString &group = QString());
43
44 QString name() const override;
45 void setName(const QString &name) override;
46
47 QString group() const override;
48 void setGroup(const QString &group) override;
49
50 QString toolTip() const override;
52
55
58
59
60 QIcon icon() const override;
61 void setIcon(const QIcon &icon) override;
62
63 bool isCompat() const override;
64 void setCompat(bool compat) override;
65
66 bool isContainer() const override;
67 void setContainer(bool b) override;
68
69 bool isCustom() const override;
70 void setCustom(bool b) override;
71
74
75 bool isPromoted() const override;
76 void setPromoted(bool b) override;
77
78 QString extends() const override;
79 void setExtends(const QString &s) override;
80
83
85
86 QString baseClassName() const; // FIXME Qt 7: Move to QDesignerWidgetDataBaseItemInterface
87 void setBaseClassName(const QString &b);
88
89 QStringList fakeSlots() const;
90 void setFakeSlots(const QStringList &);
91
93 void setFakeSignals(const QStringList &);
94
95 QString addPageMethod() const;
96 void setAddPageMethod(const QString &m);
97
98private:
109 uint m_compat: 1;
110 uint m_container: 1;
111 uint m_custom: 1;
112 uint m_promoted: 1;
116};
117
119
121
124
126{
128public:
131
133
134 int indexOfObject(QObject *o, bool resolveName = true) const override;
135
136 void remove(int index);
137
138
141
142 // Helpers for 'New Form' wizards in integrations. Obtain a list of suitable classes and generate XML for them.
146
147 // Helpers for 'New Form' wizards: Set a fixed size on a XML form template
148 static QString scaleFormTemplate(const QString &xml, const QSize &size, bool fixed);
149
150public slots:
151 void loadPlugins();
152
153private:
155
157};
158
159QDESIGNER_SHARED_EXPORT QDesignerWidgetDataBaseItemInterface
161 const QString &className,
162 const QString &group,
163 const QString &baseClassName,
164 const QString &includeFile,
165 bool promoted,
166 bool custom);
167
169
170QDESIGNER_SHARED_EXPORT WidgetDataBaseItemList
172 const QString &baseClassName);
173} // namespace qdesigner_internal
174
175QT_END_NAMESPACE
176
177#endif // WIDGETDATABASE_H
FormEditorOptionsPage(QDesignerFormEditorInterface *core)
QWidget * createPage(QWidget *parent) override
FormEditor(const QStringList &pluginPaths, QObject *parent=nullptr)
QWidget * createPage(QWidget *parent) override
static QString chooseTemplatePath(QDesignerFormEditorInterface *core, QWidget *parent)
#define QT_FORMEDITOR_EXPORT
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
#define QDESIGNER_SHARED_EXPORT