Isis 3 Programmer Reference
StretchType.h
1 #ifndef STRETCHTYPE_H
2 #define STRETCHTYPE_H
3 
4 #include <QWidget>
5 
6 namespace Isis {
7  class Stretch;
8  class Cube;
9  class Histogram;
10 }
11 
12 class QTableWidget;
13 class QGridLayout;
14 
15 
16 namespace Isis {
17  class HistogramWidget;
18 
38  class StretchType : public QWidget {
39  Q_OBJECT
40 
41  public:
42  StretchType(const Histogram &hist, const Stretch &stretch,
43  const QString &name, const QColor &color);
44 
45  virtual ~StretchType();
46 
47  virtual Stretch getStretch();
53  virtual void setStretch(Stretch) = 0;
54 
55  virtual void setHistogram(const Histogram &);
56 
57 
58  protected: // methods
59  QTableWidget *createStretchTable();
60 
61  protected slots:
62  void updateGraph();
63  void updateTable();
64 
65  protected: // data
66  QGridLayout *p_mainLayout;
68  QTableWidget *p_table;
71 
72 
73  signals:
75  void stretchChanged();
76 
77 
78  private slots:
79  void savePairs();
80  };
81 };
82 
83 
84 #endif
void savePairs()
This asks the user for a file and saves the current stretch pairs to that file.
virtual Stretch getStretch()
Returns the current stretch object.
QTableWidget * createStretchTable()
This creates the stretch pairs table.
void stretchChanged()
Emitted when a new Stretch object is available.
Stretch * p_stretch
Current stretch pairs stored here.
Definition: StretchType.h:70
QTableWidget * p_table
Pairs table.
Definition: StretchType.h:68
Container of a cube histogram.
Definition: Histogram.h:86
Pixel value mapper.
Definition: Stretch.h:72
virtual void setHistogram(const Histogram &)
This should be called when the visible area changes.
Definition: StretchType.cpp:91
virtual void setStretch(Stretch)=0
Children must re-implement this to update their stretch pairs and GUI elements appropriately.
StretchType(const Histogram &hist, const Stretch &stretch, const QString &name, const QColor &color)
This constructs a stretch type.
Definition: StretchType.cpp:30
void updateGraph()
This updates the graph with the current stretch object.
HistogramWidget * p_graph
Histogram graph.
Definition: StretchType.h:69
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
This is the base class for advanced stretches.
Definition: StretchType.h:38
void updateTable()
This updates the table with the current stretch pairs.
virtual ~StretchType()
Destructor.
Definition: StretchType.cpp:71
Histogram widget used by AdvancedStretchTool.
Histogram * p_cubeHist
Visible area histogram.
Definition: StretchType.h:67
QGridLayout * p_mainLayout
Main layout.
Definition: StretchType.h:66