#include <ImageCalculatorDialog.h>
This class handles all user input, and calls other classes for actual computation.
Definition at line 38 of file ImageCalculatorDialog.h.
Signals | |
void | imgCalcComplete () |
Public Member Functions | |
ImageCalculatorDialog (GLIMSProject *proj) | |
ImageCalculatorDialog(GLIMSProject *proj) GLIMSProject *proj - the project this is associated with Creates a new ImageCalculatorDialog associated with the specified project;. | |
~ImageCalculatorDialog () | |
~ImageCalculatorDialog() destructor | |
Protected Slots | |
void | doCalculation () |
void doCalculation() Called when the go button is pushed. | |
void | clearEquation () |
void clearEquation() Called when the Clear button is pushed. | |
void | acceptString (char *ch) |
void acceptString(char* ch) char* ch - the string to be added Called when various buttons are pressed that add a string value to the equation (i.e. | |
void | acceptFunction (char *ch) |
void acceptFunction(char* ch) char* ch - the function to be added Called when various buttons are pushed, The function name is passed in as a string, and the parenthesis are places at the end. | |
void | acceptFunction (const QString &ch) |
void acceptFunction(const QString & ch) const QString & ch - the function to be added Same as above, but takes a QString instead of a char*. | |
void | insertBand (QListBoxItem *item) |
void insertBand(QListBoxItem * item) QListBoxItem * item - the layer to be added Adds a variable representing a layer to the equation. | |
void | setColor (int index) |
Protected Member Functions | |
void | buildDialog () |
void buildDialog() Build up the GUI dialog box | |
Protected Attributes | |
GLIMSProject * | mProj |
the project | |
ImageCalculator * | calculator |
the calculator that does processing | |
QPushButton * | go |
start calculation button | |
QPushButton * | cancel |
cancel button | |
QLineEdit * | equation |
the equation entered by user | |
QComboBox * | functions |
possible functions | |
QComboBox * | lineStyle |
possible line styles | |
QListBox * | variables |
possible variables (layers) | |
QVBoxLayout * | vbox |
box layout for layout | |
QComboBox * | algorithms |
ImageCalculatorDialog::ImageCalculatorDialog | ( | GLIMSProject * | proj | ) |
ImageCalculatorDialog(GLIMSProject *proj) GLIMSProject *proj - the project this is associated with Creates a new ImageCalculatorDialog associated with the specified project;.
Definition at line 6 of file ImageCalculatorDialog.cpp.
References buildDialog(), calculator, and mProj.
ImageCalculatorDialog::~ImageCalculatorDialog | ( | ) |
~ImageCalculatorDialog() destructor
Definition at line 15 of file ImageCalculatorDialog.cpp.
References calculator.
void ImageCalculatorDialog::buildDialog | ( | ) | [protected] |
void buildDialog() Build up the GUI dialog box
Definition at line 22 of file ImageCalculatorDialog.cpp.
References acceptFunction(), acceptString(), algorithms, GLIMSGlobals::AVAILCOLORSTR, cancel, clearEquation(), doCalculation(), equation, functions, ImageInterface::getBandNames(), GLIMSProject::getDataset(), ImageInterface::getInterface(), GLIMSLineData::getLDFSet(), GLIMSDataset::getLineData(), go, insertBand(), lineStyle, LineDef::mColor, LineDef::mGlacType, GLIMSGlobals::mGlbGlacTypes, mProj, LineDef::mStyle, ValueButton::setValue(), LineDefSet::size(), variables, and vbox.
Referenced by ImageCalculatorDialog().
void ImageCalculatorDialog::doCalculation | ( | ) | [protected, slot] |
void doCalculation() Called when the go button is pushed.
Starts the calculation with the equation currently in the equation QLineEdit.
Definition at line 310 of file ImageCalculatorDialog.cpp.
References algorithms, ImageCalculator::calculate(), calculator, equation, imgCalcComplete(), lineStyle, and ImageCalculator::setAlgorithm().
Referenced by buildDialog().
void ImageCalculatorDialog::clearEquation | ( | ) | [protected, slot] |
void clearEquation() Called when the Clear button is pushed.
Clears the equation in the QLineEdit.
Definition at line 319 of file ImageCalculatorDialog.cpp.
References equation.
Referenced by buildDialog().
void ImageCalculatorDialog::acceptString | ( | char * | ch | ) | [protected, slot] |
void acceptString(char* ch) char* ch - the string to be added Called when various buttons are pressed that add a string value to the equation (i.e.
things like 'and', 'or', etc).
Definition at line 324 of file ImageCalculatorDialog.cpp.
References equation.
Referenced by buildDialog().
void ImageCalculatorDialog::acceptFunction | ( | char * | ch | ) | [protected, slot] |
void acceptFunction(char* ch) char* ch - the function to be added Called when various buttons are pushed, The function name is passed in as a string, and the parenthesis are places at the end.
(i.e. for a sine function, you would only pass in 'sin' and the parens would be added to display 'sin()' in the equation.
Definition at line 329 of file ImageCalculatorDialog.cpp.
References equation.
Referenced by buildDialog().
void ImageCalculatorDialog::acceptFunction | ( | const QString & | ch | ) | [protected, slot] |
void acceptFunction(const QString & ch) const QString & ch - the function to be added Same as above, but takes a QString instead of a char*.
This is used for the functions drop-down.
Definition at line 344 of file ImageCalculatorDialog.cpp.
References equation.
void ImageCalculatorDialog::insertBand | ( | QListBoxItem * | item | ) | [protected, slot] |
void insertBand(QListBoxItem * item) QListBoxItem * item - the layer to be added Adds a variable representing a layer to the equation.
This is called when an item in the layers listbox is double-clicked.
Definition at line 360 of file ImageCalculatorDialog.cpp.
References equation.
Referenced by buildDialog().
void ImageCalculatorDialog::setColor | ( | int | index | ) | [protected, slot] |
Definition at line 366 of file ImageCalculatorDialog.cpp.
void ImageCalculatorDialog::imgCalcComplete | ( | ) | [signal] |
Referenced by doCalculation().
GLIMSProject* ImageCalculatorDialog::mProj [protected] |
the project
Definition at line 57 of file ImageCalculatorDialog.h.
Referenced by buildDialog(), and ImageCalculatorDialog().
ImageCalculator* ImageCalculatorDialog::calculator [protected] |
the calculator that does processing
Definition at line 58 of file ImageCalculatorDialog.h.
Referenced by doCalculation(), ImageCalculatorDialog(), and ~ImageCalculatorDialog().
QPushButton* ImageCalculatorDialog::go [protected] |
start calculation button
Definition at line 59 of file ImageCalculatorDialog.h.
Referenced by buildDialog().
QPushButton* ImageCalculatorDialog::cancel [protected] |
QLineEdit* ImageCalculatorDialog::equation [protected] |
the equation entered by user
Definition at line 61 of file ImageCalculatorDialog.h.
Referenced by acceptFunction(), acceptString(), buildDialog(), clearEquation(), doCalculation(), and insertBand().
QComboBox* ImageCalculatorDialog::functions [protected] |
possible functions
Definition at line 62 of file ImageCalculatorDialog.h.
Referenced by buildDialog().
QComboBox* ImageCalculatorDialog::lineStyle [protected] |
possible line styles
Definition at line 63 of file ImageCalculatorDialog.h.
Referenced by buildDialog(), and doCalculation().
QListBox* ImageCalculatorDialog::variables [protected] |
possible variables (layers)
Definition at line 64 of file ImageCalculatorDialog.h.
Referenced by buildDialog().
QVBoxLayout* ImageCalculatorDialog::vbox [protected] |
box layout for layout
Definition at line 65 of file ImageCalculatorDialog.h.
Referenced by buildDialog().
QComboBox* ImageCalculatorDialog::algorithms [protected] |
Definition at line 68 of file ImageCalculatorDialog.h.
Referenced by buildDialog(), and doCalculation().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |