Isis 3.0 Object Programmers' Reference |
Home |
This is the base class for advanced stretches. More...
#include <StretchType.h>
Signals | |
void | stretchChanged () |
Emitted when a new Stretch object is available. | |
Public Member Functions | |
StretchType (const Histogram &hist, const Stretch &stretch, const QString &name, const QColor &color) | |
This constructs a stretch type. | |
virtual | ~StretchType () |
Destructor. | |
virtual Stretch | getStretch () |
Returns the current stretch object. | |
virtual void | setStretch (Stretch)=0 |
Children must re-implement this to update their stretch pairs and GUI elements appropriately. | |
virtual void | setHistogram (const Histogram &) |
This should be called when the visible area changes. | |
Protected Slots | |
void | updateGraph () |
This updates the graph with the current stretch object. | |
void | updateTable () |
This updates the table with the current stretch pairs. | |
Protected Member Functions | |
QTableWidget * | createStretchTable () |
This creates the stretch pairs table. | |
Protected Attributes | |
QGridLayout * | p_mainLayout |
Main layout. | |
Histogram * | p_cubeHist |
Visible area histogram. | |
QTableWidget * | p_table |
Pairs table. | |
HistogramWidget * | p_graph |
Histogram graph. | |
Stretch * | p_stretch |
Current stretch pairs stored here. | |
Private Slots | |
void | savePairs () |
This asks the user for a file and saves the current stretch pairs to that file. | |
This is the base class for advanced stretches.
This has the common functionality between the advanced stretch types. It provides a histogram, the stretch table, and layouts. It also stores the stretch pairs. Using this should keep all of the advanced stretch interfaces similar and uniformly accessible from the stretch tool.
Definition at line 38 of file StretchType.h.
Isis::StretchType::StretchType | ( | const Histogram & | hist, |
const Stretch & | stretch, | ||
const QString & | name, | ||
const QColor & | color | ||
) |
This constructs a stretch type.
It provides a main layout, sizing policies, and a few widgets. Children should insert themselves at the main layout grid row 1 column 0.
hist | |
stretch | |
name | |
color |
Definition at line 30 of file StretchType.cpp.
References createStretchTable(), p_cubeHist, p_graph, p_mainLayout, p_stretch, p_table, savePairs(), Isis::HistogramWidget::setHistogram(), stretchChanged(), updateGraph(), and updateTable().
|
virtual |
|
protected |
This creates the stretch pairs table.
Definition at line 103 of file StretchType.cpp.
Referenced by StretchType().
|
virtual |
Returns the current stretch object.
Reimplemented in Isis::LinearStretchType.
Definition at line 183 of file StretchType.cpp.
References p_stretch.
Referenced by savePairs(), and updateTable().
|
privateslot |
This asks the user for a file and saves the current stretch pairs to that file.
Definition at line 152 of file StretchType.cpp.
References getStretch(), and Isis::Stretch::Text().
Referenced by StretchType().
|
virtual |
This should be called when the visible area changes.
It updates the graph and calls setStretch() so that the children have a chance to update their GUI elements too.
hist |
Definition at line 91 of file StretchType.cpp.
References p_cubeHist, p_graph, p_stretch, Isis::HistogramWidget::setHistogram(), and setStretch().
Referenced by Isis::AdvancedStretch::setHistogram().
|
pure virtual |
Children must re-implement this to update their stretch pairs and GUI elements appropriately.
This could be called with a different histogram but not a different stretch.
Implemented in Isis::SawtoothStretchType, Isis::ManualStretchType, Isis::BinaryStretchType, and Isis::LinearStretchType.
Referenced by setHistogram(), and Isis::AdvancedStretch::setStretch().
|
signal |
Emitted when a new Stretch object is available.
Referenced by Isis::BinaryStretchType::endEditChanged(), Isis::LinearStretchType::endEditChanged(), Isis::ManualStretchType::ManualStretchType(), Isis::SawtoothStretchType::offsetEditChanged(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), Isis::ManualStretchType::setStretch(), Isis::SawtoothStretchType::setStretch(), Isis::BinaryStretchType::startEditChanged(), Isis::LinearStretchType::startEditChanged(), StretchType(), and Isis::SawtoothStretchType::widthEditChanged().
|
protectedslot |
This updates the graph with the current stretch object.
Definition at line 122 of file StretchType.cpp.
References p_graph, p_stretch, and Isis::HistogramWidget::setStretch().
Referenced by StretchType().
|
protectedslot |
This updates the table with the current stretch pairs.
Definition at line 130 of file StretchType.cpp.
References getStretch(), Isis::Stretch::Input(), Isis::Stretch::Output(), p_table, and Isis::Stretch::Pairs().
Referenced by Isis::ManualStretchType::ManualStretchType(), Isis::ManualStretchType::setStretch(), and StretchType().
|
protected |
Visible area histogram.
Definition at line 67 of file StretchType.h.
Referenced by Isis::BinaryStretchType::BinaryStretchType(), Isis::BinaryStretchType::calculateNewStretch(), Isis::SawtoothStretchType::calculateNewStretch(), Isis::BinaryStretchType::endEditChanged(), Isis::LinearStretchType::endEditChanged(), Isis::BinaryStretchType::endSliderMoved(), Isis::LinearStretchType::endSliderMoved(), Isis::SawtoothStretchType::offsetEditChanged(), Isis::SawtoothStretchType::offsetSliderMoved(), Isis::SawtoothStretchType::SawtoothStretchType(), setHistogram(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), Isis::SawtoothStretchType::setStretch(), Isis::BinaryStretchType::startEditChanged(), Isis::LinearStretchType::startEditChanged(), Isis::BinaryStretchType::startSliderMoved(), Isis::LinearStretchType::startSliderMoved(), StretchType(), Isis::SawtoothStretchType::widthEditChanged(), Isis::SawtoothStretchType::widthSliderMoved(), and ~StretchType().
|
protected |
Histogram graph.
Definition at line 69 of file StretchType.h.
Referenced by setHistogram(), StretchType(), and updateGraph().
|
protected |
Main layout.
Definition at line 66 of file StretchType.h.
Referenced by Isis::BinaryStretchType::BinaryStretchType(), Isis::LinearStretchType::LinearStretchType(), Isis::ManualStretchType::ManualStretchType(), Isis::SawtoothStretchType::SawtoothStretchType(), and StretchType().
|
protected |
Current stretch pairs stored here.
Definition at line 70 of file StretchType.h.
Referenced by Isis::BinaryStretchType::endEditChanged(), Isis::LinearStretchType::endEditChanged(), Isis::LinearStretchType::getStretch(), getStretch(), Isis::SawtoothStretchType::offsetEditChanged(), setHistogram(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), Isis::ManualStretchType::setStretch(), Isis::SawtoothStretchType::setStretch(), Isis::BinaryStretchType::startEditChanged(), Isis::LinearStretchType::startEditChanged(), StretchType(), updateGraph(), Isis::SawtoothStretchType::widthEditChanged(), and ~StretchType().
|
protected |
Pairs table.
Definition at line 68 of file StretchType.h.
Referenced by Isis::ManualStretchType::addButtonPressed(), Isis::ManualStretchType::deleteButtonPressed(), Isis::ManualStretchType::ManualStretchType(), StretchType(), and updateTable().