Eneboo - Documentación para desarrolladores
|
Set of static functions for creating widgets, layouts and do other stuff. Más...
#include <widgetfactory.h>
Set of static functions for creating widgets, layouts and do other stuff.
The widget factory offers functions to create widgets, create and delete layouts find out other details - all based on the WidgetDatabase's data. So the functions that use ids use the same ids as in the WidgetDatabase.
const char * WidgetFactory::classNameOf | ( | QObject * | o | ) | [static] |
Returns the class name of object o that should be used for externally (i.e. for saving)
Returns the widget into which children should be inserted when w is a container known to the designer.
Usually that is w itself, sometimes it is different (e.g. a tabwidget is known to the designer as a container but the child widgets should be inserted into the current page of the tabwidget. So in this case this function returns the current page of the tabwidget.)
QWidget * WidgetFactory::create | ( | int | id, |
QWidget * | parent, | ||
const char * | name = 0 , |
||
bool | init = TRUE , |
||
const QRect * | r = 0 , |
||
Qt::Orientation | orient = Qt::Horizontal |
||
) | [static] |
Creates a widget of the type which is registered as id as child of parent. The name is optional. If init is TRUE, the widget is initialized with some defaults, else the plain widget is created.
QLayout * WidgetFactory::createLayout | ( | QWidget * | widget, |
QLayout * | layout, | ||
LayoutType | type | ||
) | [static] |
Creates a layout on the widget widget of the type type which can be HBox
, VBox
or Grid
.
void WidgetFactory::deleteLayout | ( | QWidget * | widget | ) | [static] |
void WidgetFactory::editWidget | ( | int | id, |
QWidget * | parent, | ||
QWidget * | editWidget, | ||
FormWindow * | fw | ||
) | [static] |
void WidgetFactory::initChangedProperties | ( | QObject * | o | ) | [static] |
As some properties are set by default when creating a widget this functions markes this properties as changed. Has to be in sync with createWidget()!
WidgetFactory::LayoutType WidgetFactory::layoutType | ( | QWidget * | w | ) | [static] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
WidgetFactory::LayoutType WidgetFactory::layoutType | ( | QWidget * | w, |
QLayout *& | layout | ||
) | [static] |
Find out which type the layout of the widget is. Returns HBox
, VBox
, Grid
or NoLayout
. layout points to this QWidget::layout() of w or to 0 after the function call.
WidgetFactory::LayoutType WidgetFactory::layoutType | ( | QLayout * | layout | ) | [static] |
Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta.
Returns the actual designer widget of the container w. This is normally w itself, but might be a parent or grand parent of w (e.g. when working with a tabwidget and w is the container which contains and layouts childs, but the actual widget known to the designer is the tabwidget which is the parent of w. So this function returns the tabwidget then.)
friend class CustomWidgetFactory [friend] |