Isis 3 Programmer Reference
Isis::BandSpinBox Class Reference

#include <BandSpinBox.h>

Inheritance diagram for Isis::BandSpinBox:
Inheritance graph
Collaboration diagram for Isis::BandSpinBox:
Collaboration graph

Public Slots

void setKey (QString key)
 Sets the key to the provided key. More...
 
void setKey (int key)
 Sets the key to the provided key. More...
 

Public Member Functions

 BandSpinBox (QWidget *parent=0)
 BandSpinBox constructor. More...
 
void setBandBin (Pvl &pvl, const QString &key="BandNumber")
 Sets the band bin. More...
 
QStringList BandBinKeys ()
 returns the list of keys. More...
 
QSize sizeHint () const
 returns a size hint for the spin box More...
 
QValidator::State validate (QString &input, int &pos) const
 returns how valid the value from the spin box is. More...
 

Protected Member Functions

QString textFromValue (int val) const
 Gets the text using p_map. More...
 
int valueFromText (const QString &text) const
 gets the value (int) using p_map. More...
 

Private Attributes

int p_bands
 Number of bands. More...
 
QMap< QString, QStringListp_map
 The maps the last key to all the keys. More...
 
QString p_lastKey
 The last key. More...
 
QStringList p_keys
 List of all the keys. More...
 

Detailed Description

Author
????-??-?? Unknown

Definition at line 15 of file BandSpinBox.h.

Constructor & Destructor Documentation

◆ BandSpinBox()

Isis::BandSpinBox::BandSpinBox ( QWidget parent = 0)

BandSpinBox constructor.

Parameters
parent

Definition at line 13 of file BandSpinBox.cpp.

References p_bands, p_lastKey, and p_map.

Member Function Documentation

◆ BandBinKeys()

QStringList Isis::BandSpinBox::BandBinKeys ( )

returns the list of keys.

Returns
QStringList

Definition at line 82 of file BandSpinBox.cpp.

References p_keys.

◆ setBandBin()

void Isis::BandSpinBox::setBandBin ( Pvl pvl,
const QString &  key = "BandNumber" 
)

Sets the band bin.

Parameters
pvl
key

Definition at line 33 of file BandSpinBox.cpp.

References Isis::PvlObject::findObject(), Isis::PvlContainer::keywords(), Isis::PvlContainer::name(), p_bands, p_keys, p_map, and setKey().

◆ setKey [1/2]

void Isis::BandSpinBox::setKey ( QString  key)
slot

Sets the key to the provided key.

Parameters
key

Definition at line 93 of file BandSpinBox.cpp.

References _FILEINFO_, p_lastKey, p_map, and Isis::IException::Programmer.

Referenced by setBandBin(), and setKey().

◆ setKey [2/2]

void Isis::BandSpinBox::setKey ( int  key)
slot

Sets the key to the provided key.

Parameters
key

Definition at line 115 of file BandSpinBox.cpp.

References _FILEINFO_, p_keys, p_map, Isis::IException::Programmer, and setKey().

◆ sizeHint()

QSize Isis::BandSpinBox::sizeHint ( ) const

returns a size hint for the spin box

Returns
QSize

Definition at line 174 of file BandSpinBox.cpp.

References textFromValue().

◆ textFromValue()

QString Isis::BandSpinBox::textFromValue ( int  val) const
protected

Gets the text using p_map.

Parameters
val
Returns
QString

Definition at line 133 of file BandSpinBox.cpp.

References p_bands, p_lastKey, and p_map.

Referenced by sizeHint().

◆ validate()

QValidator::State Isis::BandSpinBox::validate ( QString &  input,
int &  pos 
) const

returns how valid the value from the spin box is.

Parameters
input
pos
Returns
QValidator::State

Definition at line 208 of file BandSpinBox.cpp.

References p_lastKey, and p_map.

◆ valueFromText()

int Isis::BandSpinBox::valueFromText ( const QString &  text) const
protected

gets the value (int) using p_map.

Parameters
text
Returns
int

Definition at line 157 of file BandSpinBox.cpp.

References p_lastKey, and p_map.

Member Data Documentation

◆ p_bands

int Isis::BandSpinBox::p_bands
private

Number of bands.

Definition at line 34 of file BandSpinBox.h.

Referenced by BandSpinBox(), setBandBin(), and textFromValue().

◆ p_keys

QStringList Isis::BandSpinBox::p_keys
private

List of all the keys.

Definition at line 38 of file BandSpinBox.h.

Referenced by BandBinKeys(), setBandBin(), and setKey().

◆ p_lastKey

QString Isis::BandSpinBox::p_lastKey
private

The last key.

Definition at line 37 of file BandSpinBox.h.

Referenced by BandSpinBox(), setKey(), textFromValue(), validate(), and valueFromText().

◆ p_map

QMap<QString, QStringList > Isis::BandSpinBox::p_map
private

The maps the last key to all the keys.

Definition at line 36 of file BandSpinBox.h.

Referenced by BandSpinBox(), setBandBin(), setKey(), textFromValue(), validate(), and valueFromText().


The documentation for this class was generated from the following files: