#include <commands.h>
Public Member Functions | |
| InsertWidgetCommand (Container *container) | |
| InsertWidgetCommand (Container *container, const TQCString &className, const TQPoint &pos, const TQCString &namePrefix=TQCString()) | |
| virtual void | execute () |
| virtual void | unexecute () |
| virtual TQString | name () const |
| virtual void | debug () |
| TQCString | widgetName () const |
Protected Attributes | |
| Form * | m_form |
| TQString | m_containername |
| TQPoint | m_point |
| TQCString | m_name |
| TQCString | m_class |
| TQRect | m_insertRect |
Detailed Description
This command is used when inserting a widger using toolbar or menu. You only need to give the parent Container and the widget pos. The other information is taken from FormManager.
Definition at line 174 of file commands.h.
Constructor & Destructor Documentation
◆ InsertWidgetCommand() [1/2]
| InsertWidgetCommand::InsertWidgetCommand | ( | Container * | container | ) |
numberSuffixRequired
Definition at line 670 of file commands.cpp.
◆ InsertWidgetCommand() [2/2]
| InsertWidgetCommand::InsertWidgetCommand | ( | Container * | container, |
| const TQCString & | className, | ||
| const TQPoint & | pos, | ||
| const TQCString & | namePrefix = TQCString() ) |
This ctor allows to set explicit class name and position. Used for dropping widgets on the form surface. If namePrefix is empty, widget's unique name is constructed using hint for className (WidgetLibrary::namePrefix()), otherwise, namePrefix is used to generate widget's name. This allows e.g. inserting a widgets having name constructed using
numberSuffixRequired
Definition at line 683 of file commands.cpp.
Member Function Documentation
◆ debug()
|
virtual |
Implements KFormDesigner::Command.
Definition at line 837 of file commands.cpp.
◆ execute()
|
virtual |
- Todo
- allow setting this for data view mode as well
- Todo
- update widget's width for entered text's metrics
Definition at line 703 of file commands.cpp.
◆ name()
|
virtual |
Definition at line 828 of file commands.cpp.
◆ unexecute()
|
virtual |
Definition at line 817 of file commands.cpp.
◆ widgetName()
|
inline |
- Returns
- inserted widget's name
Definition at line 195 of file commands.h.
Member Data Documentation
◆ m_class
|
protected |
Definition at line 202 of file commands.h.
◆ m_containername
|
protected |
Definition at line 199 of file commands.h.
◆ m_form
|
protected |
Definition at line 198 of file commands.h.
◆ m_insertRect
|
protected |
Definition at line 203 of file commands.h.
◆ m_name
|
protected |
Definition at line 201 of file commands.h.
◆ m_point
|
protected |
Definition at line 200 of file commands.h.
The documentation for this class was generated from the following files:
