Isis 3 Programmer Reference
|
This handles arbitrary user-input stretches. More...
#include <ManualStretchType.h>
Signals | |
void | saveToCube () |
Emitted when a new Stretch object is available. | |
void | deleteFromCube () |
void | stretchChanged () |
void | loadStretch () |
Public Member Functions | |
ManualStretchType (const Histogram &, const Stretch &, const QString &name, const QColor &color) | |
This constructs a manual stretch type. | |
~ManualStretchType () | |
Destructor. | |
virtual CubeStretch | getStretch () |
Gets the current CubeStretch for this ManualStretch. | |
virtual void | setStretch (Stretch) |
Given an arbitrary stretch, this will re-interpret it, as best as possible, into a manual stretch. | |
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 | addButtonPressed (bool) |
This is called when a user clicks "Add / Edit" and is responsible for adding the pair into the correct location or editing the pair at that location (input value). | |
void | deleteButtonPressed (bool) |
This is called when a user clicks "Delete" and is responsible for removing the pair with the given input value. | |
void | readTable () |
void | savePairs () |
This asks the user for a file and saves the current stretch pairs to that file. | |
Private Member Functions | |
Stretch | convertTableToStretch () |
Private Attributes | |
QLabel * | p_errorMessage |
This handles arbitrary user-input stretches.
This is designed to take any stretch pairs the user wants that we can handle.
Definition at line 32 of file ManualStretchType.h.
Isis::ManualStretchType::ManualStretchType | ( | const Histogram & | hist, |
const Stretch & | stretch, | ||
const QString & | name, | ||
const QColor & | color ) |
This constructs a manual stretch type.
hist | |
stretch | |
name | |
color |
Definition at line 25 of file ManualStretchType.cpp.
References addButtonPressed(), deleteButtonPressed(), Isis::StretchType::p_mainLayout, Isis::StretchType::p_table, setStretch(), and Isis::StretchType::updateTable().
Isis::ManualStretchType::~ManualStretchType | ( | ) |
Destructor.
Definition at line 67 of file ManualStretchType.cpp.
|
privateslot |
This is called when a user clicks "Add / Edit" and is responsible for adding the pair into the correct location or editing the pair at that location (input value).
Definition at line 99 of file ManualStretchType.cpp.
References Isis::StretchType::p_table.
Referenced by ManualStretchType().
|
private |
Definition at line 127 of file ManualStretchType.cpp.
|
protectedinherited |
This creates the stretch pairs table.
Definition at line 121 of file StretchType.cpp.
Referenced by Isis::StretchType::StretchType().
|
privateslot |
This is called when a user clicks "Delete" and is responsible for removing the pair with the given input value.
Definition at line 108 of file ManualStretchType.cpp.
References Isis::StretchType::p_table, and Isis::IException::User.
Referenced by ManualStretchType().
|
virtual |
Gets the current CubeStretch for this ManualStretch.
Reimplemented from Isis::StretchType.
Definition at line 160 of file ManualStretchType.cpp.
References Isis::StretchType::p_stretch.
|
privateslot |
Definition at line 121 of file ManualStretchType.cpp.
|
privateslotinherited |
This asks the user for a file and saves the current stretch pairs to that file.
Definition at line 170 of file StretchType.cpp.
References Isis::StretchType::getStretch(), and Isis::Stretch::Text().
Referenced by Isis::StretchType::StretchType().
|
signalinherited |
Emitted when a new Stretch object is available.
Referenced by Isis::StretchType::StretchType().
|
virtualinherited |
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 109 of file StretchType.cpp.
References Isis::StretchType::p_cubeHist, Isis::StretchType::p_graph, Isis::StretchType::p_stretch, Isis::HistogramWidget::setHistogram(), and Isis::StretchType::setStretch().
|
virtual |
Given an arbitrary stretch, this will re-interpret it, as best as possible, into a manual stretch.
It is required that a stretch that represents a manual stretch always translate into itself and does not cause a stretchChanged().
It is necessary to always update slider positions in this method even if the stretch did not change.
Good thing this is a manual stretch so no interpretation is really needed.
newStretch | Stretch to interpret |
Implements Isis::StretchType.
Definition at line 85 of file ManualStretchType.cpp.
References Isis::Stretch::CopyPairs(), Isis::StretchType::p_stretch, Isis::Stretch::Text(), and Isis::StretchType::updateTable().
Referenced by ManualStretchType().
|
protectedslotinherited |
This updates the graph with the current stretch object.
Definition at line 140 of file StretchType.cpp.
References Isis::StretchType::p_graph, Isis::StretchType::p_stretch, and Isis::HistogramWidget::setStretch().
Referenced by Isis::StretchType::StretchType().
|
protectedslotinherited |
This updates the table with the current stretch pairs.
Definition at line 148 of file StretchType.cpp.
References Isis::StretchType::getStretch(), Isis::Stretch::Input(), Isis::Stretch::Output(), Isis::StretchType::p_table, and Isis::Stretch::Pairs().
Referenced by ManualStretchType(), setStretch(), and Isis::StretchType::StretchType().
|
protectedinherited |
Visible area histogram.
Definition at line 68 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(), Isis::StretchType::setHistogram(), Isis::BinaryStretchType::setStretch(), Isis::LinearStretchType::setStretch(), Isis::SawtoothStretchType::setStretch(), Isis::BinaryStretchType::startEditChanged(), Isis::LinearStretchType::startEditChanged(), Isis::BinaryStretchType::startSliderMoved(), Isis::LinearStretchType::startSliderMoved(), Isis::StretchType::StretchType(), Isis::SawtoothStretchType::widthEditChanged(), Isis::SawtoothStretchType::widthSliderMoved(), and Isis::StretchType::~StretchType().
|
private |
Definition at line 51 of file ManualStretchType.h.
|
protectedinherited |
Histogram graph.
Definition at line 70 of file StretchType.h.
Referenced by Isis::StretchType::setHistogram(), Isis::StretchType::StretchType(), and Isis::StretchType::updateGraph().
|
protectedinherited |
Main layout.
Definition at line 67 of file StretchType.h.
Referenced by Isis::BinaryStretchType::BinaryStretchType(), Isis::LinearStretchType::LinearStretchType(), ManualStretchType(), Isis::SawtoothStretchType::SawtoothStretchType(), and Isis::StretchType::StretchType().
|
protectedinherited |
Current stretch pairs stored here.
Definition at line 71 of file StretchType.h.
Referenced by Isis::BinaryStretchType::endEditChanged(), Isis::LinearStretchType::endEditChanged(), Isis::BinaryStretchType::getStretch(), Isis::LinearStretchType::getStretch(), getStretch(), Isis::SawtoothStretchType::getStretch(), Isis::StretchType::getStretch(), Isis::SawtoothStretchType::offsetEditChanged(), Isis::StretchType::setHistogram(), Isis::BinaryStretchType::setStretch(), Isis::LinearStretchType::setStretch(), setStretch(), Isis::SawtoothStretchType::setStretch(), Isis::BinaryStretchType::startEditChanged(), Isis::LinearStretchType::startEditChanged(), Isis::StretchType::StretchType(), Isis::StretchType::updateGraph(), Isis::SawtoothStretchType::widthEditChanged(), and Isis::StretchType::~StretchType().
|
protectedinherited |
Pairs table.
Definition at line 69 of file StretchType.h.
Referenced by addButtonPressed(), deleteButtonPressed(), ManualStretchType(), Isis::StretchType::StretchType(), and Isis::StretchType::updateTable().