00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ATTRIBUTEDOCCONTROLLEREVENTS_H
00025 #define ATTRIBUTEDOCCONTROLLEREVENTS_H
00026
00027
00028 #include "doccontrollerevents.h"
00029
00030
00031 class CAttributeDocEvent : public CDocEvent {
00032 public:
00033 enum Type {
00034 AttributesSetValues = CDocEvent::User,
00035 AttributesRemove,
00036 User = CDocEvent::User + 1000
00037 };
00038
00039 public:
00040 CAttributeDocEvent( Type type,
00041 QObject* sender = 0, Flags flags = NoFlags )
00042 : CDocEvent((CDocEvent::Type)type, sender, flags) {}
00043 };
00044
00045
00052 class CAttributesSetValuesEvent : public CAttributeDocEvent,
00053 public AttributesContainer {
00054 public:
00055 CAttributesSetValuesEvent( const QHash<int, QVariant>& attributes,
00056 QObject* sender = 0, Flags flags = NoFlags )
00057 : CAttributeDocEvent(AttributesSetValues, sender, flags),
00058 AttributesContainer(attributes) {}
00059
00060 CAttributesSetValuesEvent( int attributeType, const QVariant& attributeValue,
00061 QObject* sender = 0, Flags flags = NoFlags )
00062 : CAttributeDocEvent(AttributesSetValues, sender, flags),
00063 AttributesContainer(attributeType, attributeValue) {}
00064 };
00065
00066
00067 class CAttributesRemoveEvent : public CAttributeDocEvent,
00068 public AttributeTypesContainer {
00069 public:
00070 CAttributesRemoveEvent( const QSet<int> attributeTypes,
00071 QObject* sender = 0, Flags flags = NoFlags )
00072 : CAttributeDocEvent(AttributesRemove, sender, flags),
00073 AttributeTypesContainer(attributeTypes) {}
00074
00075 CAttributesRemoveEvent( int attributeType,
00076 QObject* sender = 0, Flags flags = NoFlags )
00077 : CAttributeDocEvent(AttributesRemove, sender, flags),
00078 AttributeTypesContainer(attributeType) {}
00079 };
00080
00081
00082 #endif // ! ATTRIBUTEDOCCONTROLLEREVENTS_H