kexi
KFormDesigner::WidgetPropertySet Class Reference
List of all members.Detailed Description
Definition at line 41 of file widgetpropertyset.h.
Public Slots | |
void | setSelectedWidget (QWidget *w, bool add=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) |
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 *obj) |
void | saveAlignProperty (const QString &property) |
void | createLayoutProperty (ObjectTreeItem *item) |
void | saveLayoutProperty (const QString &property, const QVariant &value) |
void | initPropertiesDescription () |
QString | propertyCaption (const QCString &name) |
QString | valueCaption (const QCString &name) |
Friends | |
class | FormManager |
class | PropertyCommand |
class | LayoutPropertyCommand |
class | GeometryPropertyCommand |
Member Function Documentation
void WidgetPropertySet::addPropertyCaption | ( | const QCString & | property, | |
const QString & | caption | |||
) |
i18n function used by factories to add new property caption. Should be called on Factory creation.
Definition at line 1036 of file widgetpropertyset.cpp.
void WidgetPropertySet::addWidget | ( | QWidget * | w | ) | [protected] |
Adds the widget in d->widgets, and updates property visibilty.
Definition at line 218 of file widgetpropertyset.cpp.
void WidgetPropertySet::clearSet | ( | bool | dontSignalShowPropertySet = false |
) | [protected] |
Clears the set, and reset all members.
Definition at line 138 of file widgetpropertyset.cpp.
void WidgetPropertySet::createAlignProperty | ( | const QMetaProperty * | meta, | |
QWidget * | obj | |||
) | [protected] |
Creates the properties related to alignment (ie hAlign, vAlign and WordBreak) for the QWidget obj. meta is the QMetaProperty for "alignment" property".
Definition at line 706 of file widgetpropertyset.cpp.
void WidgetPropertySet::createLayoutProperty | ( | ObjectTreeItem * | item | ) | [protected] |
Creates the "layout" property, for the Container representing item.
Definition at line 821 of file widgetpropertyset.cpp.
void WidgetPropertySet::createPropertiesForWidget | ( | QWidget * | w | ) | [protected] |
Fills the list with properties related to the widget w. Also updates properties old value and changed state.
- Todo:
- add another list for property description
- Todo:
- change i18n
TMP
let's forget it for now, until we have new complete events editor if (m_manager->lib()->advancedPropertiesVisible()) { add the signals property QStrList strlist = w->metaObject()->signalNames(true); QStrListIterator strIt(strlist); QStringList list; for(; strIt.current() != 0; ++strIt) list.append(*strIt); Property *prop = new Property("signals", i18n("Events")"", new KexiProperty::ListData(list, descList(winfo, list)), )); }
Definition at line 249 of file widgetpropertyset.cpp.
KoProperty::Property::ListData * WidgetPropertySet::createValueList | ( | WidgetInfo * | winfo, | |
const QStringList & | list | |||
) | [protected] |
Creates a map property description->prop. value from the list of keys list.
Definition at line 1011 of file widgetpropertyset.cpp.
bool WidgetPropertySet::eventFilter | ( | QObject * | o, | |
QEvent * | ev | |||
) | [protected] |
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 669 of file widgetpropertyset.cpp.
void WidgetPropertySet::initPropertiesDescription | ( | ) | [protected] |
Adds translations for general properties, by adding items in d->propDesc.
- Todo:
- perhaps a few of them shouldn't be translated within KFD mode, to be more Qt Designer friendly?
Definition at line 921 of file widgetpropertyset.cpp.
bool WidgetPropertySet::isNameValid | ( | const QString & | name | ) | [protected] |
Checks if the name entered by user is valid, ie that it is a valid identifier, and that there is no name conflict.
- Todo:
- add to undo buffer
Definition at line 608 of file widgetpropertyset.cpp.
bool WidgetPropertySet::isPropertyVisible | ( | const QCString & | property, | |
bool | isTopLevel, | |||
const QCString & | classname = QCString() | |||
) | [protected] |
This function is used to filter the properties to be shown (ie not show "caption" if the widget isn't toplevel).
- Returns:
- true if the property should be shown. False otherwise.
Definition at line 395 of file widgetpropertyset.cpp.
QString WidgetPropertySet::propertyCaption | ( | const QCString & | name | ) | [protected] |
- Returns:
- The i18n'ed name of the property whose name is name, that will be displayed in PropertyEditor.
Definition at line 999 of file widgetpropertyset.cpp.
void WidgetPropertySet::saveAlignProperty | ( | const QString & | property | ) | [protected] |
Saves the properties related to alignment (ie hAlign, vAlign and WordBreak) and modifies the "alignment" property of the widget.
Definition at line 784 of file widgetpropertyset.cpp.
void WidgetPropertySet::saveEnabledProperty | ( | bool | value | ) | [protected] |
Saves 'enabled' property, and takes care of updating widget's palette.
Definition at line 578 of file widgetpropertyset.cpp.
void WidgetPropertySet::saveLayoutProperty | ( | const QString & | property, | |
const QVariant & | value | |||
) | [protected] |
Saves the "layout" property and changes the Container 's layout ( using Container::setLayout() ).
Definition at line 860 of file widgetpropertyset.cpp.
void WidgetPropertySet::saveModifiedProperties | ( | ) | [protected] |
Saves old values of modified properties in ObjectTreeItem, so that we can restore them later.
Definition at line 157 of file widgetpropertyset.cpp.
KoProperty::Set * WidgetPropertySet::set | ( | ) | [protected] |
- Returns:
- the property list hold by this object. Do not modify the list, just use this method to change Editor's list.
Definition at line 132 of file widgetpropertyset.cpp.
void WidgetPropertySet::setSelectedWidget | ( | QWidget * | w, | |
bool | add = false | |||
) | [slot] |
Sets the widget which property are shown in the list. If add is true, the list switch to multiple widget mode (only common properties are shown). Should be directly connected to Form::widgetSelected() signal.
Definition at line 187 of file widgetpropertyset.cpp.
void WidgetPropertySet::setUndoing | ( | bool | isUndoing | ) | [protected] |
Changes undoing state of the list. Used by Undo command to prevent recursion.
Definition at line 173 of file widgetpropertyset.cpp.
void WidgetPropertySet::slotPropertyChanged | ( | KoProperty::Set & | set, | |
KoProperty::Property & | property | |||
) | [slot] |
This function is called every time a property is modifed. It also takes care of saving set and enum properties.
Definition at line 432 of file widgetpropertyset.cpp.
void WidgetPropertySet::slotPropertyReset | ( | KoProperty::Set & | set, | |
KoProperty::Property & | property | |||
) | [slot] |
This slot is called when a property is reset using the "reload" button in PropertyEditor.
Definition at line 639 of file widgetpropertyset.cpp.
void WidgetPropertySet::slotWidgetDestroyed | ( | ) | [slot] |
This slot is called when the watched widget is destroyed. Resets the buffer.
Definition at line 656 of file widgetpropertyset.cpp.
void WidgetPropertySet::updatePropertyValue | ( | ObjectTreeItem * | tree, | |
const char * | property | |||
) | [protected] |
Changes property old value and changed state, using the value stored in tree.
- Todo:
- what about set properties, and lists properties
Definition at line 378 of file widgetpropertyset.cpp.
QString WidgetPropertySet::valueCaption | ( | const QCString & | name | ) | [protected] |
- Returns:
- The i18n'ed name of the property's value whose name is name.
Definition at line 1005 of file widgetpropertyset.cpp.
void KFormDesigner::WidgetPropertySet::widgetNameChanged | ( | const QCString & | oldname, | |
const QCString & | newname | |||
) | [signal] |
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.
void KFormDesigner::WidgetPropertySet::widgetPropertyChanged | ( | QWidget * | w, | |
const QCString & | property, | |||
const QVariant & | v | |||
) | [signal] |
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.
The documentation for this class was generated from the following files: