#include <form.h>
Inherits TQObject.
A simple class representing a form.
This class represents one form and holds the corresponding ObjectTree and Containers. It takes care of widget selection and pasting widgets.
Definition at line 135 of file form.h.
◆ Form()
◆ ~Form()
◆ activeContainer()
- Returns
- A pointer to the currently active Container, ie the parent Container for a simple widget, and the widget's Container if it is itself a container.
Definition at line 151 of file form.cpp.
◆ addCommand()
| void Form::addCommand |
( |
KCommand * |
command, |
|
|
bool |
execute |
|
) |
| |
Adds a widget in the form's command history. Please use it instead of calling directly actionCollection()->addCommand().
Definition at line 401 of file form.cpp.
◆ addWidgetToTabStops()
Adds the widget at the end of tabstops list. Called on widget creation.
Definition at line 455 of file form.cpp.
◆ autoAssignTabStops()
| void Form::autoAssignTabStops |
( |
| ) |
|
Tells the Form to reassign the tab stops because the widget layout has changed (called for example before saving or displaying the tab order dialog). Automatically sorts widget from the top-left to bottom-right corner. Widget can be grouped with containers. In paticular, for tab widgets, child widgets should ordered by parent tab's order.
We automatically sort widget from the top-left to bottom-right corner - Todo:
- Handle RTL layout (ie from top-right to bottom-left)
Definition at line 507 of file form.cpp.
◆ autoTabStops()
| bool KFormDesigner::Form::autoTabStops |
( |
| ) |
const |
|
inline |
- Returns
- True if the Form automatically handles tab stops.
Definition at line 279 of file form.h.
◆ changeName
| void Form::changeName |
( |
const TQCString & |
oldname, |
|
|
const TQCString & |
newname |
|
) |
| |
|
slot |
This slot is called when the name of a widget was changed in Property Editor. It renames the ObjectTreeItem associated to this widget.
Definition at line 361 of file form.cpp.
◆ childAdded
◆ childRemoved
◆ clearCommandHistory()
| void Form::clearCommandHistory |
( |
| ) |
|
Clears form's command history.
Definition at line 411 of file form.cpp.
◆ clearSelection
| void Form::clearSelection |
( |
| ) |
|
|
slot |
◆ commandHistory()
◆ commonParentContainer()
- Returns
- The Container which is a parent of all widgets in wlist. Used by activeContainer(), and to find where to paste widgets when multiple widgets are selected.
Definition at line 171 of file form.cpp.
◆ connectionBuffer()
| ConnectionBuffer * KFormDesigner::Form::connectionBuffer |
( |
| ) |
const |
|
inline |
◆ createToplevel()
| void Form::createToplevel |
( |
TQWidget * |
container, |
|
|
FormWidget * |
formWidget = 0, |
|
|
const TQCString & |
classname = "TQWidget" |
|
) |
| |
Creates a toplevel widget out of another widget. container will become the Form toplevel widget, will be associated to an ObjectTree and so on. TQWidget *toplevel = new TQWidget(this);
form->createToplevel(toplevel);
todo: copy caption in Kexi from object's caption
Definition at line 127 of file form.cpp.
◆ defaultMargin()
| int KFormDesigner::Form::defaultMargin |
( |
| ) |
|
|
inline |
- Returns
- the default margin for all the layout inside this Form.
Definition at line 235 of file form.h.
◆ defaultSpacing()
| int KFormDesigner::Form::defaultSpacing |
( |
| ) |
|
|
inline |
- Returns
- the default spacing for all the layout inside this Form.
Definition at line 238 of file form.h.
◆ designMode()
| bool KFormDesigner::Form::designMode |
( |
| ) |
const |
|
inline |
- Returns
- The actual mode of the Form.
Definition at line 226 of file form.h.
◆ destroying
| void KFormDesigner::Form::destroying |
( |
| ) |
|
|
signal |
This signal emitted when Form is about to be destroyed.
◆ emitActionSignals()
| void Form::emitActionSignals |
( |
bool |
withUndoAction = true | ) |
|
Emits the action signals, and optionaly the undo/redo related signals if withUndoAction == true. See FormManager for signals description.
Definition at line 311 of file form.cpp.
◆ emitChildAdded()
◆ emitChildRemoved()
◆ emitRedoEnabled
| void Form::emitRedoEnabled |
( |
| ) |
|
|
protectedslot |
◆ emitSelectionSignals()
| void Form::emitSelectionSignals |
( |
| ) |
|
◆ emitUndoEnabled
| void Form::emitUndoEnabled |
( |
| ) |
|
|
protectedslot |
◆ filename()
| TQString KFormDesigner::Form::filename |
( |
| ) |
const |
|
inline |
- Returns
- The filename of the UI file this Form was saved to, or TQString() if the Form hasn't be saved yet.
Definition at line 248 of file form.h.
◆ formatVersion()
| uint Form::formatVersion |
( |
| ) |
const |
- Returns
- format version number for this form. For new forms it is equal to KFormDesigner::version().
Definition at line 572 of file form.cpp.
◆ formDeleted
| void Form::formDeleted |
( |
| ) |
|
|
protectedslot |
This slot is called when the toplevel widget of this Form is deleted (ie the window closed) so that the Form gets deleted at the same time.
Definition at line 345 of file form.cpp.
◆ formWidget()
| FormWidget * KFormDesigner::Form::formWidget |
( |
| ) |
const |
|
inline |
◆ gridSize()
| int KFormDesigner::Form::gridSize |
( |
| ) |
|
|
inline |
- Returns
- the distance between two dots in the form background.
- Todo:
- make gridSize configurable at global level
Definition at line 232 of file form.h.
◆ headerProperties()
| TQMap< TQCString, TQString > * KFormDesigner::Form::headerProperties |
( |
| ) |
const |
|
inline |
A set of value/key pairs provided to be stored as attributes in <kfd:customHeader/> XML element (saved as a first child of <UI> element).
Definition at line 309 of file form.h.
◆ interactiveMode()
| bool KFormDesigner::Form::interactiveMode |
( |
| ) |
const |
|
inline |
- Returns
- true if the Form is being updated by the user, ie the created widget were drawn on the Form.
-
false if the Form is being updated by the program, ie the widget are created by FormIO, and so composed widgets should not be populated automatically (such as TQTabWidget).
Definition at line 218 of file form.h.
◆ isModified()
| bool KFormDesigner::Form::isModified |
( |
| ) |
|
|
inline |
◆ library()
◆ objectTree()
| ObjectTree * KFormDesigner::Form::objectTree |
( |
| ) |
const |
|
inline |
◆ originalFormatVersion()
| uint Form::originalFormatVersion |
( |
| ) |
const |
- Returns
- original format version number for this form (as loaded from .ui XML string) For new forms it is equal to KFormDesigner::version().
Definition at line 581 of file form.cpp.
◆ parentContainer()
| Container * Form::parentContainer |
( |
TQWidget * |
w = 0 | ) |
|
- Returns
- A pointer to the parent Container of the currently selected widget. It is the same as activeContainer() for a simple widget, but unlike this function it will also return the parent Container if the widget itself is a Container.
Definition at line 196 of file form.cpp.
◆ pixmapCollection()
◆ resizeHandlesForWidget()
Internal: called by ResizeHandle when mouse move event causes first resize handle's dragging. As a result, current widget's editing (if any) is finished - see WidgetFactory::resetEditor().
Definition at line 283 of file form.cpp.
◆ selectedWidget()
| TQWidget * KFormDesigner::Form::selectedWidget |
( |
| ) |
const |
|
inline |
- Returns
- currently selected widget in this form, or 0 if there is no widget selected or more than one widget selected.
- See also
- selectedWidgets()
Definition at line 197 of file form.h.
◆ selectedWidgets()
| WidgetList * KFormDesigner::Form::selectedWidgets |
( |
| ) |
const |
|
inline |
- Returns
- the list of currently selected widgets in this form
Definition at line 192 of file form.h.
◆ selectFormWidget
| void Form::selectFormWidget |
( |
| ) |
|
|
slot |
Sets the form widget (it will be uniquely selected widget).
Definition at line 296 of file form.cpp.
◆ selectionChanged
| void KFormDesigner::Form::selectionChanged |
( |
TQWidget * |
w, |
|
|
bool |
add, |
|
|
bool |
moreWillBeSelected = false |
|
) |
| |
|
signal |
◆ setAutoTabStops()
| void KFormDesigner::Form::setAutoTabStops |
( |
bool |
autoTab | ) |
|
|
inline |
If autoTab is true, then the Form will automatically handle tab stops, and the "Edit Tab Order" dialog will be disabled. The tab widget will be set from the top-left to the bottom-right corner.
If \ autoTab is false, then it's up to the user to change tab stops (which are by default in order of creation).
Definition at line 286 of file form.h.
◆ setConnectionBuffer()
| void KFormDesigner::Form::setConnectionBuffer |
( |
ConnectionBuffer * |
b | ) |
|
|
inlineprotected |
◆ setDesignMode()
| void Form::setDesignMode |
( |
bool |
design | ) |
|
If design is true, the Form is in Design Mode (by default). If design is false, then the Form is in Preview Mode, so the ObjectTree and the Containers are removed.
Definition at line 214 of file form.cpp.
◆ setFilename()
| void KFormDesigner::Form::setFilename |
( |
const TQString & |
file | ) |
|
|
inline |
Sets the filename of this Form to filename.
Definition at line 251 of file form.h.
◆ setFormatVersion()
| void Form::setFormatVersion |
( |
uint |
ver | ) |
|
◆ setFormWidget()
◆ setInteractiveMode()
| void KFormDesigner::Form::setInteractiveMode |
( |
bool |
interactive | ) |
|
|
inline |
Sets the Form interactivity mode. Form is not interactive when pasting widgets, or loading a Form.
Definition at line 210 of file form.h.
◆ setOriginalFormatVersion()
| void Form::setOriginalFormatVersion |
( |
uint |
ver | ) |
|
◆ setSelectedWidget
| void Form::setSelectedWidget |
( |
TQWidget * |
selected, |
|
|
bool |
add = false, |
|
|
bool |
dontRaise = false, |
|
|
bool |
moreWillBeSelected = false |
|
) |
| |
|
slot |
Sets selected to be the selected widget of this Form. If add is true, the formerly selected widget is still selected, and the new one is just added. If false, selected replace the actually selected widget. The form widget is always selected alone. moreWillBeSelected indicates whether more widgets will be selected soon (so for multiselection we should not update the property pane before the last widget is selected)
Definition at line 237 of file form.cpp.
◆ slotCommandExecuted
| void Form::slotCommandExecuted |
( |
| ) |
|
|
protectedslot |
This slot is called when a command is executed. The undo/redo signals are emitted to update actions.
Definition at line 419 of file form.cpp.
◆ slotFormRestored
| void Form::slotFormRestored |
( |
| ) |
|
|
protectedslot |
This slot is called when form is restored, ie when the user has undone all actions. The form modified flag is updated, and FormManager::dirty() is called.
Definition at line 445 of file form.cpp.
◆ tabStops()
- Returns
- A pointer to this Form tabstops list : it contains all the widget that can have focus ( ie no labels, etc) in the order of the tabs.
Definition at line 267 of file form.h.
◆ tabStopsIterator()
◆ toplevelContainer()
| Container * KFormDesigner::Form::toplevelContainer |
( |
| ) |
const |
|
inline |
◆ unSelectWidget
| void Form::unSelectWidget |
( |
TQWidget * |
w | ) |
|
|
slot |
Unselects the widget w. Te widget is removed from the Cntainer 's list and its resizeHandle is removed.
Definition at line 289 of file form.cpp.
◆ updateTabStopsOrder()
| void Form::updateTabStopsOrder |
( |
| ) |
|
Called (e.g. by KexiDBForm) when certain widgets can have updated focusPolicy properties these having no TabFocus flags set are removed from tabStops() list.
Definition at line 480 of file form.cpp.
◆ widget()
| TQWidget * Form::widget |
( |
| ) |
const |
◆ ConnectionDialog
◆ FormManager
◆ FormWidget
The documentation for this class was generated from the following files:
|