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
formwindowbase_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#ifndef FORMWINDOWBASE_H
17#define FORMWINDOWBASE_H
18
20
21#include <QtDesigner/abstractformwindow.h>
22
23#include <QtCore/qvariant.h>
24#include <QtCore/qlist.h>
25
27
28class QDesignerDnDItemInterface;
29class QMenu;
30class QtResourceSet;
31class QDesignerPropertySheet;
32
33namespace qdesigner_internal {
34
35class QEditorFormBuilder;
36class DeviceProfile;
37class Grid;
38
39class DesignerPixmapCache;
40class DesignerIconCache;
42
44{
46public:
48
50 Qt::WindowFlags flags = {});
52
54 void setFormData(const QVariantMap &vm);
55
57
58 // Deprecated
59 QPoint grid() const override;
60
61 // Deprecated
62 void setGrid(const QPoint &grid) override;
63
64 bool hasFeature(Feature f) const override;
67
68 const Grid &designerGrid() const;
69 void setDesignerGrid(const Grid& grid);
70
71 bool hasFormGrid() const;
72 void setHasFormGrid(bool b);
73
74 bool gridVisible() const;
75
78
79 static const Grid &defaultDesignerGrid();
80 static void setDefaultDesignerGrid(const Grid& grid);
81
82 // Overwrite to initialize and return a full popup menu for a managed widget
84 // Helper to create a basic popup menu from task menu extensions (internal/public)
86
88 const QPoint &global_mouse_pos) = 0;
89
90 // Helper to find the widget at the mouse position with some flags.
93
94 virtual QWidget *widgetAt(const QPoint &pos) = 0;
95 virtual QWidget *findContainer(QWidget *w, bool excludeLayout) const = 0;
96
98
100
102#if QT_CONFIG(clipboard)
103 virtual void paste(PasteMode pasteMode) = 0;
104#endif
105
106 // Factory method to create a form builder
108
109 virtual bool blockSelectionChanged(bool blocked) = 0;
110
118 void reloadProperties();
119
122
124 QString styleName() const;
126
137
140
141 bool useIdBasedTranslations() const;
142 void setUseIdBasedTranslations(bool v);
143
146
147 bool connectSlotsByName() const;
148 void setConnectSlotsByName(bool v);
149
150public slots:
152
153private slots:
156
157private:
158 void syncGridFeature();
161
163};
164
165} // namespace qdesigner_internal
166
167QT_END_NAMESPACE
168
169#endif // FORMWINDOWBASE_H
friend class QWidget
Definition qpainter.h:432
QWidget * createPage(QWidget *parent) override
PreviewManager * previewManager() const override
Accesses the previewmanager implementation.
void removeFormWindow(QDesignerFormWindowInterface *formWindow) override
int formWindowCount() const override
Returns the number of form windows maintained by \QD's form window manager.
QPixmap createPreviewPixmap() const override
Creates a pixmap representing the preview of the currently active form.
QActionGroup * actionGroup(ActionGroup actionGroup) const override
Returns the action group specified by the enumeration value actionGroup.
bool eventFilter(QObject *o, QEvent *e) override
Filters events if this object has been installed as an event filter for the watched object.
QDesignerFormWindowInterface * formWindow(int index) const override
Returns the form window at the given index.
QDesignerFormWindowInterface * activeFormWindow() const override
Returns the currently active form window in \QD's workspace.
QDesignerFormWindowInterface * createFormWindow(QWidget *parentWidget=nullptr, Qt::WindowFlags flags={}) override
Creates a form window with the given parent and the given window flags.
void dragItems(const QList< QDesignerDnDItemInterface * > &item_list) override
void setActiveFormWindow(QDesignerFormWindowInterface *formWindow) override
QDesignerFormEditorInterface * core() const override
Returns a pointer to \QD's current QDesignerFormEditorInterface object.
QAction * action(Action action) const override
Returns the action specified by the enumeration value action.
#define QT_FORMEDITOR_EXPORT
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.
bool deviceProfileLessThan(const DeviceProfile &d1, const DeviceProfile &d2)
static bool ask(QWidget *parent, QDesignerDialogGuiInterface *dlgui, const QString &title, const QString &what)
static QString description(const DeviceProfile &p)
#define QDESIGNER_SHARED_EXPORT