|
Isis 3.0 Developer's Reference (API) |
Home |
This is the base class for advanced stretches. More...
#include <StretchType.h>
Inherits QWidget.
Inherited by Isis::BinaryStretchType, Isis::LinearStretchType, Isis::ManualStretchType, and Isis::SawtoothStretchType.
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. | |
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.
| 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 |
References createStretchTable(), p_cubeHist, p_graph, p_mainLayout, p_stretch, p_table, Isis::HistogramWidget::setHistogram(), stretchChanged(), updateGraph(), and updateTable().
| Isis::StretchType::~StretchType | ( | ) | [virtual] |
Destructor.
References p_cubeHist, and p_stretch.
| QTableWidget * Isis::StretchType::createStretchTable | ( | ) | [protected] |
| Stretch Isis::StretchType::getStretch | ( | ) | [virtual] |
Returns the current stretch object.
Reimplemented in Isis::LinearStretchType.
References p_stretch.
Referenced by updateTable().
| void Isis::StretchType::setHistogram | ( | const Histogram & | hist | ) | [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 |
References p_cubeHist, p_graph, p_stretch, Isis::HistogramWidget::setHistogram(), and setStretch().
Referenced by Isis::AdvancedStretch::setHistogram().
| virtual void Isis::StretchType::setStretch | ( | Stretch | ) | [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::BinaryStretchType, Isis::LinearStretchType, Isis::ManualStretchType, and Isis::SawtoothStretchType.
Referenced by setHistogram(), and Isis::AdvancedStretch::setStretch().
| void Isis::StretchType::stretchChanged | ( | ) | [signal] |
Emitted when a new Stretch object is available.
Referenced by Isis::ManualStretchType::ManualStretchType(), Isis::SawtoothStretchType::setStretch(), Isis::ManualStretchType::setStretch(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), and StretchType().
| void Isis::StretchType::updateGraph | ( | ) | [protected, slot] |
This updates the graph with the current stretch object.
References p_graph, p_stretch, and Isis::HistogramWidget::setStretch().
Referenced by StretchType().
| void Isis::StretchType::updateTable | ( | ) | [protected, slot] |
This updates the table with the current stretch pairs.
References getStretch(), Isis::Stretch::Input(), Isis::Stretch::Output(), p_table, Isis::Stretch::Pairs(), and stretch.
Referenced by Isis::ManualStretchType::ManualStretchType(), Isis::ManualStretchType::setStretch(), and StretchType().
Histogram* Isis::StretchType::p_cubeHist [protected] |
Visible area histogram.
Referenced by Isis::BinaryStretchType::BinaryStretchType(), Isis::SawtoothStretchType::SawtoothStretchType(), setHistogram(), Isis::SawtoothStretchType::setStretch(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), StretchType(), and ~StretchType().
HistogramWidget* Isis::StretchType::p_graph [protected] |
Histogram graph.
Referenced by setHistogram(), StretchType(), and updateGraph().
QGridLayout* Isis::StretchType::p_mainLayout [protected] |
Stretch* Isis::StretchType::p_stretch [protected] |
Current stretch pairs stored here.
Referenced by getStretch(), Isis::LinearStretchType::getStretch(), setHistogram(), Isis::SawtoothStretchType::setStretch(), Isis::ManualStretchType::setStretch(), Isis::LinearStretchType::setStretch(), Isis::BinaryStretchType::setStretch(), StretchType(), updateGraph(), and ~StretchType().
QTableWidget* Isis::StretchType::p_table [protected] |
Pairs table.
Referenced by Isis::ManualStretchType::ManualStretchType(), StretchType(), and updateTable().