attributedocevents.h

Go to the documentation of this file.
00001 /*  -*- c++ -*-  (for Emacs)
00002  *
00003  *  attributedocevents.h
00004  * 
00005  *  Created by Aidan Lane on Mon Dec 19 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 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

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