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
17namespace 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
44 QMap<QString, QStringList > p_map;
45 QString p_lastKey;
46 QStringList p_keys;
47 };
48}
49
50#endif
Definition BandSpinBox.h:23
void setBandBin(Pvl &pvl, const QString &key="BandNumber")
Sets the band bin.
Definition BandSpinBox.cpp:41
QSize sizeHint() const
returns a size hint for the spin box
Definition BandSpinBox.cpp:182
void setKey(QString key)
Sets the key to the provided key.
Definition BandSpinBox.cpp:101
QString textFromValue(int val) const
Gets the text using p_map.
Definition BandSpinBox.cpp:141
int valueFromText(const QString &text) const
gets the value (int) using p_map.
Definition BandSpinBox.cpp:165
BandSpinBox(QWidget *parent=0)
BandSpinBox constructor.
Definition BandSpinBox.cpp:21
QValidator::State validate(QString &input, int &pos) const
returns how valid the value from the spin box is.
Definition BandSpinBox.cpp:216
QStringList BandBinKeys()
returns the list of keys.
Definition BandSpinBox.cpp:90
Container for cube-like labels.
Definition Pvl.h:119
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16