Isis 3 Developer Reference
QStretch.h
Go to the documentation of this file.
1 #ifndef QStretch_h
2 #define QStretch_h
3 
4 #include <QGroupBox>
5 #include <QTableWidget>
6 
7 #include "Stretch.h"
8 
9 namespace Isis {
10  class StretchTool;
11 
26  class QStretch : public QObject {
27  Q_OBJECT
28 
29  public:
39  QStretch(const StretchTool *stretchTool, QString name)
40  : p_stretchTool(stretchTool),
41  p_name(name),
42  p_min(0.0),
43  p_max(255.0),
44  p_parametersBox(NULL) {
45  p_stretch.SetNull(0.0);
46  p_stretch.SetLis(0.0);
47  p_stretch.SetLrs(0.0);
48  p_stretch.SetHis(255.0);
49  p_stretch.SetHrs(255.0);
50  p_stretch.SetMinimum(0.0);
51  p_stretch.SetMaximum(255.0);
52  };
53 
54 
62  virtual QStretch *clone() = 0;
63 
71  virtual void connectTable(QTableWidget *widget) {};
72 
79  virtual void disconnectTable(QTableWidget *widget) {};
80 
88  virtual QGroupBox *getParameters() = 0;
89 
96  QString name() {
97  return p_name;
98  }
99 
107  return p_stretch;
108  }
109 
117  virtual void setMinMax(double min, double max) {
118  p_min = min;
119  p_max = max;
120  }
121 
122  signals:
126  void update();
127 
128  protected:
130  QString p_name;
131  double p_min;
132  double p_max;
133  QGroupBox *p_parametersBox;
135  };
136 };
137 
138 #endif
virtual QGroupBox * getParameters()=0
Abstract method to return a QGroupBox of this QStretch&#39;s parameters.
const StretchTool * p_stretchTool
The StretchTool that created this QStretch.
Definition: QStretch.h:129
Stretch image edit tool.
Definition: StretchTool.h:99
void SetLis(const double value)
Sets the mapping for LIS pixels.
Definition: Stretch.h:119
virtual void disconnectTable(QTableWidget *widget)
Abstract method to disconnect the AdvancedStretchTool&#39;s table of stretch pairs.
Definition: QStretch.h:79
QGroupBox * p_parametersBox
The QGroupBox that holds this QStretch&#39;s parameters.
Definition: QStretch.h:133
void SetMaximum(const double value)
Definition: Stretch.h:159
Stretch p_stretch
The stretch that this QStretch modifies.
Definition: QStretch.h:134
virtual QStretch * clone()=0
Abstract method to clone a QStretch in order to retain its parameters and stretch pairs...
QString p_name
The name of this QStretch.
Definition: QStretch.h:130
void SetHrs(const double value)
Sets the mapping for HRS pixels.
Definition: Stretch.h:152
Pixel value mapper.
Definition: Stretch.h:72
void SetLrs(const double value)
Sets the mapping for LRS pixels.
Definition: Stretch.h:130
void SetHis(const double value)
Sets the mapping for HIS pixels.
Definition: Stretch.h:141
virtual void connectTable(QTableWidget *widget)
Abstract method to connect the AdvancedStretchTool&#39;s table of stretch pairs in order to modify it if ...
Definition: QStretch.h:71
Abstract class for complex stretch objects.
Definition: QStretch.h:26
double p_min
The minimum value a stretch input pair can be set to.
Definition: QStretch.h:131
virtual void setMinMax(double min, double max)
Abstract method to set the minimum and maximum values that stretch input pairs can be set to...
Definition: QStretch.h:117
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
Stretch stretch()
This method returns the stretch.
Definition: QStretch.h:106
QStretch(const StretchTool *stretchTool, QString name)
QStretch Constructor.
Definition: QStretch.h:39
double p_max
The maximum value a stretch input pair can be set to.
Definition: QStretch.h:132
void SetNull(const double value)
Sets the mapping for NULL pixels.
Definition: Stretch.h:108
void SetMinimum(const double value)
Definition: Stretch.h:156
QString name()
This method returns the name of this QStretch.
Definition: QStretch.h:96
void update()
Signal to emit when this QStretch has been updated.