QDesignerFormWindowManagerInterface Class
The QDesignerFormWindowManagerInterface class allows you to manipulate the collection of form windows in Qt Designer, and control Qt Designer's form editing actions. More...
Header: | #include <QDesignerFormWindowManagerInterface> |
qmake: | QT += designer |
Inherits: | QObject |
Inherited By: |
Public Types
enum | Action { CutAction, CopyAction, PasteAction, DeleteAction, ..., FormWindowSettingsDialogAction } |
enum | ActionGroup { StyledPreviewActionGroup } |
Public Functions
QDesignerFormWindowManagerInterface(QObject *parent = Q_NULLPTR) | |
virtual | ~QDesignerFormWindowManagerInterface() |
virtual QAction * | action(QDesignerFormWindowManagerInterface::Action action) const = 0 |
virtual QActionGroup * | actionGroup(QDesignerFormWindowManagerInterface::ActionGroup actionGroup) const = 0 |
virtual QDesignerFormWindowInterface * | activeFormWindow() const = 0 |
virtual QDesignerFormEditorInterface * | core() const = 0 |
virtual QDesignerFormWindowInterface * | createFormWindow(QWidget *parentWidget = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags()) = 0 |
virtual QPixmap | createPreviewPixmap() const = 0 |
virtual void | dragItems(const QList<QDesignerDnDItemInterface *> &item_list) = 0 |
virtual QDesignerFormWindowInterface * | formWindow(int index) const = 0 |
virtual int | formWindowCount() const = 0 |
- 34 public functions inherited from QObject
Public Slots
virtual void | addFormWindow(QDesignerFormWindowInterface *formWindow) = 0 |
virtual void | closeAllPreviews() = 0 |
virtual void | removeFormWindow(QDesignerFormWindowInterface *formWindow) = 0 |
virtual void | setActiveFormWindow(QDesignerFormWindowInterface *formWindow) = 0 |
virtual void | showPluginDialog() = 0 |
virtual void | showPreview() = 0 |
- 1 public slot inherited from QObject
Signals
void | activeFormWindowChanged(QDesignerFormWindowInterface *formWindow) |
void | formWindowAdded(QDesignerFormWindowInterface *formWindow) |
void | formWindowRemoved(QDesignerFormWindowInterface *formWindow) |
void | formWindowSettingsChanged(QDesignerFormWindowInterface *fw) |
- 2 signals inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
The QDesignerFormWindowManagerInterface class allows you to manipulate the collection of form windows in Qt Designer, and control Qt Designer's form editing actions.
QDesignerFormWindowManagerInterface is not intended to be instantiated directly. Qt Designer uses the form window manager to control the various form windows in its workspace. You can retrieve an interface to Qt Designer's form window manager using the QDesignerFormEditorInterface::formWindowManager() function. For example:
QDesignerFormWindowManagerInterface *manager = 0; QDesignerFormWindowInterface *formWindow = 0; manager = formEditor->formWindowManager(); formWindow = manager->formWindow(0); manager->setActiveFormWindow(formWindow);
When implementing a custom widget plugin, a pointer to Qt Designer's current QDesignerFormEditorInterface object (formEditor
in the example above) is provided by the QDesignerCustomWidgetInterface::initialize() function's parameter. You must subclass the QDesignerCustomWidgetInterface to expose your plugin to Qt Designer.
The form window manager interface provides the createFormWindow() function that enables you to create a new form window which you can add to the collection of form windows that the manager maintains, using the addFormWindow() slot. It also provides the formWindowCount() function returning the number of form windows currently under the manager's control, the formWindow() function returning the form window associated with a given index, and the activeFormWindow() function returning the currently selected form window. The removeFormWindow() slot allows you to reduce the number of form windows the manager must maintain, and the setActiveFormWindow() slot allows you to change the form window focus in Qt Designer's workspace.
In addition, QDesignerFormWindowManagerInterface contains a collection of functions that enables you to intervene and control Qt Designer's form editing actions. All these functions return the original action, making it possible to propagate the function further after intervention.
Finally, the interface provides three signals which are emitted when a form window is added, when the currently selected form window changes, or when a form window is removed, respectively. All the signals carry the form window in question as their parameter.
See also QDesignerFormEditorInterface and QDesignerFormWindowInterface.
Member Type Documentation
enum QDesignerFormWindowManagerInterface::Action
Specifies an action of Qt Designer.
Constant | Value | Description |
---|---|---|
QDesignerFormWindowManagerInterface::CutAction | 100 | Clipboard Cut |
QDesignerFormWindowManagerInterface::CopyAction | 101 | Clipboard Copy |
QDesignerFormWindowManagerInterface::PasteAction | 102 | Clipboard Paste |
QDesignerFormWindowManagerInterface::DeleteAction | 103 | Clipboard Delete |
QDesignerFormWindowManagerInterface::SelectAllAction | 104 | Select All |
QDesignerFormWindowManagerInterface::LowerAction | 200 | Lower current widget |
QDesignerFormWindowManagerInterface::RaiseAction | 201 | Raise current widget |
QDesignerFormWindowManagerInterface::UndoAction | 300 | Undo |
QDesignerFormWindowManagerInterface::RedoAction | 301 | Redo |
QDesignerFormWindowManagerInterface::HorizontalLayoutAction | 400 | Lay out using QHBoxLayout |
QDesignerFormWindowManagerInterface::VerticalLayoutAction | 401 | Lay out using QVBoxLayout |
QDesignerFormWindowManagerInterface::SplitHorizontalAction | 402 | Lay out in horizontal QSplitter |
QDesignerFormWindowManagerInterface::SplitVerticalAction | 403 | Lay out in vertical QSplitter |
QDesignerFormWindowManagerInterface::GridLayoutAction | 404 | Lay out using QGridLayout |
QDesignerFormWindowManagerInterface::FormLayoutAction | 405 | Lay out using QFormLayout |
QDesignerFormWindowManagerInterface::BreakLayoutAction | 406 | Break existing layout |
QDesignerFormWindowManagerInterface::AdjustSizeAction | 407 | Adjust size |
QDesignerFormWindowManagerInterface::SimplifyLayoutAction | 408 | Simplify QGridLayout or QFormLayout |
QDesignerFormWindowManagerInterface::DefaultPreviewAction | 500 | Create a preview in default style |
QDesignerFormWindowManagerInterface::FormWindowSettingsDialogAction | 600 | Show dialog with form settings |
This enum was introduced or modified in Qt 5.0.
See also action().
enum QDesignerFormWindowManagerInterface::ActionGroup
Specifies an action group of Qt Designer.
Constant | Value | Description |
---|---|---|
QDesignerFormWindowManagerInterface::StyledPreviewActionGroup | 100 | Action group containing styled preview actions |
This enum was introduced or modified in Qt 5.0.
See also actionGroup().
Member Function Documentation
QDesignerFormWindowManagerInterface::QDesignerFormWindowManagerInterface(QObject *parent = Q_NULLPTR)
Constructs an interface with the given parent for the form window manager.
[virtual]
QDesignerFormWindowManagerInterface::~QDesignerFormWindowManagerInterface()
Destroys the interface for the form window manager.
[pure virtual]
QAction *QDesignerFormWindowManagerInterface::action(QDesignerFormWindowManagerInterface::Action action) const
[pure virtual]
QActionGroup *QDesignerFormWindowManagerInterface::actionGroup(QDesignerFormWindowManagerInterface::ActionGroup actionGroup) const
[pure virtual]
QDesignerFormWindowInterface *QDesignerFormWindowManagerInterface::activeFormWindow() const
See also setActiveFormWindow().
[signal]
void QDesignerFormWindowManagerInterface::activeFormWindowChanged(QDesignerFormWindowInterface *formWindow)
[pure virtual slot]
void QDesignerFormWindowManagerInterface::addFormWindow(QDesignerFormWindowInterface *formWindow)
[pure virtual slot]
void QDesignerFormWindowManagerInterface::closeAllPreviews()
[pure virtual]
QDesignerFormEditorInterface *QDesignerFormWindowManagerInterface::core() const
[pure virtual]
QDesignerFormWindowInterface *QDesignerFormWindowManagerInterface::createFormWindow(QWidget *parentWidget = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags())
[pure virtual]
QPixmap QDesignerFormWindowManagerInterface::createPreviewPixmap() const
[pure virtual]
void QDesignerFormWindowManagerInterface::dragItems(const QList<QDesignerDnDItemInterface *> &item_list)
[pure virtual]
QDesignerFormWindowInterface *QDesignerFormWindowManagerInterface::formWindow(int index) const
[signal]
void QDesignerFormWindowManagerInterface::formWindowAdded(QDesignerFormWindowInterface *formWindow)
[pure virtual]
int QDesignerFormWindowManagerInterface::formWindowCount() const
[signal]
void QDesignerFormWindowManagerInterface::formWindowRemoved(QDesignerFormWindowInterface *formWindow)
[signal]
void QDesignerFormWindowManagerInterface::formWindowSettingsChanged(QDesignerFormWindowInterface *fw)
[pure virtual slot]
void QDesignerFormWindowManagerInterface::removeFormWindow(QDesignerFormWindowInterface *formWindow)
[pure virtual slot]
void QDesignerFormWindowManagerInterface::setActiveFormWindow(QDesignerFormWindowInterface *formWindow)
See also activeFormWindow().