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  class CubeStretch;
11 }
12 
13 class QTableWidget;
14 class QGridLayout;
15 
16 
17 namespace Isis {
18  class HistogramWidget;
19 
39  class StretchType : public QWidget {
40  Q_OBJECT
41 
42  public:
43  StretchType(const Histogram &hist, const Stretch &stretch,
44  const QString &name, const QColor &color);
45 
46  virtual ~StretchType();
47 
48  virtual CubeStretch getStretch();
54  virtual void setStretch(Stretch) = 0;
55 
56  virtual void setHistogram(const Histogram &);
57 
58 
59  protected: // methods
60  QTableWidget *createStretchTable();
61 
62  protected slots:
63  void updateGraph();
64  void updateTable();
65 
66  protected: // data
67  QGridLayout *p_mainLayout;
69  QTableWidget *p_table;
72 
73 
74  signals:
76  void saveToCube();
77  void deleteFromCube();
78  void stretchChanged();
79  void loadStretch();
80 
81  private slots:
82  void savePairs();
83 
84  };
85 };
86 
87 
88 #endif
Isis::StretchType::setHistogram
virtual void setHistogram(const Histogram &)
This should be called when the visible area changes.
Definition: StretchType.cpp:109
QWidget
Isis::StretchType::setStretch
virtual void setStretch(Stretch)=0
Children must re-implement this to update their stretch pairs and GUI elements appropriately.
Isis::StretchType::updateGraph
void updateGraph()
This updates the graph with the current stretch object.
Definition: StretchType.cpp:140
Isis::StretchType::p_graph
HistogramWidget * p_graph
Histogram graph.
Definition: StretchType.h:70
Isis::Stretch
Pixel value mapper.
Definition: Stretch.h:58
Isis::StretchType::StretchType
StretchType(const Histogram &hist, const Stretch &stretch, const QString &name, const QColor &color)
This constructs a stretch type.
Definition: StretchType.cpp:31
Isis::StretchType
This is the base class for advanced stretches.
Definition: StretchType.h:39
Isis::CubeStretch
Stores stretch information for a cube.
Definition: CubeStretch.h:27
Isis::StretchType::~StretchType
virtual ~StretchType()
Destructor.
Definition: StretchType.cpp:89
Isis::StretchType::updateTable
void updateTable()
This updates the table with the current stretch pairs.
Definition: StretchType.cpp:148
Isis::StretchType::p_cubeHist
Histogram * p_cubeHist
Visible area histogram.
Definition: StretchType.h:68
Isis::StretchType::getStretch
virtual CubeStretch getStretch()
Returns the current stretch object.
Definition: StretchType.cpp:201
Isis::StretchType::savePairs
void savePairs()
This asks the user for a file and saves the current stretch pairs to that file.
Definition: StretchType.cpp:170
Isis::StretchType::p_mainLayout
QGridLayout * p_mainLayout
Main layout.
Definition: StretchType.h:67
Isis::HistogramWidget
Histogram widget used by AdvancedStretchTool.
Definition: HistogramWidget.h:36
Isis::StretchType::saveToCube
void saveToCube()
Emitted when a new Stretch object is available.
Isis::StretchType::createStretchTable
QTableWidget * createStretchTable()
This creates the stretch pairs table.
Definition: StretchType.cpp:121
Isis::Histogram
Container of a cube histogram.
Definition: Histogram.h:74
Isis::StretchType::p_stretch
Stretch * p_stretch
Current stretch pairs stored here.
Definition: StretchType.h:71
Isis::StretchType::p_table
QTableWidget * p_table
Pairs table.
Definition: StretchType.h:69
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16