attributedoccontrollerevents.h

Go to the documentation of this file.
00001 /*  -*- c++ -*-  (for Emacs)
00002  *
00003  *  attributedoccontrollerevents.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 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

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