src/clustercolors.h

00001 /***************************************************************************
00002                           clustercolors.h  -  description
00003                              -------------------
00004     begin                : Tue Sep 16 2004
00005     copyright            : (C) 2003 by Lynn Hazan
00006     email                : lynn.hazan@myrealbox.com
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef CLUSTERCOLORS_H
00019 #define CLUSTERCOLORS_H
00020 
00021 // include files for Qt
00022 #include <qptrlist.h>
00023 #include <qcolor.h>
00024 #include <qvaluelist.h>
00025 
00026 // application specific includes
00027 #include "itemcolors.h"
00028 
00036 class ClusterColors : public ItemColors {
00037 
00038 public:
00039 
00040   ClusterColors();
00041   virtual ~ClusterColors();
00042   ClusterColors(const ClusterColors& clustercolors);  
00043             
00044 public:
00045   
00052   virtual inline QColor color(int identifier, SelectionMode mode = ItemColors::BY_ITEM_NUMBER){return ItemColors::color(identifier,mode);};
00053 
00060   virtual inline void setColor(int identifier, QColor color, SelectionMode mode = ItemColors::BY_ITEM_NUMBER){ItemColors::setColor(identifier,color,mode);};
00061 
00062 
00068   virtual inline int clusterId(int index){return itemId(index);};
00069 
00075   virtual inline bool contains(int clusterId){return ItemColors::contains(clusterId);};
00076 
00084   virtual inline bool isColorChanged(int identifier, SelectionMode mode = ItemColors::BY_ITEM_NUMBER){return ItemColors::isColorChanged(identifier,mode);};
00085 
00093   virtual inline void setColorChanged(int identifier, bool changed, SelectionMode mode = ItemColors::BY_ITEM_NUMBER){
00094     ItemColors::setColorChanged(identifier,changed,mode);
00095   };
00096 
00101   inline uint numberOfClusters() const {return ItemColors::numberOfItems();};
00102 
00107   virtual inline bool isColorChanged()const{return ItemColors::isColorChanged();};
00108 
00113   virtual inline void setColorChanged(bool changed){ItemColors::setColorChanged(changed);};
00114 
00115   
00122   virtual inline uint append(int clusterId, QColor color){
00123    return ItemColors::append(clusterId,color);
00124   };
00125 
00132   virtual inline void insert(int clusterId, QColor color,int index){
00133    ItemColors::insert(clusterId,color,index); 
00134   };
00135 
00136 
00143   virtual inline bool remove(int identifier, SelectionMode mode = ItemColors::BY_ITEM_NUMBER){
00144    return ItemColors::remove(identifier,mode);
00145   };
00146 
00152   virtual inline QValueList<int> colorChangedClusterList(){
00153    return ItemColors::colorChangedItemList(); 
00154   };
00155 
00160   virtual inline void resetAllColorStatus(){
00161    ItemColors::resetAllColorStatus();
00162   };
00163 
00169   virtual inline void changeClusterId(int index, int newClusterId){
00170    ItemColors::changeItemId(index,newClusterId);
00171   };
00172 };
00173 
00174 #endif

Generated on Mon Sep 17 20:47:30 2007 for NeuroScope by  doxygen 1.5.1