Eneboo - Documentación para desarrolladores
Tipos públicos | Métodos públicos estáticos | Amigas
Referencia de la Clase WidgetFactory

Set of static functions for creating widgets, layouts and do other stuff. Más...

#include <widgetfactory.h>

Diagrama de herencias de WidgetFactory
Qt

Lista de todos los miembros.

Tipos públicos

enum  LayoutType { HBox, VBox, Grid, NoLayout }

Métodos públicos estáticos

static QWidgetcreate (int id, QWidget *parent, const char *name=0, bool init=TRUE, const QRect *rect=0, Qt::Orientation orient=Qt::Horizontal)
static QLayoutcreateLayout (QWidget *widget, QLayout *layout, LayoutType type)
static void deleteLayout (QWidget *widget)
static LayoutType layoutType (QWidget *w)
static LayoutType layoutType (QWidget *w, QLayout *&layout)
static LayoutType layoutType (QLayout *layout)
static QWidgetlayoutParent (QLayout *layout)
static QWidgetcontainerOfWidget (QWidget *w)
static QWidgetwidgetOfContainer (QWidget *w)
static bool isPassiveInteractor (QObject *o)
static const char * classNameOf (QObject *o)
static void initChangedProperties (QObject *o)
static bool hasSpecialEditor (int id, QObject *editorWidget)
static bool hasItems (int id, QObject *editorWidget)
static void editWidget (int id, QWidget *parent, QWidget *editWidget, FormWindow *fw)
static bool canResetProperty (QObject *w, const QString &propName)
static bool resetProperty (QObject *w, const QString &propName)
static QVariant defaultValue (QObject *w, const QString &propName)
static QString defaultCurrentItem (QObject *w, const QString &propName)
static QVariant property (QObject *w, const char *name)
static void saveDefaultProperties (QObject *w, int id)
static void saveChangedProperties (QObject *w, int id)
static QString defaultSignal (QObject *w)

Amigas

class CustomWidgetFactory

Descripción detallada

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.


Documentación de las enumeraciones miembro de la clase

Valores de enumeraciones:
HBox 
VBox 
Grid 
NoLayout 

Documentación de las funciones miembro

bool WidgetFactory::canResetProperty ( QObject w,
const QString propName 
) [static]
const char * WidgetFactory::classNameOf ( QObject o) [static]

Returns the class name of object o that should be used for externally (i.e. for saving)

QWidget * WidgetFactory::containerOfWidget ( QWidget w) [static]

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.

QString WidgetFactory::defaultCurrentItem ( QObject w,
const QString propName 
) [static]
QString WidgetFactory::defaultSignal ( QObject w) [static]
QVariant WidgetFactory::defaultValue ( QObject w,
const QString propName 
) [static]
void WidgetFactory::deleteLayout ( QWidget widget) [static]
void WidgetFactory::editWidget ( int  id,
QWidget parent,
QWidget editWidget,
FormWindow fw 
) [static]
bool WidgetFactory::hasItems ( int  id,
QObject editorWidget 
) [static]
bool WidgetFactory::hasSpecialEditor ( int  id,
QObject editorWidget 
) [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()!

bool WidgetFactory::isPassiveInteractor ( QObject o) [static]
QWidget * WidgetFactory::layoutParent ( QLayout layout) [static]
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.

QVariant WidgetFactory::property ( QObject w,
const char *  name 
) [static]
bool WidgetFactory::resetProperty ( QObject w,
const QString propName 
) [static]
void WidgetFactory::saveChangedProperties ( QObject w,
int  id 
) [static]
void WidgetFactory::saveDefaultProperties ( QObject w,
int  id 
) [static]
QWidget * WidgetFactory::widgetOfContainer ( QWidget w) [static]

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.)


Documentación de las funciones relacionadas y clases amigas

friend class CustomWidgetFactory [friend]

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'