-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcombo_smokertype.h
More file actions
38 lines (26 loc) · 1.07 KB
/
combo_smokertype.h
File metadata and controls
38 lines (26 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef SMOKERTYPECOMBOBOX_H
#define SMOKERTYPECOMBOBOX_H
#include <QObject>
#include <QComboBox>
#include <op_defines.h>
class SmokerTypeComboBox : public QComboBox
{
Q_OBJECT
public:
explicit SmokerTypeComboBox(QWidget *parent = 0);
// These return the enum code or label
int getCode(QString label);
QString getLabel(int code);
Smoker_t getCurrentSmokerType(void);
signals:
void currentSmokerTypeChanged(QString); // Custom signal to tell us the new Smoker type in String format
void currentSmokerTypeChanged(QByteArray); // Custom signal to tell us the new Smoker type, converting the enum to a ByteArray (used to save into data array)
void currentSmokerTypeChanged(Smoker_t); // here we pass back an actual smoker type
public slots:
void setCurrentSmokerType(const Smoker_t& smokerType);
void setCurrentSmokerType(int smokerTypeCode);
private slots:
void emitSmokerTypeChanged(); // We will connect this slot to the built-in index changed, and emit our custom signals
private:
};
#endif // SMOKERTYPECOMBOBOX_H