22#ifndef KPROPERTY_PROPERTY_H
23#define KPROPERTY_PROPERTY_H
26#include "koproperty_global.h"
28template< class U> class TQAsciiDict;
29template< class U> class TQAsciiDictIterator;
67 Auto = TQVariant::Invalid - 1,
69 Map = TQVariant::Map ,
88 CString = TQVariant::CString ,
125 SizePolicy_HorStretch,
126 SizePolicy_VerStretch,
182 typedef TQAsciiDict<Property> Dict;
183 typedef TQAsciiDictIterator<Property> DictIterator;
191 ListData( const TQStringList& keys_, const TQStringList& names_);
192 ListData( const TQValueList<TQVariant> keys_, const TQStringList& names_);
196 void setKeysAsStringList( const TQStringList& list);
197 TQStringList keysAsStringList() const;
223 Property( const TQCString &name, const TQVariant &value = TQVariant(),
224 const TQString &caption = TQString(), const TQString &description = TQString(),
225 int type = Auto, Property* parent = 0);
228 Property( const TQCString &name, const TQStringList &keys, const TQStringList &strings,
229 const TQVariant &value = TQVariant(),
230 const TQString &caption = TQString(), const TQString &description = TQString(),
231 int type = ValueFromList, Property* parent = 0);
236 const TQVariant &value = TQVariant(),
237 const TQString &caption = TQString(), const TQString &description = TQString(),
238 int type = ValueFromList, Property* parent = 0);
246 TQCString name() const;
249 void setName( const TQCString &name);
252 TQString caption() const;
257 TQString captionForDisplaying() const;
262 void setCaption( const TQString &caption);
265 TQString description() const;
268 void setDescription( const TQString &description);
274 void setType( int type);
277 TQVariant value() const;
280 TQVariant oldValue() const;
283 void setValue( const TQVariant &value, bool rememberOldValue = true, bool useCustomProperty= true);
300 void setListData( const TQStringList &keys, const TQStringList &names);
304 void setIcon( const TQString &icon);
307 TQString icon() const;
311 const TQValueList<Property*>* children() const;
314 Property* child( const TQCString &name);
331 operator bool () const;
334 bool isModified() const;
337 void clearModifiedFlag();
344 bool isReadOnly() const;
348 void setReadOnly( bool readOnly);
351 bool isVisible() const;
354 void setVisible( bool visible);
359 bool isStorable() const;
362 void setStorable( bool storable);
370 int autoSync() const;
378 void setAutoSync( int sync);
385 void setOption( const char* name, const TQVariant& val);
388 TQVariant option( const char* name) const;
391 bool hasOptions() const;
394 const Property& operator= ( const TQVariant& val);
400 bool operator ==( const Property &prop) const;
406 int sortingKey() const;
414 void addSet( Set *set);
417 void setSortingKey( int key);
420 const TQValueList<Property*>* related() const;
423 void addRelatedProperty( Property *property);
428 void emitPropertyChanged();
Base class for custom properties.
TQValueList< TQVariant > keys
The base class representing a single property.
static const Property null A contant for null property.
Lists holding properties in groups.
Namespace for a set of classes implementing generic properties framework.
@ List TQValueList<TQVariant>
@ Symbol unicode symbol code
@ Rect rectangle (x,y, width, height)
@ DirectoryURL url of a directory
@ Size size (width, height)
@ UserDefined plugin defined properties should start here
@ PictureFileURL url of a pixmap
@ Invalid invalid property type
@ FontName font name, e.g.
@ SizePolicy size policy (horizontal, vertical)
@ ValueFromList string value from a list
|