kexi
KexiMacroProperty Class Reference
#include <keximacroproperty.h>
Detailed Description
Implementation of a KoProperty::CustomProperty to have more control about the handling of our macro-properties.
Definition at line 38 of file keximacroproperty.h.
Signals | |
| void | valueChanged () |
Public Member Functions | |
| KexiMacroProperty (KoProperty::Property *parent, KSharedPtr< KoMacro::MacroItem > macroitem, const QString &name) | |
| virtual | ~KexiMacroProperty () |
| KoProperty::Property * | parentProperty () const |
| virtual void | setValue (const QVariant &value, bool rememberOldValue) |
| virtual QVariant | value () const |
| virtual bool | handleValue () const |
| KSharedPtr< KoMacro::MacroItem > | macroItem () const |
| QString | name () const |
| KSharedPtr< KoMacro::Variable > | variable () const |
Static Public Member Functions | |
| static KoProperty::Property * | createProperty (KSharedPtr< KoMacro::MacroItem > macroitem, const QString &name) |
Friends | |
| class | KexiMacroPropertyWidget |
Constructor & Destructor Documentation
| KexiMacroProperty::KexiMacroProperty | ( | KoProperty::Property * | parent, | |
| KSharedPtr< KoMacro::MacroItem > | macroitem, | |||
| const QString & | name | |||
| ) | [explicit] |
| KexiMacroProperty::~KexiMacroProperty | ( | ) | [virtual] |
Member Function Documentation
| KoProperty::Property * KexiMacroProperty::parentProperty | ( | ) | const |
- Returns:
- the parent KoProperty::Property instance.
Definition at line 99 of file keximacroproperty.cpp.
| void KexiMacroProperty::setValue | ( | const QVariant & | value, | |
| bool | rememberOldValue | |||
| ) | [virtual] |
This function is called by KoProperty::Property::setValue() when a custom property is set.
You don't have to modify the property value, it is done by Property class. You just have to update child or parent properties value (m_property->parent()->setValue()). Note that, when calling Property::setValue, you need to set useCustomProperty (3rd parameter) to false, or there will be infinite recursion.
Definition at line 104 of file keximacroproperty.cpp.
| QVariant KexiMacroProperty::value | ( | ) | const [virtual] |
This function is called by KoProperty::Property::value() when a custom property is set and handleValue() is true.
You should return property's value, taken from parent's value.
Definition at line 122 of file keximacroproperty.cpp.
| bool KexiMacroProperty::handleValue | ( | ) | const [virtual] |
Tells whether CustomProperty should be used to get the property's value.
You should return true for child properties, and false for others.
Definition at line 129 of file keximacroproperty.cpp.
| KSharedPtr< KoMacro::MacroItem > KexiMacroProperty::macroItem | ( | ) | const |
- Returns:
- the KoMacro::MacroItem this custom property has or NULL if there was no item provided.
Definition at line 134 of file keximacroproperty.cpp.
| QString KexiMacroProperty::name | ( | ) | const |
- Returns:
- the name the property has in the KoMacro::MacroItem above.
Is QString::null if there was no item provided.
Definition at line 139 of file keximacroproperty.cpp.
| KSharedPtr< KoMacro::Variable > KexiMacroProperty::variable | ( | ) | const |
- Returns:
- the KoMacro::Variable which has the name name() in the item macroItem() .
If such a variable doesn't exists NULL is returned.
Definition at line 144 of file keximacroproperty.cpp.
| KoProperty::Property * KexiMacroProperty::createProperty | ( | KSharedPtr< KoMacro::MacroItem > | macroitem, | |
| const QString & | name | |||
| ) | [static] |
Factory function to create a new KoProperty::Property instance that will use a KexiMacroProperty as container.
Definition at line 149 of file keximacroproperty.cpp.
| void KexiMacroProperty::valueChanged | ( | ) | [signal] |
Emitted if setValue was called and the value changed.
The documentation for this class was generated from the following files:

