#include <widgetlibrary.h>
Inherits TQObject.
Signals | |
| void | prepareInsert (const TQCString &c) |
| void | widgetCreated (TQWidget *widget) |
Public Member Functions | |
| WidgetLibrary (TQObject *parent=0, const TQStringList &supportedFactoryGroups=TQStringList()) | |
| ActionList | createWidgetActions (KXMLGUIClient *client, TDEActionCollection *parent, TQObject *receiver, const char *slot) |
| void | addCustomWidgetActions (TDEActionCollection *col) |
| TQWidget * | createWidget (const TQCString &classname, TQWidget *parent, const char *name, Container *c, int options=WidgetFactory::DefaultOptions) |
| bool | createMenuActions (const TQCString &c, TQWidget *w, TQPopupMenu *menu, KFormDesigner::Container *container) |
| WidgetFactory::CreateWidgetOptions | showOrientationSelectionPopup (const TQCString &classname, TQWidget *parent, const TQPoint &pos) |
| TQString | internalProperty (const TQCString &classname, const TQCString &property) |
| TQString | displayName (const TQCString &classname) |
| TQString | namePrefix (const TQCString &classname) |
| TQString | textForWidgetName (const TQCString &name, const TQCString &className) |
| TQCString | classNameForAlternate (const TQCString &classname) |
| TQString | iconName (const TQCString &classname) |
| TQString | includeFileName (const TQCString &classname) |
| TQString | savingName (const TQCString &classname) |
| bool | startEditing (const TQCString &classname, TQWidget *w, Container *container) |
| bool | previewWidget (const TQCString &classname, TQWidget *widget, Container *container) |
| bool | clearWidgetContent (const TQCString &classname, TQWidget *w) |
| bool | saveSpecialProperty (const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, TQDomElement &parentNode, TQDomDocument &parent) |
| bool | readSpecialProperty (const TQCString &classname, TQDomElement &node, TQWidget *w, ObjectTreeItem *item) |
| bool | isPropertyVisible (const TQCString &classname, TQWidget *w, const TQCString &property, bool multiple=false, bool isTopLevel=false) |
| TQValueList< TQCString > | autoSaveProperties (const TQCString &classname) |
| WidgetInfo * | widgetInfoForClassName (const char *classname) |
| WidgetFactory * | factoryForClassName (const char *className) |
| WidgetFactory * | factory (const char *factoryName) const |
| bool | advancedPropertiesVisible () const |
| void | setAdvancedPropertiesVisible (bool set) |
| TQString | propertyDescForName (WidgetInfo *winfo, const TQCString &propertyName) |
| TQString | propertyDescForValue (WidgetInfo *winfo, const TQCString &name) |
| void | setPropertyOptions (WidgetPropertySet &list, const WidgetInfo &winfo, TQWidget *w) |
| bool | propertySetShouldBeReloadedAfterPropertyChange (const TQCString &classname, TQWidget *w, const TQCString &property) |
Protected Member Functions | |
| void | loadFactoryWidgets (WidgetFactory *f) |
| void | lookupFactories () |
| void | loadFactories () |
Protected Attributes | |
| WidgetLibraryPrivate * | d |
Detailed Description
This class searches for factories and provides TDEActions for widget creation.
Every widget can be located using this library. You call WidgetLibrary functions instead of calling directly factories. See WidgetFactory for a description of the functions.
Definition at line 56 of file widgetlibrary.h.
Constructor & Destructor Documentation
◆ WidgetLibrary()
| WidgetLibrary::WidgetLibrary | ( | TQObject * | parent = 0, |
| const TQStringList & | supportedFactoryGroups = TQStringList() |
||
| ) |
Constructs WidgetLibrary object. In supportedFactoryGroups you can provide factory group list to be supported. Factory groups are defined by "X-KFormDesigner-FactoryGroup" field in every factory serviece's .desktop file. By default (when supportedFactoryGroups is empty) only factories having empty "X-KFormDesigner-FactoryGroup" field will be loaded. Factory group names are case-insensitive.
Definition at line 110 of file widgetlibrary.cpp.
◆ ~WidgetLibrary()
|
virtual |
Definition at line 122 of file widgetlibrary.cpp.
Member Function Documentation
◆ addCustomWidgetActions()
| void WidgetLibrary::addCustomWidgetActions | ( | TDEActionCollection * | col | ) |
Definition at line 351 of file widgetlibrary.cpp.
◆ advancedPropertiesVisible()
| bool WidgetLibrary::advancedPropertiesVisible | ( | ) | const |
- Returns
- true if advanced properties like "mouseTracking" should be user-visible. True by default (in KFD), but Kexi set's this to false. See WidgetLibraryPrivate class implementation for complete list of advanced properties.
Definition at line 574 of file widgetlibrary.cpp.
◆ autoSaveProperties()
| TQValueList< TQCString > WidgetLibrary::autoSaveProperties | ( | const TQCString & | classname | ) |
Definition at line 613 of file widgetlibrary.cpp.
◆ classNameForAlternate()
| TQCString WidgetLibrary::classNameForAlternate | ( | const TQCString & | classname | ) |
Checks if the classname is an alternate classname, and returns the good classname. If classname is not alternate, classname is returned.
Definition at line 501 of file widgetlibrary.cpp.
◆ clearWidgetContent()
| bool WidgetLibrary::clearWidgetContent | ( | const TQCString & | classname, |
| TQWidget * | w | ||
| ) |
Definition at line 437 of file widgetlibrary.cpp.
◆ createMenuActions()
| bool WidgetLibrary::createMenuActions | ( | const TQCString & | c, |
| TQWidget * | w, | ||
| TQPopupMenu * | menu, | ||
| KFormDesigner::Container * | container | ||
| ) |
Definition at line 385 of file widgetlibrary.cpp.
◆ createWidget()
| TQWidget * WidgetLibrary::createWidget | ( | const TQCString & | classname, |
| TQWidget * | parent, | ||
| const char * | name, | ||
| Container * | c, | ||
| int | options = WidgetFactory::DefaultOptions |
||
| ) |
searches the right factory and creates a widget.
- Returns
- the widget or 0 if something falid
Definition at line 362 of file widgetlibrary.cpp.
◆ createWidgetActions()
| ActionList WidgetLibrary::createWidgetActions | ( | KXMLGUIClient * | client, |
| TDEActionCollection * | parent, | ||
| TQObject * | receiver, | ||
| const char * | slot | ||
| ) |
creates actions for widget creating
Definition at line 322 of file widgetlibrary.cpp.
◆ displayName()
| TQString WidgetLibrary::displayName | ( | const TQCString & | classname | ) |
Definition at line 453 of file widgetlibrary.cpp.
◆ factory()
| WidgetFactory * WidgetLibrary::factory | ( | const char * | factoryName | ) | const |
Definition at line 690 of file widgetlibrary.cpp.
◆ factoryForClassName()
| WidgetFactory * WidgetLibrary::factoryForClassName | ( | const char * | className | ) |
Definition at line 635 of file widgetlibrary.cpp.
◆ iconName()
| TQString WidgetLibrary::iconName | ( | const TQCString & | classname | ) |
Definition at line 528 of file widgetlibrary.cpp.
◆ includeFileName()
| TQString WidgetLibrary::includeFileName | ( | const TQCString & | classname | ) |
Definition at line 517 of file widgetlibrary.cpp.
◆ internalProperty()
| TQString WidgetLibrary::internalProperty | ( | const TQCString & | classname, |
| const TQCString & | property | ||
| ) |
Definition at line 695 of file widgetlibrary.cpp.
◆ isPropertyVisible()
| bool WidgetLibrary::isPropertyVisible | ( | const TQCString & | classname, |
| TQWidget * | w, | ||
| const TQCString & | property, | ||
| bool | multiple = false, |
||
| bool | isTopLevel = false |
||
| ) |
Definition at line 580 of file widgetlibrary.cpp.
◆ loadFactories()
|
protected |
Loads widget factories found in lookupFactories().
This is called once.
- Todo:
- improve
Definition at line 231 of file widgetlibrary.cpp.
◆ loadFactoryWidgets()
|
protected |
Adds a factory to the library, creates actions for widgets in the added factory.
This function is not called directly but by the factory locater.
Definition at line 128 of file widgetlibrary.cpp.
◆ lookupFactories()
|
protected |
Lookups widget factories list (note that this function get called once in ctor)
Definition at line 196 of file widgetlibrary.cpp.
◆ namePrefix()
| TQString WidgetLibrary::namePrefix | ( | const TQCString & | classname | ) |
Definition at line 476 of file widgetlibrary.cpp.
◆ previewWidget()
| bool WidgetLibrary::previewWidget | ( | const TQCString & | classname, |
| TQWidget * | widget, | ||
| Container * | container | ||
| ) |
Definition at line 421 of file widgetlibrary.cpp.
◆ propertyDescForName()
| TQString WidgetLibrary::propertyDescForName | ( | WidgetInfo * | winfo, |
| const TQCString & | propertyName | ||
| ) |
- Returns
- The i18n'ed name of the property propertyName for a class described by winfo. The name can be displayed in PropertyEditor. The name is retrieved from class' widget library. If this library doesn't define description for such property, and there is a parent library for winfo defined, parent library is asked for returning description string. Eventually, if even this failed, empty string is returned.
Definition at line 641 of file widgetlibrary.cpp.
◆ propertyDescForValue()
| TQString WidgetLibrary::propertyDescForValue | ( | WidgetInfo * | winfo, |
| const TQCString & | name | ||
| ) |
- Returns
- The i18n'ed name of the property's value whose name is name. Works in the same way as propertyDescForName(): if actual library does not define a description we are looking for, parent factory is asked to return such description. Eventually, if even this failed, empty string is returned.
Definition at line 659 of file widgetlibrary.cpp.
◆ propertySetShouldBeReloadedAfterPropertyChange()
| bool WidgetLibrary::propertySetShouldBeReloadedAfterPropertyChange | ( | const TQCString & | classname, |
| TQWidget * | w, | ||
| const TQCString & | property | ||
| ) |
- Returns
- true if property sets should be reloaded for property property, classname class and widget w when a given property value changed.
Definition at line 760 of file widgetlibrary.cpp.
◆ readSpecialProperty()
| bool WidgetLibrary::readSpecialProperty | ( | const TQCString & | classname, |
| TQDomElement & | node, | ||
| TQWidget * | w, | ||
| ObjectTreeItem * | item | ||
| ) |
Definition at line 555 of file widgetlibrary.cpp.
◆ saveSpecialProperty()
| bool WidgetLibrary::saveSpecialProperty | ( | const TQCString & | classname, |
| const TQString & | name, | ||
| const TQVariant & | value, | ||
| TQWidget * | w, | ||
| TQDomElement & | parentNode, | ||
| TQDomDocument & | parent | ||
| ) |
Definition at line 539 of file widgetlibrary.cpp.
◆ savingName()
| TQString WidgetLibrary::savingName | ( | const TQCString & | classname | ) |
Definition at line 464 of file widgetlibrary.cpp.
◆ setAdvancedPropertiesVisible()
| void WidgetLibrary::setAdvancedPropertiesVisible | ( | bool | set | ) |
Sets advanced properties to be visible or not.
Definition at line 569 of file widgetlibrary.cpp.
◆ setPropertyOptions()
| void WidgetLibrary::setPropertyOptions | ( | WidgetPropertySet & | list, |
| const WidgetInfo & | winfo, | ||
| TQWidget * | w | ||
| ) |
Used by WidgetPropertySet::setWidget() after creating properties.
Definition at line 677 of file widgetlibrary.cpp.
◆ showOrientationSelectionPopup()
| WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup | ( | const TQCString & | classname, |
| TQWidget * | parent, | ||
| const TQPoint & | pos | ||
| ) |
Shows orientation selection popup.
- Returns
- one of the following values:
- WidgetFactory::AnyQt::Orientation (means no selection has been made, i.e. it was cancelled)
- WidgetFactory::HorizontalQt::Orientation
- WidgetFactory::VerticalQt::Orientation
Definition at line 707 of file widgetlibrary.cpp.
◆ startEditing()
| bool WidgetLibrary::startEditing | ( | const TQCString & | classname, |
| TQWidget * | w, | ||
| Container * | container | ||
| ) |
Definition at line 405 of file widgetlibrary.cpp.
◆ textForWidgetName()
Definition at line 487 of file widgetlibrary.cpp.
◆ widgetCreated
|
signal |
Received by KexiFormPart::slotWidgetCreatedByFormsLibrary() so we can add drag/drop connection for the new widget.
◆ widgetInfoForClassName()
| WidgetInfo * WidgetLibrary::widgetInfoForClassName | ( | const char * | classname | ) |
Definition at line 628 of file widgetlibrary.cpp.
Member Data Documentation
◆ d
|
protected |
Definition at line 209 of file widgetlibrary.h.
The documentation for this class was generated from the following files:
