lib
customproperty.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KPROPERTY_CUSTOMPROPERTY_H
00021 #define KPROPERTY_CUSTOMPROPERTY_H
00022
00023 #include "koproperty_global.h"
00024
00025 class QVariant;
00026
00027 namespace KoProperty {
00028
00029 class Property;
00030
00032
00040 class KOPROPERTY_EXPORT CustomProperty
00041 {
00042 public:
00043 CustomProperty(Property *parent);
00044 virtual ~CustomProperty();
00045
00052 virtual void setValue(const QVariant &value, bool rememberOldValue) = 0;
00053
00057 virtual QVariant value() const = 0;
00058
00061 virtual bool handleValue() const { return false; }
00062
00063 protected:
00064 Property *m_property;
00065 };
00066
00068 class KOPROPERTY_EXPORT SizeCustomProperty : public CustomProperty
00069 {
00070 public:
00071 SizeCustomProperty(Property *parent);
00072 ~SizeCustomProperty();
00073
00074 void setValue(const QVariant &value, bool rememberOldValue);
00075 QVariant value() const;
00076 bool handleValue() const;
00077 };
00078
00080 class KOPROPERTY_EXPORT PointCustomProperty : public CustomProperty
00081 {
00082 public:
00083 PointCustomProperty(Property *parent);
00084 ~PointCustomProperty();
00085
00086 void setValue(const QVariant &value, bool rememberOldValue);
00087 QVariant value() const;
00088 bool handleValue() const;
00089 };
00090
00092 class KOPROPERTY_EXPORT RectCustomProperty : public CustomProperty
00093 {
00094 public:
00095 RectCustomProperty(Property *parent);
00096 ~RectCustomProperty();
00097
00098 void setValue(const QVariant &value, bool rememberOldValue);
00099 QVariant value() const;
00100 bool handleValue() const;
00101 };
00102
00104 class KOPROPERTY_EXPORT SizePolicyCustomProperty : public CustomProperty
00105 {
00106 public:
00107 SizePolicyCustomProperty(Property *parent);
00108 ~SizePolicyCustomProperty();
00109
00110 void setValue(const QVariant &value, bool rememberOldValue);
00111 QVariant value() const;
00112 bool handleValue() const;
00113 };
00114
00115 }
00116
00117 #endif
|