00001 //--------------------------------------------------------------------------- 00002 // 00003 // File: TxqAttribDrawable.h 00004 // 00005 // Purpose: An optimized class for drawing points, lines, or polygons 00006 // using a TxAttributeSet 00007 // 00008 // Version: $Id: TxqAttribDrawable.h,v 1.6 2001/10/11 22:45:24 kgl Exp $ 00009 // 00010 // Author: Kelly G. Luetkemeyer 00011 // 00012 //--------------------------------------------------------------------------- 00013 00014 #ifndef TXQ_ATTRIB_DRAWABLE_H 00015 #define TXQ_ATTRIB_DRAWABLE_H 00016 00017 // Txq includes 00018 #include <Txq2dDrawable.h> 00019 00020 // TxMath includes 00021 #include <TxAttributeSet.h> 00022 00023 // Qt includes 00024 #include <qobject.h> 00025 00037 class TxqAttribDrawable: public QObject, public Txq2dDrawable 00038 { 00039 00040 Q_OBJECT 00041 00042 public: 00047 TxqAttribDrawable(TxAttributeSet *a); 00048 00052 virtual ~TxqAttribDrawable(){} 00053 00058 void paint(QPainter* g ); 00059 00063 void plotAttrib(); 00064 00069 void setPixmap(QPixmap *p) {pixmap = p;} 00070 00071 00072 public slots: 00073 00077 void canvasResize(); 00078 00082 void zoomResize(); 00083 00087 void zoomOff(); 00088 00092 void clearPoints(); 00093 00094 protected: 00095 00101 void dump(QTextStream *ts); 00102 00103 private: 00104 00108 QColor color; 00109 00113 TxAttributeSet *attrib; 00114 00118 double xPoint; 00119 00123 double yPoint; 00124 00128 QArray<double> xPointArray; 00129 00133 QArray<double> yPointArray; 00134 00138 QArray<QColor> colorArray; 00139 00143 unsigned int pointIndex; 00144 00148 bool savePoints; 00149 00153 bool resizePointIndex; 00154 00158 bool canvasResizeFlag; 00159 00163 bool zoomFlag; 00164 00168 bool firstZoomOff; 00169 00173 QPainter *painter; 00174 00178 QPixmap *pixmap; 00179 00180 }; 00181 #endif
Copyright Tech-X Corporation, all rights reserved.