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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15
16#ifndef WIDGETDATABASE_H
17#define WIDGETDATABASE_H
18
20
21#include <QtDesigner/abstractwidgetdatabase.h>
22
23#include <QtGui/qicon.h>
24#include <QtCore/qstring.h>
25#include <QtCore/qvariant.h>
26#include <QtCore/qpair.h>
27#include <QtCore/qstringlist.h>
28
30
31class QObject;
33
34namespace qdesigner_internal {
35
37{
38public:
39 explicit WidgetDataBaseItem(const QString &name = QString(),
40 const QString &group = QString());
41
42 QString name() const override;
43 void setName(const QString &name) override;
44
45 QString group() const override;
46 void setGroup(const QString &group) override;
47
48 QString toolTip() const override;
50
53
56
57
58 QIcon icon() const override;
59 void setIcon(const QIcon &icon) override;
60
61 bool isCompat() const override;
62 void setCompat(bool compat) override;
63
64 bool isContainer() const override;
65 void setContainer(bool b) override;
66
67 bool isCustom() const override;
68 void setCustom(bool b) override;
69
72
73 bool isPromoted() const override;
74 void setPromoted(bool b) override;
75
76 QString extends() const override;
77 void setExtends(const QString &s) override;
78
81
83
84 QString baseClassName() const; // FIXME Qt 7: Move to QDesignerWidgetDataBaseItemInterface
85 void setBaseClassName(const QString &b);
86
87 QStringList fakeSlots() const;
88 void setFakeSlots(const QStringList &);
89
91 void setFakeSignals(const QStringList &);
92
93 QString addPageMethod() const;
94 void setAddPageMethod(const QString &m);
95
96private:
107 uint m_compat: 1;
108 uint m_container: 1;
109 uint m_custom: 1;
110 uint m_promoted: 1;
114};
115
117
119
122
124{
126public:
129
131
132 int indexOfObject(QObject *o, bool resolveName = true) const override;
133
134 void remove(int index);
135
136
139
140 // Helpers for 'New Form' wizards in integrations. Obtain a list of suitable classes and generate XML for them.
144
145 // Helpers for 'New Form' wizards: Set a fixed size on a XML form template
146 static QString scaleFormTemplate(const QString &xml, const QSize &size, bool fixed);
147
148public slots:
149 void loadPlugins();
150
151private:
153
155};
156
157QDESIGNER_SHARED_EXPORT QDesignerWidgetDataBaseItemInterface
159 const QString &className,
160 const QString &group,
161 const QString &baseClassName,
162 const QString &includeFile,
163 bool promoted,
164 bool custom);
165
167
168QDESIGNER_SHARED_EXPORT WidgetDataBaseItemList
170 const QString &baseClassName);
171} // namespace qdesigner_internal
172
173QT_END_NAMESPACE
174
175#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