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

Txq2dPoints.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------
00002 //
00003 // File:    Txq2dPoints.h
00004 //
00005 // Purpose:  A class for drawing points.
00006 //
00007 // Version: $Id: Txq2dPoints.h,v 1.5 2002/01/17 19:29:21 kgl Exp $
00008 //
00009 // Author: Kelly G. Luetkemeyer
00010 //
00011 //---------------------------------------------------------------------------
00012 
00013 #ifndef TXQ2D_POINTS_H
00014 #define TXQ2D_POINTS_H
00015 
00016 // std includes
00017 #include <vector>
00018 
00019 // Tx includes
00020 #include "Txq2dPoint.h"
00021 #include "TxqDoublePoint.h"
00022 
00034 class Txq2dPoints: public Txq2dPoint
00035 {
00036 
00037 public:
00041  Txq2dPoints();
00042 
00047   Txq2dPoints(const std::vector<TxqDoublePoint> &p);
00048  
00054   Txq2dPoints(const std::vector<double> &x, const std::vector<double> &y);
00055  
00061   Txq2dPoints(const std::vector<int> &x, const std::vector<int> &y);
00062  
00067   Txq2dPoints(const std::vector<QPoint> &p);
00068 
00072   virtual ~Txq2dPoints(){}
00073 
00078   void addPoint(TxqDoublePoint point);
00079 
00085   void addPoint(int x, int y);
00086 
00092   void addPoint(double x, double y);
00093 
00097   void erasePoints();
00098 
00103   void setPoints(const std::vector<TxqDoublePoint> &p);
00104 
00110   void setPoints(const std::vector<double> &x, const std::vector<double> &y);
00111 
00117   void setPoints(const std::vector<int> &x, const std::vector<int> &y);
00118 
00123   void setPoints(const std::vector<QPoint> &p);
00124 
00129   std::vector<TxqDoublePoint> getPoints(); 
00130 
00137   void setLocation(int x, int y); 
00138 
00144   void setColor(QColor c, bool add);
00145 
00150   void setColor(QColor c);
00151 
00156   void setPrintColor(QColor c);
00157 
00162   void paint(QPainter* g );
00163 
00164 
00165 protected:
00166 
00170   virtual void initialize();
00171 
00177   void dump(QTextStream *ts);
00178 
00179 
00180 private:
00181 
00185   std::vector<QColor> colors;
00186 
00187 };
00188 #endif
Copyright Tech-X Corporation, all rights reserved.