KFormDesigner::WidgetPropertySet Class Reference
#include <widgetpropertyset.h>
Public Slots | |
| void | setSelectedWidget (QWidget *w, bool add=false, bool forceReload=false, bool moreWillBeSelected=false) |
| void | setSelectedWidgetWithoutReload (QWidget *w, bool add=false, bool moreWillBeSelected=false) |
| void | slotPropertyChanged (KoProperty::Set &set, KoProperty::Property &property) |
| void | slotPropertyReset (KoProperty::Set &set, KoProperty::Property &property) |
| void | slotWidgetDestroyed () |
| void | createPropertyCommandsInDesignMode (QWidget *widget, const QMap< QCString, QVariant > &propValues, CommandGroup *group, bool addToActiveForm=true, bool execFlagForSubCommands=false) |
Signals | |
| void | widgetPropertyChanged (QWidget *w, const QCString &property, const QVariant &v) |
| void | widgetNameChanged (const QCString &oldname, const QCString &newname) |
Public Member Functions | |
| WidgetPropertySet (QObject *parent) | |
| ~WidgetPropertySet () | |
| KoProperty::Property & | operator[] (const QCString &name) |
| KoProperty::Property & | property (const QCString &name) |
| bool | contains (const QCString &property) |
| void | addPropertyCaption (const QCString &property, const QString &caption) |
| void | addValueCaption (const QCString &value, const QString &caption) |
Protected Member Functions | |
| void | addWidget (QWidget *w) |
| void | createPropertiesForWidget (QWidget *w) |
| KoProperty::Property::ListData * | createValueList (WidgetInfo *winfo, const QStringList &list) |
| void | updatePropertyValue (ObjectTreeItem *tree, const char *property, const QMetaProperty *meta=0) |
| KoProperty::Set * | set () |
| void | clearSet (bool dontSignalShowPropertySet=false) |
| void | saveModifiedProperties () |
| bool | isNameValid (const QString &name) |
| void | saveEnabledProperty (bool value) |
| bool | eventFilter (QObject *o, QEvent *ev) |
| void | setUndoing (bool isUndoing) |
| bool | isUndoing () |
| bool | isPropertyVisible (const QCString &property, bool isTopLevel, const QCString &classname=QCString()) |
| void | createAlignProperty (const QMetaProperty *meta, QWidget *widget, QWidget *subwidget) |
| void | saveAlignProperty (const QString &property) |
| void | createLayoutProperty (ObjectTreeItem *item) |
| void | saveLayoutProperty (const QString &property, const QVariant &value) |
| void | initPropertiesDescription () |
| Adds translations for general properties, by adding items in d->propDesc. | |
| QString | propertyCaption (const QCString &name) |
| QString | valueCaption (const QCString &name) |
| void | emitWidgetPropertyChanged (QWidget *w, const QCString &property, const QVariant &value) |
| Helper. | |
Friends | |
| class | FormManager |
| class | PropertyCommand |
| class | LayoutPropertyCommand |
| class | GeometryPropertyCommand |
Constructor & Destructor Documentation
|
|
Definition at line 91 of file widgetpropertyset.cpp. References initPropertiesDescription(), slotPropertyChanged(), and slotPropertyReset(). |
|
|
Definition at line 105 of file widgetpropertyset.cpp. |
Member Function Documentation
|
||||||||||||
|
i18n function used by factories to add new property caption. Should be called on Factory creation. Definition at line 1108 of file widgetpropertyset.cpp. |
|
||||||||||||
|
Definition at line 1115 of file widgetpropertyset.cpp. |
|
|
Adds the widget in d->widgets, and updates property visibilty. Definition at line 227 of file widgetpropertyset.cpp. References isPropertyVisible(), and KFormDesigner::FormManager::self(). Referenced by setSelectedWidget(). |
|
|
Clears the set, and reset all members. Definition at line 141 of file widgetpropertyset.cpp. References saveModifiedProperties(), and KFormDesigner::FormManager::self(). Referenced by setSelectedWidget(), and slotWidgetDestroyed(). |
|
|
||||||||||||||||
|
Creates the properties related to alignment (ie hAlign, vAlign and WordBreak) for the QWidget widget. subwidget is the same as widget if the widget itself handles the property and it's a child widget if the child handles the property. For example, the second case is true for KexiDBAutoField. meta is the QMetaProperty for "alignment" property" of subwidget. Definition at line 770 of file widgetpropertyset.cpp. References createValueList(), isPropertyVisible(), KFormDesigner::FormManager::self(), and updatePropertyValue(). Referenced by createPropertiesForWidget(). |
|
|
Creates the "layout" property, for the Container representing item. Definition at line 893 of file widgetpropertyset.cpp. References createValueList(), KFormDesigner::Container::form(), KFormDesigner::Container::layoutMargin(), KFormDesigner::Container::layoutSpacing(), KFormDesigner::Container::layoutType(), KFormDesigner::Container::layoutTypeToString(), KFormDesigner::Container::NoLayout, KFormDesigner::FormManager::self(), updatePropertyValue(), and KFormDesigner::Container::widget(). Referenced by createPropertiesForWidget(). |
|
|
Fills the list with properties related to the widget w. Also updates properties old value and changed state. Definition at line 264 of file widgetpropertyset.cpp. References KFormDesigner::ObjectTreeItem::container(), createAlignProperty(), createLayoutProperty(), createValueList(), KFormDesigner::WidgetWithSubpropertiesInterface::findMetaSubproperty(), foreach, KFormDesigner::ObjectTreeItem::isEnabled(), isPropertyVisible(), KFormDesigner::Form::library(), KFormDesigner::ObjectTreeItem::modifiedProperties(), KFormDesigner::Form::objectTree(), KFormDesigner::FormManager::self(), KFormDesigner::WidgetWithSubpropertiesInterface::subproperies(), KFormDesigner::WidgetWithSubpropertiesInterface::subwidget(), and updatePropertyValue(). Referenced by setSelectedWidget(). |
|
||||||||||||||||||||||||
|
||||||||||||
|
Creates a map property description->prop. value from the list of keys list. Definition at line 1083 of file widgetpropertyset.cpp. References KFormDesigner::FormManager::self(). Referenced by createAlignProperty(), createLayoutProperty(), and createPropertiesForWidget(). |
|
||||||||||||||||
|
Helper.
Definition at line 581 of file widgetpropertyset.cpp. References KFormDesigner::Form::library(), KFormDesigner::FormManager::self(), setSelectedWidget(), and widgetPropertyChanged(). Referenced by slotPropertyChanged(). |
|
||||||||||||
|
This function filters the event of the selected widget to automatically updates the "geometry" property when the widget is moved or resized in the Form. Definition at line 733 of file widgetpropertyset.cpp. References foreach, GeometryPropertyCommand, and KFormDesigner::FormManager::self(). |
|
|
Adds translations for general properties, by adding items in d->propDesc.
Definition at line 993 of file widgetpropertyset.cpp. Referenced by WidgetPropertySet(). |
|
|
Checks if the name entered by user is valid, ie that it is a valid identifier, and that there is no name conflict. Definition at line 672 of file widgetpropertyset.cpp. References KexiUtils::isIdentifier(), and KFormDesigner::FormManager::self(). Referenced by slotPropertyChanged(). |
|
||||||||||||||||
|
This function is used to filter the properties to be shown (ie not show "caption" if the widget isn't toplevel).
Definition at line 434 of file widgetpropertyset.cpp. References KFormDesigner::WidgetWithSubpropertiesInterface::findMetaSubproperty(), KFormDesigner::FormManager::self(), and KFormDesigner::WidgetWithSubpropertiesInterface::subwidget(). Referenced by addWidget(), createAlignProperty(), and createPropertiesForWidget(). |
|
|
Definition at line 182 of file widgetpropertyset.cpp. |
|
|
Definition at line 117 of file widgetpropertyset.cpp. |
|
|
Definition at line 123 of file widgetpropertyset.cpp. Referenced by KFormDesigner::FormManager::changeFont(), KexiFormPart::slotAssignAction(), and slotPropertyChanged(). |
|
|
Definition at line 1071 of file widgetpropertyset.cpp. |
|
|
Saves the properties related to alignment (ie hAlign, vAlign and WordBreak) and modifies the "alignment" property of the widget. Definition at line 853 of file widgetpropertyset.cpp. References KFormDesigner::ObjectTreeItem::addModifiedProperty(), PropertyCommand, KFormDesigner::FormManager::self(), and KFormDesigner::WidgetWithSubpropertiesInterface::subwidget(). Referenced by slotPropertyChanged(). |
|
|
Saves 'enabled' property, and takes care of updating widget's palette. Definition at line 642 of file widgetpropertyset.cpp. References foreach, KFormDesigner::ObjectTreeItem::isEnabled(), KFormDesigner::FormManager::self(), KFormDesigner::ObjectTreeItem::setEnabled(), and widgetPropertyChanged(). Referenced by slotPropertyChanged(). |
|
||||||||||||
|
Saves the "layout" property and changes the Container 's layout ( using Container::setLayout() ). Definition at line 932 of file widgetpropertyset.cpp. References KFormDesigner::ObjectTreeItem::addModifiedProperty(), KFormDesigner::ObjectTreeItem::container(), KFormDesigner::Container::layout(), LayoutPropertyCommand, KFormDesigner::Container::NoLayout, PropertyCommand, KFormDesigner::FormManager::self(), KFormDesigner::Container::setLayout(), KFormDesigner::Container::setLayoutMargin(), KFormDesigner::Container::setLayoutSpacing(), and KFormDesigner::Container::stringToLayoutType(). Referenced by slotPropertyChanged(). |
|
|
Saves old values of modified properties in ObjectTreeItem, so that we can restore them later. Definition at line 160 of file widgetpropertyset.cpp. References KFormDesigner::ObjectTreeItem::addModifiedProperty(), and KFormDesigner::FormManager::self(). Referenced by clearSet(). |
|
|
Definition at line 135 of file widgetpropertyset.cpp. Referenced by KFormDesigner::FormManager::setEditor(). |
|
||||||||||||||||||||
|
Sets the widget which properties are shown in the property editor. If add is true, the list switch to multiple widget mode (only common properties are shown). Should be directly connected to Form::widgetSelected() signal. If forceReload is true, the the properties will be redisplayed in the property editor even if these were already displayed. If showPropertySet is true (the default), property editor will be updated for the current selection. This flag is set to false when we're selecting multiple widgets. Definition at line 190 of file widgetpropertyset.cpp. References addWidget(), clearSet(), createPropertiesForWidget(), KFormDesigner::FormManager::self(), and slotWidgetDestroyed(). Referenced by emitWidgetPropertyChanged(). |
|
||||||||||||||||
|
Definition at line 75 of file widgetpropertyset.h. |
|
|
Changes undoing state of the list. Used by Undo command to prevent recursion. Definition at line 176 of file widgetpropertyset.cpp. Referenced by KFormDesigner::GeometryPropertyCommand::execute(), KFormDesigner::PropertyCommand::execute(), KFormDesigner::GeometryPropertyCommand::unexecute(), and KFormDesigner::PropertyCommand::unexecute(). |
|
||||||||||||
|
This function is called every time a property is modifed. It also takes care of saving set and enum properties. Definition at line 479 of file widgetpropertyset.cpp. References KFormDesigner::ObjectTreeItem::addModifiedProperty(), emitWidgetPropertyChanged(), foreach, isNameValid(), property(), PropertyCommand, saveAlignProperty(), saveEnabledProperty(), saveLayoutProperty(), KFormDesigner::FormManager::self(), and widgetNameChanged(). Referenced by WidgetPropertySet(). |
|
||||||||||||
|
This slot is called when a property is reset using the "reload" button in PropertyEditor. Definition at line 703 of file widgetpropertyset.cpp. References foreach, KFormDesigner::ObjectTreeItem::modifiedProperties(), and KFormDesigner::FormManager::self(). Referenced by WidgetPropertySet(). |
|
|
This slot is called when the watched widget is destroyed. Resets the buffer. Definition at line 720 of file widgetpropertyset.cpp. References clearSet(), and foreach. Referenced by setSelectedWidget(). |
|
||||||||||||||||
|
Changes property old value and changed state, using the value stored in tree. Optional meta can be specified if you need to handle enum values. Definition at line 411 of file widgetpropertyset.cpp. References KFormDesigner::ObjectTreeItem::modifiedProperties(). Referenced by createAlignProperty(), createLayoutProperty(), and createPropertiesForWidget(). |
|
|
Definition at line 1077 of file widgetpropertyset.cpp. |
|
||||||||||||
|
This signal is emitted when the name of the widget is modified. oldname is the name of the widget before the change, newname is the name after renaming. Referenced by slotPropertyChanged(). |
|
||||||||||||||||
|
This signal is emitted when a property was changed. widg is the widget concerned, property is the name of the modified property, and v is the new value of this property. Referenced by createPropertyCommandsInDesignMode(), emitWidgetPropertyChanged(), and saveEnabledProperty(). |
Friends And Related Function Documentation
|
|
Definition at line 198 of file widgetpropertyset.h. |
|
|
Definition at line 201 of file widgetpropertyset.h. Referenced by eventFilter(). |
|
|
Definition at line 200 of file widgetpropertyset.h. Referenced by saveLayoutProperty(). |
|
|
Definition at line 199 of file widgetpropertyset.h. Referenced by createPropertyCommandsInDesignMode(), saveAlignProperty(), saveLayoutProperty(), and slotPropertyChanged(). |
The documentation for this class was generated from the following files:
