Kexi API Documentation (2.0 alpha)

ContainerFactory Class Reference

#include <containerfactory.h>

Inheritance diagram for ContainerFactory:

KFormDesigner::WidgetFactory List of all members.

Detailed Description

Standard Factory for all container widgets.

Definition at line 173 of file containerfactory.h.

Public Slots

void addTabPage ()
void addStackPage ()
void renameTabPage ()
void removeTabPage ()
void removeStackPage ()
void prevStackPage ()
void nextStackPage ()
void reorderTabs (int oldpos, int newpos)

Public Member Functions

 ContainerFactory (QObject *parent, const char *name, const QStringList &args)
 ~ContainerFactory ()
virtual QWidgetcreateWidget (const QCString &classname, QWidget *parent, const char *name, KFormDesigner::Container *container, int options=DefaultOptions)
 Creates a widget (and if needed a KFormDesigner::Container).
virtual bool createMenuActions (const QCString &classname, QWidget *w, QPopupMenu *menu, KFormDesigner::Container *container)
virtual bool startEditing (const QCString &classname, QWidget *w, KFormDesigner::Container *container)
virtual bool previewWidget (const QCString &classname, QWidget *widget, KFormDesigner::Container *container)
virtual bool saveSpecialProperty (const QCString &classname, const QString &name, const QVariant &value, QWidget *w, QDomElement &parentNode, QDomDocument &parent)
virtual bool readSpecialProperty (const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item)
virtual QValueList< QCString > autoSaveProperties (const QCString &classname)

Protected Member Functions

virtual bool isPropertyVisibleInternal (const QCString &classname, QWidget *w, const QCString &property, bool isTopLevel)
virtual bool changeText (const QString &newText)
virtual void resizeEditor (QWidget *editor, QWidget *widget, const QCString &classname)


Constructor & Destructor Documentation

ContainerFactory::ContainerFactory QObject *  parent,
const char *  name,
const QStringList &  args
 

Todo:
horizontal/vertical splitter icons
Todo:
hflow icon
Todo:
vflow icon

Definition at line 310 of file containerfactory.cpp.

References KFormDesigner::WidgetInfo::addAlternateClassName(), KFormDesigner::WidgetFactory::addClass(), KFormDesigner::WidgetFactory::m_propDesc, KFormDesigner::WidgetFactory::m_propValDesc, KFormDesigner::WidgetInfo::setAutoSyncForProperty(), KFormDesigner::WidgetInfo::setClassName(), KFormDesigner::WidgetInfo::setDescription(), KFormDesigner::WidgetInfo::setIncludeFileName(), KFormDesigner::WidgetInfo::setName(), KFormDesigner::WidgetInfo::setNamePrefix(), KFormDesigner::WidgetInfo::setPixmap(), and KFormDesigner::WidgetInfo::setSavingName().

ContainerFactory::~ContainerFactory  ) 
 

Definition at line 884 of file containerfactory.cpp.


Member Function Documentation

void ContainerFactory::addStackPage  )  [slot]
 

Definition at line 833 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::m_container, and KFormDesigner::WidgetFactory::widget().

Referenced by createMenuActions(), and createWidget().

void ContainerFactory::addTabPage  )  [slot]
 

Definition at line 776 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::m_container, and KFormDesigner::WidgetFactory::widget().

Referenced by createMenuActions(), and createWidget().

QValueList< QCString > ContainerFactory::autoSaveProperties const QCString &  classname  )  [virtual]
 

You need to return here a list of the properties that should automatically be saved for a widget belonging to classname, and your custom properties (eg "text" for label or button, "contents" for combobox...).

Implements KFormDesigner::WidgetFactory.

Definition at line 720 of file containerfactory.cpp.

bool ContainerFactory::changeText const QString newText  )  [protected, virtual]
 

Default implementation changes "text" property. You have to reimplement this function for editing inside the Form to work if your widget's property you want to change isn't named "text". This slot is called when the line edit text changes, and you have to make it really change the good property of the widget using changeProperty() (text, or title, etc.).

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 760 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::changeProperty(), and KFormDesigner::WidgetFactory::m_container.

bool ContainerFactory::createMenuActions const QCString &  classname,
QWidget w,
QPopupMenu *  menu,
KFormDesigner::Container container
[virtual]
 

This function can be used to add custom items in widget w context menu menu.

Implements KFormDesigner::WidgetFactory.

Definition at line 601 of file containerfactory.cpp.

