Classes | |
| class | CustomProperty |
| class | SizeCustomProperty |
| class | PointCustomProperty |
| class | RectCustomProperty |
| class | SizePolicyCustomProperty |
| class | Editor |
| class | EditorItem |
| class | FactoryManager |
| class | Property |
| class | Set |
| class | Buffer |
| class | GroupContainer |
| class | Widget |
| class | WidgetProxy |
Enumerations | |
| enum | PropertyType { Auto = TQVariant::Invalid - 1 , Invalid = TQVariant::Invalid , Map = TQVariant::Map , List = TQVariant::List , String = TQVariant::String , StringList = TQVariant::StringList , Font = TQVariant::Font , Pixmap = TQVariant::Pixmap , Rect = TQVariant::Rect , Size = TQVariant::Size , Color = TQVariant::Color , Point = TQVariant::Point , Integer = TQVariant::Int , Boolean = TQVariant::Bool , Double = TQVariant::Double , CString = TQVariant::CString , Cursor = TQVariant::Cursor , SizePolicy = TQVariant::SizePolicy , Date = TQVariant::Date , Time = TQVariant::Time , DateTime = TQVariant::DateTime , ValueFromList = 2000 , Symbol = 2001 , FontName , FileURL , PictureFileURL , DirectoryURL , LineStyle , Size_Height = 3001 , Size_Width , Point_X , Point_Y , Rect_X , Rect_Y , Rect_Width , Rect_Height , SizePolicy_HorData , SizePolicy_VerData , SizePolicy_HorStretch , SizePolicy_VerStretch , UserDefined = 4000 } |
Functions | |
| bool | hasParent (TQObject *par, TQObject *o) |
| static void | paintListViewExpander (TQPainter *p, TQWidget *w, int height, const TQColorGroup &cg, bool isOpen) |
| virtual CustomProperty * | createCustomProperty (Property *parent)=0 |
| virtual Widget * | createCustomWidget (Property *property)=0 |
| KOPROPERTY_EXPORT TQMap< TQCString, TQVariant > | propertyValues (const Set &set) |
Variables | |
| static bool | kofficeAppDirAdded = false |
| static Property | Set_nonConstNull |
Detailed Description
Namespace for a set of classes implementing generic properties framework.
Main classes of this framework are:
- Property, representing a single property with its own type and value
- Set, a set of properties
- Editor, a widget for displaying and editing properties provided by a Set object. Every property has its own row displayed using EditorItem object, within Editor widget. Widget class provides editing feature for EditorItem objects if a user selects a given item.
KoProperty framework also supports adding custom property types and custom property editor types using Custom Property and CustomPropertyFactory. If you cannot store your value type in a TQVariant, consider using composed properties (see FactoryManager for more information) or storing it in CustomProperty yourself with handleValue() set to true.
Take a look at the test application, available in /koproperty/test to see how to use KoProperty.
Enumeration Type Documentation
◆ PropertyType
Helper function to create a value list from two string lists. */ KOPROPERTY_EXPORT TQStringVariantMap createValueListFromStringLists( const TQStringList &keys, const TQStringList &values);
/*! PropertyType. Integers that represent the type of the property. Plugin defined properties should have a type number >= UserDefined .
| Enumerator | |
|---|---|
| Invalid | invalid property type |
| Map | TQStringVariantMap. |
| List | TQValueList<TQVariant>. |
| String | string |
| StringList | string list |
| Font | font |
| Pixmap | pixmap |
| Rect | rectangle (x,y, width, height)
|
| Size | size (width, height) |
| Color | color |
| Point | point (x,y)
|
| Integer | integer
|
| Boolean | boolean
|
| Double | double |
| Cursor | cursor
|
| SizePolicy | size policy (horizontal, vertical) |
| Date | date |
| Time | time |
| DateTime | date and time |
| ValueFromList | string value from a list
|
| Symbol | unicode symbol code |
| FontName | font name, e.g. "times new roman" |
| FileURL | url of a file |
| PictureFileURL | url of a pixmap |
| DirectoryURL | url of a directory |
| LineStyle | line style |
| UserDefined | plugin defined properties should start here |
Definition at line 65 of file property.h.
Function Documentation
◆ createCustomProperty()
|
pure virtual |
A prototype for custom property factory class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject { public: CustomPropertyFactory(TQObject *parent); virtual ~CustomPropertyFactory();.
A pointer to factory function which creates and returns widget for a given property type.*/ typedef Widget (*createWidget) (Property); typedef CustomProperty (*createCustomProperty) (Property);
!
/*!
- Returns
- a new instance of custom property for parent. Implement this for property types you want to support. Use parent->type() to get type of the property.
◆ createCustomWidget()
- Returns
- a new instance of custom property for property. Implement this for property editor types you want to support. Use parent->type() to get type of the property.
◆ hasParent()
|
inline |
- Returns
- true if o has parent par.
Definition at line 53 of file editor.cpp.
◆ paintListViewExpander()
|
static |
Definition at line 57 of file editoritem.cpp.
◆ propertyValues()
| TQMap< TQCString, TQVariant > KoProperty::propertyValues | ( | const Set & | set | ) |
Variable Documentation
◆ kofficeAppDirAdded
|
static |
Definition at line 49 of file editor.cpp.
