kexi
KFormDesigner::Container Class Reference
#include <container.h>
Detailed Description
A class to make a container from any widget.You can then create child widgets, and the background is dotted.
Definition at line 72 of file container.h.
Public Types | |
enum | LayoutType { NoLayout = 0, HBox, VBox, Grid, HFlow, VFlow, HSplitter, VSplitter } |
Public Slots | |
void | setSelectedWidget (QWidget *selected, bool add, bool dontRaise=false) |
void | unSelectWidget (QWidget *w) |
void | deleteWidget (QWidget *w) |
void | reloadLayout () |
Public Member Functions | |
Container (Container *toplevel, QWidget *container, QObject *parent=0, const char *name=0) | |
virtual | ~Container () |
Container * | toplevel () |
Form * | form () const |
QWidget * | widget () const |
ObjectTreeItem * | objectTree () const |
void | setForm (Form *form) |
void | setObjectTree (ObjectTreeItem *t) |
QLayout * | layout () const |
LayoutType | layoutType () const |
int | layoutMargin () |
int | layoutSpacing () |
void | setLayout (LayoutType type) |
void | setLayoutSpacing (int spacing) |
void | setLayoutMargin (int margin) |
void | stopInlineEditing () |
virtual bool | eventFilter (QObject *o, QEvent *e) |
Static Public Member Functions | |
static QString | layoutTypeToString (int type) |
static LayoutType | stringToLayoutType (const QString &name) |
Protected Slots | |
void | widgetDeleted () |
Protected Member Functions | |
void | createBoxLayout (WidgetList *list) |
void | createFlowLayout () |
void | createGridLayout (bool testOnly=false) |
void | drawConnection (QMouseEvent *mev) |
void | drawSelectionRect (QMouseEvent *mev) |
void | drawInsertRect (QMouseEvent *mev, QObject *s) |
void | drawCopiedWidgetRect (QMouseEvent *mev) |
void | moveSelectedWidgetsBy (int realdx, int realdy, QMouseEvent *mev=0) |
Friends | |
class | InsertWidgetCommand |
class | PasteWidgetCommand |
class | DeleteWidgetCommand |
class | FormIO |
Constructor & Destructor Documentation
|
Creates a Container from the widget container, which have toplevel as parent Container.
Definition at line 91 of file container.cpp. |
Member Function Documentation
|
Internal function to create a HBoxLayout or VBoxLayout for this container. list is a subclass of QObjectList that can sort widgets following their position (such as HorWidgetList or VerWidgetList). Definition at line 655 of file container.cpp. |
|
Internal function to create a KexiFlowLayout. Definition at line 669 of file container.cpp. |
|
Internal function to create a GridLayout. if testOnly is true, the layout is simulated, and only the widget's grid info aris filled. Definition at line 733 of file container.cpp. |
|
Deletes the widget w. Removes it from ObjectTree, and sets selection to Container's widget. Definition at line 572 of file container.cpp. |
|
Drawing functions used by eventFilter.
Definition at line 944 of file container.cpp. |
|
This is the main function of Container, which filters the event sent to the watched widget. Definition at line 150 of file container.cpp. |
|
Definition at line 89 of file container.h. |
|
Definition at line 105 of file container.h. |
|
Definition at line 111 of file container.h. |
|
Definition at line 114 of file container.h. |
|
Definition at line 108 of file container.h. |
|
Definition at line 918 of file container.cpp. |
|
Other functions used by eventFilter.
Definition at line 1093 of file container.cpp. |
|
Definition at line 95 of file container.h. |
|
Recreates the Container layout. Calls this when a widget has been moved or added to update the layout. Definition at line 647 of file container.cpp. |
|
Sets the Form which this Container belongs to.
Definition at line 142 of file container.cpp. |
|
Layout functions. Sets this Container to use type of layout. The widget are inserted automatically in the layout following their positions.
Definition at line 592 of file container.cpp. |
|
Sets the margin of this Container.
Definition at line 125 of file container.h. |
|
Sets the spacing of this Container.
Definition at line 122 of file container.h. |
|
Sets the ObjectTree of this Container. Definition at line 102 of file container.h. |
|
Sets selected to be the selected widget of this container (and so of the 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. If dontRaise is true, then the widget selected (and its parent) won't be raised (eg when you select widget in ObjectTreeView).
Definition at line 539 of file container.cpp. |
|
Stops the inline editing of the current widget (as when you click on another widget or press Esc). Definition at line 135 of file container.h. |
|
Definition at line 932 of file container.cpp. |
|
Definition at line 563 of file container.cpp. |
|
Unselects the widget w. The widget is removed from the Form's list and its resizeHandles are removed. Definition at line 554 of file container.cpp. |
|
Definition at line 92 of file container.h. |
|
This slot is called when the watched widget is deleted. Deletes the Container too. Definition at line 583 of file container.cpp. |
The documentation for this class was generated from the following files: