iCub-main
Loading...
Searching...
No Matches
customcombobox.h
Go to the documentation of this file.
1#ifndef CUSTOMCOMBOBOX_H
2#define CUSTOMCOMBOBOX_H
3
4#include <QObject>
5#include <QComboBox>
6#include <QMutex>
7
8#define GAINAMPROLE Qt::UserRole + 1
9
10class CustomComboBox : public QComboBox
11{
12 Q_OBJECT
13
14public:
15 CustomComboBox(QWidget *parent = nullptr);
16 void clear();
17 void setCurrIndex(int v);
18 void initItems();
19 void clearItems();
20 void addCustomValue(float val);
21 void setIndexFromAmpGain(int g);
22
23private:
24 int previousIndex;
25 bool modified;
26 bool initialized;
27 QMutex mutex;
28
29private slots:
30 void onCurrentIndexChanged(int v);
31};
32
33#endif // CUSTOMCOMBOBOX_H
void setCurrIndex(int v)
void addCustomValue(float val)
void setIndexFromAmpGain(int g)