References addStackPage(), addTabPage(), KFormDesigner::Container::form(), KFormDesigner::WidgetFactory::m_container, nextStackPage(), prevStackPage(), removeStackPage(), removeTabPage(), renameTabPage(), KFormDesigner::WidgetFactory::setWidget(), and KFormDesigner::WidgetFactory::widget().

QWidget * ContainerFactory::createWidget const QCString &  classname,
QWidget parent,
const char *  name,
KFormDesigner::Container container,
int  options = DefaultOptions
[virtual]
 

Creates a widget (and if needed a KFormDesigner::Container).

Returns:
the created widget
Parameters:
classname the classname of the widget, which should get created
parent the parent for the created widget
name the name of the created widget
container the toplevel Container (if a container should get created)
options options for the created widget: orientation and view mode (see CreateWidgetOptions)

Implements KFormDesigner::WidgetFactory.

Definition at line 461 of file containerfactory.cpp.

References addStackPage(), addTabPage(), KFormDesigner::Container::form(), KFormDesigner::Container::objectTree(), reorderTabs(), and KFormDesigner::WidgetFactory::setWidget().

bool ContainerFactory::isPropertyVisibleInternal const QCString &  classname,
QWidget w,
const QCString &  property,
bool  isTopLevel
[protected, virtual]
 

This function is called when we want to know whether the property should be visible. Implement it in the factory; don't forget to call implementation in the superclass. Default implementation hides "caption", "icon", "sizeIncrement" and "iconText" properties.

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 731 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::m_showAdvancedProperties.

void ContainerFactory::nextStackPage  )  [slot]
 

Definition at line 876 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::widget().

Referenced by createMenuActions().

bool ContainerFactory::previewWidget const QCString &  classname,
QWidget widget,
KFormDesigner::Container container
[virtual]
 

Definition at line 576 of file containerfactory.cpp.

References KFormDesigner::Container::form(), and KFormDesigner::ObjectTreeItem::modifiedProperties().

void ContainerFactory::prevStackPage  )  [slot]
 

Definition at line 868 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::widget().

Referenced by createMenuActions().

bool ContainerFactory::readSpecialProperty const QCString &  classname,
QDomElement &  node,
QWidget w,
KFormDesigner::ObjectTreeItem item
[virtual]
 

Definition at line 695 of file containerfactory.cpp.

References KFormDesigner::ObjectTreeItem::addModifiedProperty(), KFormDesigner::ObjectTreeItem::parent(), and KFormDesigner::FormIO::readPropertyValue().

void ContainerFactory::removeStackPage  )  [slot]
 

Definition at line 847 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::m_container, and KFormDesigner::WidgetFactory::widget().

Referenced by createMenuActions().

void ContainerFactory::removeTabPage  )  [slot]
 

Definition at line 791 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::m_container, and KFormDesigner::WidgetFactory::widget().

Referenced by createMenuActions().

void ContainerFactory::renameTabPage  )  [slot]
 

Definition at line 805 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::widget().

Referenced by createMenuActions().

void ContainerFactory::reorderTabs int  oldpos,
int  newpos
[slot]
 

Definition at line 822 of file containerfactory.cpp.

References KFormDesigner::ObjectTreeItem::children(), and KFormDesigner::FormManager::self().

Referenced by createWidget().

void ContainerFactory::resizeEditor QWidget editor,
QWidget widget,
const QCString &  classname
[protected, virtual]
 

This function is called when the widget is resized, and the editor size needs to be updated.

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 767 of file containerfactory.cpp.

bool ContainerFactory::saveSpecialProperty const QCString &  classname,
const QString name,
const QVariant &  value,
QWidget w,
QDomElement &  parentNode,
QDomDocument &  parent
[virtual]
 

This function is called when FormIO finds a property, at save time, that it cannot handle (ie not a normal property). This way you can save special properties, for example the contents of a listbox.

See also:
readSpecialProperty()

Reimplemented from KFormDesigner::WidgetFactory.

Definition at line 677 of file containerfactory.cpp.

References KFormDesigner::FormIO::savePropertyElement().

bool ContainerFactory::startEditing const QCString &  classname,
QWidget w,
KFormDesigner::Container container
[virtual]
 

Definition at line 656 of file containerfactory.cpp.

References KFormDesigner::WidgetFactory::createEditor(), and KFormDesigner::WidgetFactory::m_container.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for Kexi 2.0 alpha.
Documentation copyright © 2002-2007 the Kexi Team.
Generated on Tue Apr 1 20:49:52 2008 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003