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 ATTRIBUTEDOCVIEWEVENTS_H
00025 #define ATTRIBUTEDOCVIEWEVENTS_H
00026
00027
00028 #include "docviewevents.h"
00029
00030
00031 class VAttributeDocEvent : public VDocEvent {
00032 public:
00033 enum Type {
00034 AttributesValuesSet = VDocEvent::User,
00035 AttributesRemoved,
00036 User = VDocEvent::User + 1000
00037 };
00038 protected:
00039 VAttributeDocEvent( Type type, MvcBase* sender )
00040 : VDocEvent((VDocEvent::Type)type, sender) {}
00041 };
00042
00043
00051 class VAttributesValuesSetEvent : public VAttributeDocEvent,
00052 public AttributesContainer {
00053 public:
00054 VAttributesValuesSetEvent( const QHash<int, QVariant>& attributes,
00055 MvcBase* sender = 0 )
00056 : VAttributeDocEvent(AttributesValuesSet, sender),
00057 AttributesContainer(attributes) {}
00058
00059 VAttributesValuesSetEvent( int attributeType, const QVariant& attributeValue,
00060 MvcBase* sender = 0 )
00061 : VAttributeDocEvent(AttributesValuesSet, sender),
00062 AttributesContainer(attributeType, attributeValue) {}
00063 };
00064
00065
00066 class VAttributesRemovedEvent : public VAttributeDocEvent,
00067 public AttributeTypesContainer {
00068 public:
00069 VAttributesRemovedEvent( const QSet<int> attributeTypes, MvcBase* sender = 0 )
00070 : VAttributeDocEvent(AttributesRemoved, sender),
00071 AttributeTypesContainer(attributeTypes) {}
00072
00073 VAttributesRemovedEvent( int attributeType, MvcBase* sender = 0 )
00074 : VAttributeDocEvent(AttributesRemoved, sender),
00075 AttributeTypesContainer(attributeType) {}
00076 };
00077
00078
00079 #endif // ! ATTRIBUTEDOCVIEWEVENTS_H