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, 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 () |
QString | propertyCaption (const QCString &name) |
QString | valueCaption (const QCString &name) |
void | emitWidgetPropertyChanged (QWidget *w, const QCString &property, const QVariant &value) |
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 1107 of file widgetpropertyset.cpp.
void WidgetPropertySet::setSelectedWidget | ( | QWidget * | w, | |
bool | add = false , |
|||
bool | forceReload = false , |
|||
bool | moreWillBeSelected = false | |||
) | [slot] |
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.
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 479 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 703 of file widgetpropertyset.cpp.
void WidgetPropertySet::slotWidgetDestroyed | ( | ) | [slot] |
This slot is called when the watched widget is destroyed. Resets the buffer.
Definition at line 720 of file widgetpropertyset.cpp.
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.
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 WidgetPropertySet::addWidget | ( | QWidget * | w | ) | [protected] |
Adds the widget in d->widgets, and updates property visibilty.
Definition at line 227 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 264 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 1082 of file widgetpropertyset.cpp.
void WidgetPropertySet::updatePropertyValue | ( | ObjectTreeItem * | tree, | |
const char * | property, | |||
const QMetaProperty * | meta = 0 | |||
) | [protected] |
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.
- Todo:
- what about set properties, and lists properties
Definition at line 411 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 135 of file widgetpropertyset.cpp.
void WidgetPropertySet::clearSet | ( | bool | dontSignalShowPropertySet = false |
) | [protected] |
Clears the set, and reset all members.
Definition at line 141 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 160 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 672 of file widgetpropertyset.cpp.
void WidgetPropertySet::saveEnabledProperty | ( | bool | value | ) | [protected] |
Saves 'enabled' property, and takes care of updating widget's palette.
Definition at line 642 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 733 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 176 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 434 of file widgetpropertyset.cpp.
void WidgetPropertySet::createAlignProperty | ( | const QMetaProperty * | meta, | |
QWidget * | widget, | |||
QWidget * | subwidget | |||
) | [protected] |
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.
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 852 of file widgetpropertyset.cpp.
void WidgetPropertySet::createLayoutProperty | ( | ObjectTreeItem * | item | ) | [protected] |
Creates the "layout" property, for the Container representing item.
Definition at line 892 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 931 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 992 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 1070 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 1076 of file widgetpropertyset.cpp.
void WidgetPropertySet::emitWidgetPropertyChanged | ( | QWidget * | w, | |
const QCString & | property, | |||
const QVariant & | value | |||
) | [protected] |
Helper.
- Returns:
- The i18n'ed list of values, that will be shown by Property Editor (using descFromValue()).
add
Definition at line 581 of file widgetpropertyset.cpp.
The documentation for this class was generated from the following files: