Isis Developer Reference
StretchType.h
Go to the documentation of this file.
1#ifndef STRETCHTYPE_H
2#define STRETCHTYPE_H
3
4#include <QWidget>
5
6namespace Isis {
7 class Stretch;
8 class Cube;
9 class Histogram;
10 class CubeStretch;
11}
12
13class QTableWidget;
14class QGridLayout;
15
16
17namespace 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();
79 void loadStretch();
80
81 private slots:
82 void savePairs();
83
84 };
85};
86
87
88#endif
Stores stretch information for a cube.
Definition CubeStretch.h:27
Container of a cube histogram.
Definition Histogram.h:74
Histogram widget used by AdvancedStretchTool.
Definition HistogramWidget.h:36
Pixel value mapper.
Definition Stretch.h:58
This is the base class for advanced stretches.
Definition StretchType.h:39
virtual CubeStretch getStretch()
Returns the current stretch object.
Definition StretchType.cpp:201
QTableWidget * p_table
Pairs table.
Definition StretchType.h:69
void updateGraph()
This updates the graph with the current stretch object.
Definition StretchType.cpp:140
Stretch * p_stretch
Current stretch pairs stored here.
Definition StretchType.h:71
Histogram * p_cubeHist
Visible area histogram.
Definition StretchType.h:68
HistogramWidget * p_graph
Histogram graph.
Definition StretchType.h:70
StretchType(const Histogram &hist, const Stretch &stretch, const QString &name, const QColor &color)
This constructs a stretch type.
Definition StretchType.cpp:31
QTableWidget * createStretchTable()
This creates the stretch pairs table.
Definition StretchType.cpp:121
void saveToCube()
Emitted when a new Stretch object is available.
virtual void setStretch(Stretch)=0
Children must re-implement this to update their stretch pairs and GUI elements appropriately.
QGridLayout * p_mainLayout
Main layout.
Definition StretchType.h:67
void updateTable()
This updates the table with the current stretch pairs.
Definition StretchType.cpp:148
virtual void setHistogram(const Histogram &)
This should be called when the visible area changes.
Definition StretchType.cpp:109
virtual ~StretchType()
Destructor.
Definition StretchType.cpp:89
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16