attributedocviewevents.h

Go to the documentation of this file.
00001 /*  -*- c++ -*-  (for Emacs)
00002  *
00003  *  attributedocviewevents.h
00004  * 
00005  *  Created by Aidan Lane on Tue Dec 20 2005.
00006  *  Copyright (c) 2005 Optimisation and Constraint Solving Group,
00007  *  Monash University. All rights reserved.
00008  *
00009  *  This program is free software; you can redistribute it and/or modify
00010  *  it under the terms of the GNU General Public License as published by
00011  *  the Free Software Foundation; either version 2 of the License, or
00012  *  (at your option) any later version.
00013  *
00014  *  This program is distributed in the hope that it will be useful,
00015  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with this program; if not, write to the Free Software
00021  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
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

Generated on Mon Jul 30 09:46:50 2007 for Digest by  doxygen 1.5.2