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 ATTRIBUTEDOCEVENTS_H
00025 #define ATTRIBUTEDOCEVENTS_H
00026
00027
00028 #include "docevents.h"
00029
00030
00031 class MAttributeDocEvent : public MDocEvent {
00032 public:
00033 enum Type {
00034 AttributesSetValues = MDocEvent::User,
00035 AttributesRemove,
00036 User = MDocEvent::User + 1000
00037 };
00038
00039 public:
00040 MAttributeDocEvent( Type type )
00041 : MDocEvent((MDocEvent::Type)type) {}
00042 };
00043
00044
00051 class MAttributesSetValuesEvent : public MAttributeDocEvent,
00052 public AttributesContainer {
00053 public:
00054 MAttributesSetValuesEvent( const QHash<int, QVariant>& attributes )
00055 : MAttributeDocEvent(AttributesSetValues),
00056 AttributesContainer(attributes) {}
00057
00058 MAttributesSetValuesEvent( int attributeType, const QVariant& attributeValue )
00059 : MAttributeDocEvent(AttributesSetValues),
00060 AttributesContainer(attributeType, attributeValue) {}
00061 };
00062
00063
00064 class MAttributesRemoveEvent : public MAttributeDocEvent,
00065 public AttributeTypesContainer {
00066 public:
00067 MAttributesRemoveEvent( const QSet<int> attributeTypes )
00068 : MAttributeDocEvent(AttributesRemove),
00069 AttributeTypesContainer(attributeTypes) {}
00070
00071 MAttributesRemoveEvent( int attributeType )
00072 : MAttributeDocEvent(AttributesRemove),
00073 AttributeTypesContainer(attributeType) {}
00074 };
00075
00076
00077 #endif // ! ATTRIBUTEDOCEVENTS_H