Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqColorMap.h

Go to the documentation of this file.
00001 //--------------------------------------------------------------------
00002 //
00003 // File:    TxqColorMap.h
00004 //
00005 // Purpose: Pre-define various Qt color maps.
00006 //
00007 // Version: $Id: TxqColorMap.h,v 1.8 2001/10/09 19:15:48 kgl Exp $
00008 //
00009 // Copyright (c) 2000 by Tech-X Corporation.  All rights reserved.
00010 //
00011 // Author:  Kelly G. Luetkemeyer
00012 //
00013 //--------------------------------------------------------------------
00014 
00015 #ifndef TXQ_COLORMAP_H
00016 #define TXQ_COLORMAP_H
00017 
00018 // Qt includes
00019 #include <qcolor.h>
00020 
00021 // std includes
00022 #include <vector>
00023 
00024 #define MAXCOLORS 256
00025 
00036 class TxqColorMap: public QColor
00037 {
00038 
00039 public:
00040 
00044   TxqColorMap();
00045 
00049    void setDefaultColorMap();
00050 
00054    void setRandomColorMap();
00055 
00059    void setRainbowColorMap();
00060 
00064    void setPhysicsColorMap();
00065 
00069    void setNameColorMap();
00070 
00075    std::vector<QColor> getColorMap() {return colors;}
00076 
00081    int getNumColors() {return numColors;}
00082 
00087    int getCurrentColor() {return currentColor; }
00088 
00092   void bumpPenColor();   
00093 
00098   void setPenColor(int i);    
00099 
00100 
00104   virtual ~TxqColorMap();
00105 
00106 protected:
00107 
00108 private:
00109 
00113   int numColors;
00114 
00118   std::vector<QColor> colors;
00119 
00123   int currentColor;
00124 
00125 };
00126 
00127 #endif
Copyright Tech-X Corporation, all rights reserved.