USGS

Isis 3.0 Object Programmers' Reference

Home

QStretch.h

00001 #ifndef QStretch_h
00002 #define QStretch_h
00003 
00004 #include <QGroupBox>
00005 #include <QTableWidget>
00006 
00007 #include "Stretch.h"
00008 
00009 namespace Isis {
00010   class StretchTool;
00011 
00026   class QStretch : public QObject {
00027       Q_OBJECT
00028 
00029     public:
00039       QStretch(const StretchTool *stretchTool, QString name)
00040         : p_stretchTool(stretchTool),
00041           p_name(name),
00042           p_min(0.0),
00043           p_max(255.0),
00044           p_parametersBox(NULL) {
00045         p_stretch.SetNull(0.0);
00046         p_stretch.SetLis(0.0);
00047         p_stretch.SetLrs(0.0);
00048         p_stretch.SetHis(255.0);
00049         p_stretch.SetHrs(255.0);
00050         p_stretch.SetMinimum(0.0);
00051         p_stretch.SetMaximum(255.0);
00052       };
00053 
00054 
00062       virtual QStretch *clone() = 0;
00063 
00071       virtual void connectTable(QTableWidget *widget) {};
00072 
00079       virtual void disconnectTable(QTableWidget *widget) {};
00080 
00088       virtual QGroupBox *getParameters() = 0;
00089 
00096       QString name() {
00097         return p_name;
00098       }
00099 
00106       Stretch stretch() {
00107         return p_stretch;
00108       }
00109 
00117       virtual void setMinMax(double min, double max) {
00118         p_min = min;
00119         p_max = max;
00120       }
00121 
00122     signals:
00126       void update();
00127 
00128     protected:
00129       const StretchTool *p_stretchTool; 
00130       QString p_name; 
00131       double p_min; 
00132       double p_max; 
00133       QGroupBox *p_parametersBox; 
00134       Stretch p_stretch; 
00135   };
00136 };
00137 
00138 #endif