Isis 3 Programmer Reference
QStretch.h
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
Isis::QStretch::p_max
double p_max
The maximum value a stretch input pair can be set to.
Definition: QStretch.h:132
Isis::QStretch::disconnectTable
virtual void disconnectTable(QTableWidget *widget)
Abstract method to disconnect the AdvancedStretchTool's table of stretch pairs.
Definition: QStretch.h:79
Isis::QStretch
Abstract class for complex stretch objects.
Definition: QStretch.h:26
Isis::Stretch::SetLis
void SetLis(const double value)
Sets the mapping for LIS pixels.
Definition: Stretch.h:105
Isis::QStretch::name
QString name()
This method returns the name of this QStretch.
Definition: QStretch.h:96
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::Stretch::SetHrs
void SetHrs(const double value)
Sets the mapping for HRS pixels.
Definition: Stretch.h:138
Isis::Stretch::SetLrs
void SetLrs(const double value)
Sets the mapping for LRS pixels.
Definition: Stretch.h:116
Isis::QStretch::p_name
QString p_name
The name of this QStretch.
Definition: QStretch.h:130
Isis::Stretch::SetHis
void SetHis(const double value)
Sets the mapping for HIS pixels.
Definition: Stretch.h:127
Isis::QStretch::connectTable
virtual void connectTable(QTableWidget *widget)
Abstract method to connect the AdvancedStretchTool's table of stretch pairs in order to modify it if ...
Definition: QStretch.h:71
Isis::QStretch::setMinMax
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
Isis::QStretch::clone
virtual QStretch * clone()=0
Abstract method to clone a QStretch in order to retain its parameters and stretch pairs.
Isis::QStretch::getParameters
virtual QGroupBox * getParameters()=0
Abstract method to return a QGroupBox of this QStretch's parameters.
Isis::QStretch::p_min
double p_min
The minimum value a stretch input pair can be set to.
Definition: QStretch.h:131
Isis::QStretch::p_stretchTool
const StretchTool * p_stretchTool
The StretchTool that created this QStretch.
Definition: QStretch.h:129
Isis::QStretch::update
void update()
Signal to emit when this QStretch has been updated.
Isis::Stretch::SetNull
void SetNull(const double value)
Sets the mapping for NULL pixels.
Definition: Stretch.h:94
Isis::StretchTool
Stretch image edit tool.
Definition: StretchTool.h:85
Isis::QStretch::stretch
Stretch stretch()
This method returns the stretch.
Definition: QStretch.h:106
Isis::QStretch::p_parametersBox
QGroupBox * p_parametersBox
The QGroupBox that holds this QStretch's parameters.
Definition: QStretch.h:133
Isis::QStretch::QStretch
QStretch(const StretchTool *stretchTool, QString name)
QStretch Constructor.
Definition: QStretch.h:39
QObject
Isis::QStretch::p_stretch
Stretch p_stretch
The stretch that this QStretch modifies.
Definition: QStretch.h:134
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16