#include <stdwidgetfactory.h>
Public Slots | |
| void | editText () |
| void | editListContents () |
| Public Slots inherited from KFormDesigner::WidgetFactory | |
| void | resetEditor () |
Public Member Functions | |
| StdWidgetFactory (TQObject *parent, const char *name, const TQStringList &args) | |
| virtual TQWidget * | createWidget (const TQCString &c, TQWidget *p, const char *n, KFormDesigner::Container *container, int options=DefaultOptions) |
| virtual bool | createMenuActions (const TQCString &classname, TQWidget *w, TQPopupMenu *menu, KFormDesigner::Container *container) |
| virtual bool | startEditing (const TQCString &classname, TQWidget *w, KFormDesigner::Container *container) |
| virtual bool | previewWidget (const TQCString &classname, TQWidget *widget, KFormDesigner::Container *container) |
| virtual bool | clearWidgetContent (const TQCString &classname, TQWidget *w) |
| virtual bool | saveSpecialProperty (const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &parent) |
| virtual bool | readSpecialProperty (const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item) |
| virtual TQValueList< TQCString > | autoSaveProperties (const TQCString &classname) |
| virtual void | setPropertyOptions (KFormDesigner::WidgetPropertySet &buf, const KFormDesigner::WidgetInfo &info, TQWidget *w) |
| Public Member Functions inherited from KFormDesigner::WidgetFactory | |
| WidgetFactory (TQObject *parent=0, const char *name=0) | |
| void | addClass (WidgetInfo *w) |
| void | hideClass (const char *classname) |
| const WidgetInfo::Dict | classes () const |
| virtual void | createCustomActions (TDEActionCollection *col) |
| bool | isPropertyVisible (const TQCString &classname, TQWidget *w, const TQCString &property, bool multiple, bool isTopLevel) |
| TQString | propertyDescForName (const TQCString &name) |
| TQString | propertyDescForValue (const TQCString &name) |
| TQString | internalProperty (const TQCString &classname, const TQCString &property) const |
Protected Member Functions | |
| virtual bool | isPropertyVisibleInternal (const TQCString &classname, TQWidget *w, const TQCString &property, bool isTopLevel) |
| virtual bool | changeText (const TQString &newText) |
| virtual void | resizeEditor (TQWidget *editor, TQWidget *widget, const TQCString &classname) |
| void | saveListItem (TQListViewItem *item, TQDomNode &parentNode, TQDomDocument &domDoc) |
| void | readListItem (TQDomElement &node, TQListViewItem *parent, TDEListView *listview) |
| Protected Member Functions inherited from KFormDesigner::WidgetFactory | |
| virtual bool | propertySetShouldBeReloadedAfterPropertyChange (const TQCString &classname, TQWidget *w, const TQCString &property) |
| void | createEditor (const TQCString &classname, const TQString &text, TQWidget *w, Container *container, TQRect geometry, int align, bool useFrame=false, bool multiLine=false, BackgroundMode background=TQt::NoBackground) |
| void | disableFilter (TQWidget *w, Container *container) |
| bool | editList (TQWidget *w, TQStringList &list) |
| bool | editRichText (TQWidget *w, TQString &text) |
| void | editListView (TQListView *listview) |
| virtual bool | eventFilter (TQObject *obj, TQEvent *ev) |
| void | changeProperty (const char *name, const TQVariant &value, Form *form) |
| bool | inheritsFactories () |
| TQString | editorText () const |
| void | setEditorText (const TQString &text) |
| void | setEditor (TQWidget *widget, TQWidget *editor) |
| TQWidget * | editor (TQWidget *widget) const |
| void | setWidget (TQWidget *widget, Container *container) |
| TQWidget * | widget () const |
| void | setInternalProperty (const TQCString &classname, const TQCString &property, const TQString &value) |
Additional Inherited Members | |
| Public Types inherited from KFormDesigner::WidgetFactory | |
| enum | CreateWidgetOptions { AnyOrientation = 1 , HorizontalOrientation = 2 , VerticalOrientation = 4 , DesignViewMode = 8 , DefaultOptions = AnyOrientation | DesignViewMode } |
| Protected Slots inherited from KFormDesigner::WidgetFactory | |
| void | changeTextInternal (const TQString &text) |
| void | slotTextChanged () |
| void | editorDeleted () |
| void | widgetDestroyed () |
| Protected Attributes inherited from KFormDesigner::WidgetFactory | |
| WidgetLibrary * | m_library |
| TQCString | m_editedWidgetClass |
| TQString | m_firstText |
| TQGuardedPtr< ResizeHandleSet > | m_handles |
| TQGuardedPtr< Container > | m_container |
| WidgetInfo::Dict | m_classesByName |
| TQAsciiDict< char > * | m_hiddenClasses |
| TQMap< TQCString, TQString > | m_propDesc |
| TQMap< TQCString, TQString > | m_propValDesc |
| TQMap< TQCString, TQString > | m_internalProp |
| bool | m_showAdvancedProperties |
| TQString | m_xmlGUIFileName |
| KXMLGUIClient * | m_guiClient |
| TQGuardedPtr< TQWidget > | m_widget |
| TQGuardedPtr< TQWidget > | m_editor |
Detailed Description
Factory for all basic widgets, including Spring (not containers).
Definition at line 55 of file stdwidgetfactory.h.
Constructor & Destructor Documentation
◆ StdWidgetFactory()
| StdWidgetFactory::StdWidgetFactory | ( | TQObject * | parent, |
| const char * | name, | ||
| const TQStringList & | args ) |
- Todo
- TQt designer compatibility: maybe use this class when TQLabel has a pixmap set...?
Definition at line 96 of file stdwidgetfactory.cpp.
◆ ~StdWidgetFactory()
| StdWidgetFactory::~StdWidgetFactory | ( | ) |
Definition at line 361 of file stdwidgetfactory.cpp.
Member Function Documentation
◆ autoSaveProperties()
|
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 895 of file stdwidgetfactory.cpp.
◆ changeText()
|
protectedvirtual |
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 584 of file stdwidgetfactory.cpp.
◆ clearWidgetContent()
|
virtual |
Reimplemented from KFormDesigner::WidgetFactory.
Definition at line 566 of file stdwidgetfactory.cpp.
◆ createMenuActions()
|
virtual |
This function can be used to add custom items in widget w context menu menu.
Implements KFormDesigner::WidgetFactory.
Definition at line 455 of file stdwidgetfactory.cpp.
◆ createWidget()
|
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 366 of file stdwidgetfactory.cpp.
◆ editListContents
|
slot |
Definition at line 948 of file stdwidgetfactory.cpp.
◆ editText
|
slot |
Definition at line 928 of file stdwidgetfactory.cpp.
◆ isPropertyVisibleInternal()
|
protectedvirtual |
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.
- Todo
- reenable autoDefault / default if the top level window is dialog...
Reimplemented from KFormDesigner::WidgetFactory.
Definition at line 829 of file stdwidgetfactory.cpp.
◆ previewWidget()
|
virtual |
This function is called just before the Form is previewed. It allows widgets to make changes before switching (ie for a Spring, hiding the cross)
Implements KFormDesigner::WidgetFactory.
Definition at line 445 of file stdwidgetfactory.cpp.
◆ readListItem()
|
protected |
Definition at line 786 of file stdwidgetfactory.cpp.
◆ readSpecialProperty()
|
virtual |
This function is called when FormIO finds a property or an unknown element in a .ui file. You can this way load a special property, for example the contents of a listbox.
- See also
- saveSpecialProperty()
Reimplemented from KFormDesigner::WidgetFactory.
Definition at line 727 of file stdwidgetfactory.cpp.
◆ resizeEditor()
|
protectedvirtual |
This function is called when the widget is resized, and the editor size needs to be updated.
Reimplemented from KFormDesigner::WidgetFactory.
Definition at line 625 of file stdwidgetfactory.cpp.
◆ saveListItem()
|
protected |
Definition at line 708 of file stdwidgetfactory.cpp.
◆ saveSpecialProperty()
|
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 655 of file stdwidgetfactory.cpp.
◆ setPropertyOptions()
|
virtual |
This method is called after WidgetPropertySet was filled with properties of a widget w, of class defined by info. Default implementation does nothing. Implement this if you need to set options for properties within the set buf.
Reimplemented from KFormDesigner::WidgetFactory.
Definition at line 955 of file stdwidgetfactory.cpp.
◆ startEditing()
|
virtual |
Creates (if necessary) an editor to edit the contents of the widget directly in the Form (eg creates a line edit to change the text of a label). classname is the class the widget belongs to, w is the widget to edit and container is the parent container of this widget (to access Form etc.).
Implements KFormDesigner::WidgetFactory.
Definition at line 473 of file stdwidgetfactory.cpp.
The documentation for this class was generated from the following files:
