KFormDesigner::PasteWidgetCommand Class Reference
#include <commands.h>
Inheritance diagram for KFormDesigner::PasteWidgetCommand:

Detailed Description
This command is used when pasting widgets. You need to give the QDomDocument containing the widget(s) to paste, and optionnally the point where to paste widgets.
Definition at line 243 of file commands.h.
Public Member Functions | |
| PasteWidgetCommand (QDomDocument &domDoc, Container *container, const QPoint &p=QPoint()) | |
| virtual void | execute () |
| virtual void | unexecute () |
| virtual QString | name () const |
| virtual void | debug () |
Protected Member Functions | |
| void | changePos (QDomElement &widg, const QPoint &newpos) |
| void | fixPos (QDomElement &el, Container *container) |
| void | moveWidgetBy (QDomElement &el, Container *container, const QPoint &p) |
| void | fixNames (QDomElement &el) |
Protected Attributes | |
| Form * | m_form |
| QCString | m_data |
| QString | m_containername |
| QPoint | m_point |
| QStringList | m_names |
Constructor & Destructor Documentation
|
||||||||||||||||
|
Definition at line 1057 of file commands.cpp. References KFormDesigner::Container::form(), m_containername, m_data, m_form, m_point, and KFormDesigner::Container::widget(). |
Member Function Documentation
|
||||||||||||
|
Internal function used to change the coordinates of a widget to newpos before pasting it (to paste it at the position of the contextual menu). It modifies the "geometry" property of the QDomElement representing the widget. Definition at line 1207 of file commands.cpp. Referenced by execute(), and moveWidgetBy(). |
|
|
Implements KFormDesigner::Command. Definition at line 1365 of file commands.cpp. References m_containername, m_data, m_form, m_names, m_point, and KFormDesigner::Form::widget(). |
|
|
|
Internal function used to fix the names of the widgets before pasting them. It prevents from pasting a widget with the same name as an actual widget. The child widgets are also fixed recursively. Definition at line 1329 of file commands.cpp. References m_form, and KFormDesigner::Form::objectTree(). Referenced by execute(). |
|
||||||||||||
|
Internal function used to fix the coordinates of a widget before pasting it (to avoid having two widgets at the same position). It moves the widget by (10, 10) increment (several times if there are already pasted widgets at this position). Definition at line 1232 of file commands.cpp. References moveWidgetBy(). Referenced by execute(). |
|
||||||||||||||||
|
Definition at line 1282 of file commands.cpp. References changePos(), m_form, KFormDesigner::Container::widget(), and KFormDesigner::Form::widget(). |
|
|
Definition at line 1200 of file commands.cpp. |
|
|
Definition at line 1181 of file commands.cpp. References KFormDesigner::ObjectTreeItem::container(), KFormDesigner::Container::deleteWidget(), KFormDesigner::Container::form(), m_containername, m_form, m_names, KFormDesigner::Form::objectTree(), and KFormDesigner::ObjectTreeItem::widget(). |
Member Data Documentation
|
|
Definition at line 274 of file commands.h. Referenced by debug(), execute(), PasteWidgetCommand(), and unexecute(). |
|
|
Definition at line 273 of file commands.h. Referenced by debug(), execute(), and PasteWidgetCommand(). |
|
|
Definition at line 272 of file commands.h. Referenced by debug(), execute(), fixNames(), moveWidgetBy(), PasteWidgetCommand(), and unexecute(). |
|
|
Definition at line 276 of file commands.h. Referenced by debug(), execute(), and unexecute(). |
|
|
Definition at line 275 of file commands.h. Referenced by debug(), execute(), and PasteWidgetCommand(). |
The documentation for this class was generated from the following files:
