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
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#ifndef FORMWINDOWBASE_H
16#define FORMWINDOWBASE_H
17
19
20#include <QtDesigner/abstractformwindow.h>
21
22#include <QtCore/qvariant.h>
23#include <QtCore/qlist.h>
24
26
27class QDesignerDnDItemInterface;
28class QMenu;
29class QtResourceSet;
30class QDesignerPropertySheet;
31
32namespace qdesigner_internal {
33
34class QEditorFormBuilder;
35class DeviceProfile;
36class Grid;
37
38class DesignerPixmapCache;
39class DesignerIconCache;
41
43{
45public:
47
49 Qt::WindowFlags flags = {});
51
53 void setFormData(const QVariantMap &vm);
54
56
57 // Deprecated
58 QPoint grid() const override;
59
60 // Deprecated
61 void setGrid(const QPoint &grid) override;
62
63 bool hasFeature(Feature f) const override;
66
67 const Grid &designerGrid() const;
68 void setDesignerGrid(const Grid& grid);
69
70 bool hasFormGrid() const;
71 void setHasFormGrid(bool b);
72
73 bool gridVisible() const;
74
77
78 static const Grid &defaultDesignerGrid();
79 static void setDefaultDesignerGrid(const Grid& grid);
80
81 // Overwrite to initialize and return a full popup menu for a managed widget
83 // Helper to create a basic popup menu from task menu extensions (internal/public)
85
87 const QPoint &global_mouse_pos) = 0;
88
89 // Helper to find the widget at the mouse position with some flags.
92
93 virtual QWidget *widgetAt(const QPoint &pos) = 0;
94 virtual QWidget *findContainer(QWidget *w, bool excludeLayout) const = 0;
95
97
99
101#if QT_CONFIG(clipboard)
102 virtual void paste(PasteMode pasteMode) = 0;
103#endif
104
105 // Factory method to create a form builder
107
108 virtual bool blockSelectionChanged(bool blocked) = 0;
109
117 void reloadProperties();
118
121
123 QString styleName() const;
125
136
139
140 bool useIdBasedTranslations() const;
141 void setUseIdBasedTranslations(bool v);
142
143 bool connectSlotsByName() const;
144 void setConnectSlotsByName(bool v);
145
146public slots:
148
149private slots:
152
153private:
154 void syncGridFeature();
157
159};
160
161} // namespace qdesigner_internal
162
163QT_END_NAMESPACE
164
165#endif // FORMWINDOWBASE_H
friend class QWidget
Definition qpainter.h:421
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)
#define QDESIGNER_SHARED_EXPORT