Isis Developer Reference
BandSpinBox.h
Go to the documentation of this file.
1 #ifndef BandSpinBox_h
2 #define BandSpinBox_h
3 
10 /* SPDX-License-Identifier: CC0-1.0 */
11 
12 #include <QSpinBox>
13 #include <QMap>
14 
15 #include "Pvl.h"
16 
17 namespace Isis {
23  class BandSpinBox : public QSpinBox {
24  Q_OBJECT
25 
26  public:
27  BandSpinBox(QWidget *parent = 0);
28  void setBandBin(Pvl &pvl, const QString &key = "BandNumber");
30  QSize sizeHint() const;
31  QValidator::State validate(QString &input, int &pos) const;
32 
33  public slots:
34  void setKey(QString key);
35  void setKey(int key);
36 
37  protected:
38  QString textFromValue(int val) const;
39  int valueFromText(const QString &text) const;
40 
41  private:
42  int p_bands;
43 
45  QString p_lastKey;
46  QStringList p_keys;
47  };
48 }
49 
50 #endif
Isis::BandSpinBox
Definition: BandSpinBox.h:23
QWidget
Isis::BandSpinBox::setKey
void setKey(QString key)
Sets the key to the provided key.
Definition: BandSpinBox.cpp:101
BandSpinBox.h
Isis::Pvl
Container for cube-like labels.
Definition: Pvl.h:119
Isis::BandSpinBox::valueFromText
int valueFromText(const QString &text) const
gets the value (int) using p_map.
Definition: BandSpinBox.cpp:165
QStringList
Isis::BandSpinBox::setBandBin
void setBandBin(Pvl &pvl, const QString &key="BandNumber")
Sets the band bin.
Definition: BandSpinBox.cpp:41
Isis::BandSpinBox::textFromValue
QString textFromValue(int val) const
Gets the text using p_map.
Definition: BandSpinBox.cpp:141
Isis::PvlGroup
Contains multiple PvlContainers.
Definition: PvlGroup.h:41
Pvl.h
Isis::BandSpinBox::BandSpinBox
BandSpinBox(QWidget *parent=0)
BandSpinBox constructor.
Definition: BandSpinBox.cpp:21
_FILEINFO_
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
Isis::BandSpinBox::sizeHint
QSize sizeHint() const
returns a size hint for the spin box
Definition: BandSpinBox.cpp:182
Isis::PvlObject::findObject
PvlObjectIterator findObject(const QString &name, PvlObjectIterator beg, PvlObjectIterator end)
Find the index of object with a specified name, between two indexes.
Definition: PvlObject.h:274
Isis::PvlContainer::name
QString name() const
Returns the container name.
Definition: PvlContainer.h:63
Isis::IException
Isis exception class.
Definition: IException.h:91
IException.h
Isis::IException::Programmer
@ Programmer
This error is for when a programmer made an API call that was illegal.
Definition: IException.h:146
QMap< QString, QStringList >
Isis::PvlContainer::keywords
int keywords() const
Returns the number of keywords contained in the PvlContainer.
Definition: PvlContainer.h:86
Isis::BandSpinBox::validate
QValidator::State validate(QString &input, int &pos) const
returns how valid the value from the spin box is.
Definition: BandSpinBox.cpp:216
Isis::BandSpinBox::BandBinKeys
QStringList BandBinKeys()
returns the list of keys.
Definition: BandSpinBox.cpp:90
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
QSpinBox