The QDesignerFormWindowManagerInterface class allows you to manipulate the collection of form windows in Qt Designer, and control Qt Designer's form editing actions. 更多...
| 头: | #include <QDesignerFormWindowManagerInterface> |
| 继承: | QObject |
| QDesignerFormWindowManagerInterface (QObject * parent = 0) | |
| virtual | ~QDesignerFormWindowManagerInterface () |
| virtual QAction * | actionAdjustSize () const |
| virtual QAction * | actionBreakLayout () const |
| virtual QAction * | actionCopy () const |
| virtual QAction * | actionCut () const |
| virtual QAction * | actionDelete () const |
| QAction * | actionFormLayout () const |
| virtual QAction * | actionGridLayout () const |
| virtual QAction * | actionHorizontalLayout () const |
| virtual QAction * | actionLower () const |
| virtual QAction * | actionPaste () const |
| virtual QAction * | actionRaise () const |
| virtual QAction * | actionRedo () const |
| virtual QAction * | actionSelectAll () const |
| QAction * | actionSimplifyLayout () const |
| virtual QAction * | actionSplitHorizontal () const |
| virtual QAction * | actionSplitVertical () const |
| virtual QAction * | actionUndo () const |
| virtual QAction * | actionVerticalLayout () const |
| virtual QDesignerFormWindowInterface * | activeFormWindow () const |
| virtual QDesignerFormEditorInterface * | core () const |
| virtual QDesignerFormWindowInterface * | createFormWindow (QWidget * parent = 0, Qt::WindowFlags flags = 0) |
| virtual QDesignerFormWindowInterface * | formWindow (int index ) const |
| virtual int | formWindowCount () const |
| virtual void | addFormWindow (QDesignerFormWindowInterface * formWindow ) |
| virtual void | removeFormWindow (QDesignerFormWindowInterface * formWindow ) |
| virtual void | setActiveFormWindow (QDesignerFormWindowInterface * formWindow ) |
| void | activeFormWindowChanged (QDesignerFormWindowInterface * formWindow ) |
| void | formWindowAdded (QDesignerFormWindowInterface * formWindow ) |
| void | formWindowRemoved (QDesignerFormWindowInterface * formWindow ) |
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 () 函数。例如:
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.
此外, 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.
另请参阅 QDesignerFormEditorInterface and QDesignerFormWindowInterface .
Constructs an interface with the given parent for the form window manager.
[虚拟]
QDesignerFormWindowManagerInterface::
~QDesignerFormWindowManagerInterface
()
Destroys the interface for the form window manager.
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionAdjustSize
() const
Allows you to intervene and control Qt Designer 's "adjust size" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionBreakLayout
() const
Allows you to intervene and control Qt Designer 's "break layout" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionCopy
() const
Allows you to intervene and control Qt Designer 's "copy" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionCut
() const
Allows you to intervene and control Qt Designer 's "cut" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionDelete
() const
Allows you to intervene and control Qt Designer 's "delete" action. The function returns the original action.
另请参阅 QAction .
Allows you to intervene and control Qt Designer 's "form layout" action. The function returns the original action.
FormWindowManagerPrivateMap *fwmpm = g_FormWindowManagerPrivateMap();
该函数在 Qt 4.4 引入。
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionGridLayout
() const
Allows you to intervene and control a request for grid layout for a form window in Qt Designer 's workspace. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionHorizontalLayout
() const
Allows you to intervene and control a request for horizontal layout for a form window in Qt Designer 's workspace. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionLower
() const
Allows you to intervene and control the action of lowering a form window in Qt Designer 's workspace. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionPaste
() const
Allows you to intervene and control Qt Designer 's "paste" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionRaise
() const
Allows you to intervene and control the action of raising of a form window in Qt Designer 's workspace. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionRedo
() const
Allows you to intervene and control Qt Designer 's "redo" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionSelectAll
() const
Allows you to intervene and control Qt Designer 's "select all" action. The function returns the original action.
另请参阅 QAction .
Allows you to intervene and control Qt Designer 's "simplify layout" action. The function returns the original action.
该函数在 Qt 4.4 引入。
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionSplitHorizontal
() const
Allows you to intervene and control Qt Designer 's "split horizontal" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionSplitVertical
() const
Allows you to intervene and control Qt Designer 's "split vertical" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionUndo
() const
Allows you to intervene and control Qt Designer 's "undo" action. The function returns the original action.
另请参阅 QAction .
[虚拟]
QAction
* QDesignerFormWindowManagerInterface::
actionVerticalLayout
() const
Allows you to intervene and control a request for vertical layout for a form window in Qt Designer 's workspace. The function returns the original action.
另请参阅 QAction .
[虚拟]
QDesignerFormWindowInterface
* QDesignerFormWindowManagerInterface::
activeFormWindow
() const
Returns the currently active form window in Qt Designer 's workspace.
另请参阅 setActiveFormWindow () 和 removeFormWindow ().
[signal]
void
QDesignerFormWindowManagerInterface::
activeFormWindowChanged
(
QDesignerFormWindowInterface
*
formWindow
)
This signal is emitted when the contents of the currently active form window in Qt Designer 's workspace changed. A pointer to the currently active formWindow is passed as an argument.
另请参阅 activeFormWindow ().
[virtual slot]
void
QDesignerFormWindowManagerInterface::
addFormWindow
(
QDesignerFormWindowInterface
*
formWindow
)
添加给定 formWindow to the collection of windows that Qt Designer 's form window manager maintains.
另请参阅 formWindowAdded ().
[虚拟]
QDesignerFormEditorInterface
* QDesignerFormWindowManagerInterface::
core
() const
Returns a pointer to Qt Designer 's current QDesignerFormEditorInterface 对象。
[虚拟]
QDesignerFormWindowInterface
* QDesignerFormWindowManagerInterface::
createFormWindow
(
QWidget
*
parent
= 0,
Qt::WindowFlags
flags
= 0)
Creates a form window with the given parent and the given window flags .
另请参阅 addFormWindow ().
[虚拟]
QDesignerFormWindowInterface
* QDesignerFormWindowManagerInterface::
formWindow
(
int
index
) const
Returns the form window at the given index .
另请参阅 setActiveFormWindow () 和 removeFormWindow ().
[signal]
void
QDesignerFormWindowManagerInterface::
formWindowAdded
(
QDesignerFormWindowInterface
*
formWindow
)
This signal is emitted when a new form window is added to the collection of windows that Qt Designer 's form window manager maintains. A pointer to the new formWindow is passed as an argument.
另请参阅 addFormWindow () 和 setActiveFormWindow ().
[虚拟]
int
QDesignerFormWindowManagerInterface::
formWindowCount
() const
Returns the number of form windows maintained by Qt Designer 's form window manager.
[signal]
void
QDesignerFormWindowManagerInterface::
formWindowRemoved
(
QDesignerFormWindowInterface
*
formWindow
)
This signal is emitted when a form window is removed from the collection of windows that Qt Designer 's form window manager maintains. A pointer to the removed formWindow is passed as an argument.
另请参阅 removeFormWindow ().
[virtual slot]
void
QDesignerFormWindowManagerInterface::
removeFormWindow
(
QDesignerFormWindowInterface
*
formWindow
)
移除给定 formWindow from the collection of windows that Qt Designer 's form window manager maintains.
另请参阅 formWindow () 和 formWindowRemoved ().
[virtual slot]
void
QDesignerFormWindowManagerInterface::
setActiveFormWindow
(
QDesignerFormWindowInterface
*
formWindow
)
设置给定 formWindow to be the currently active form window in Qt Designer 's workspace.
另请参阅 activeFormWindow () 和 activeFormWindowChanged ().