ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
propertycontrolenum.h
Go to the documentation of this file.
1
23
24#ifndef PROPERTYCONTROLENUM_H
25#define PROPERTYCONTROLENUM_H
26
27#include <peak/peak.hpp>
28
29#include <QComboBox>
30#include <QHBoxLayout>
31#include <QLabel>
32#include <QObject>
33#include <QString>
34#include <QStringList>
35#include <QWidget>
36
37
38class PropertyControlEnum : public QWidget
39{
40 Q_OBJECT
41
42public:
43 explicit PropertyControlEnum(std::string name, std::shared_ptr<peak::core::NodeMap> nodeMap,
44 QStringList items, QObject* parent = nullptr, std::string selectorName = "");
45 void setItems(QStringList items);
46 QString getValue();
47 void setEnabled(bool enabled);
48 bool isEnabled();
49 QHBoxLayout* getLayout();
50
51private:
52 std::shared_ptr<peak::core::NodeMap> m_nodemapRemoteDevice;
53 std::string m_nodeName;
54 std::string m_selectorName;
55
56 QHBoxLayout* m_layout = nullptr;
57 QLabel* m_label = nullptr;
58 QComboBox* m_comboBox = nullptr;
60
61signals:
62 void valueChanged(QString value);
63 void messageBoxTrigger(QString messageTitle, QString messageText);
65
66public slots:
67 void setValue(QString value);
68};
69
70#endif // PROPERTYCONTROLENUM_H
void messageBoxTrigger(QString messageTitle, QString messageText)
void setValue(QString value)
Definition propertycontrolenum.cpp:55
PropertyControlEnum(std::string name, std::shared_ptr< peak::core::NodeMap > nodeMap, QStringList items, QObject *parent=nullptr, std::string selectorName="")
Definition propertycontrolenum.cpp:28
QLabel * m_label
Definition propertycontrolenum.h:57
QComboBox * m_comboBox
Definition propertycontrolenum.h:58
void setEnabled(bool enabled)
Definition propertycontrolenum.cpp:87
std::string m_nodeName
Definition propertycontrolenum.h:53
bool m_enabled
Definition propertycontrolenum.h:59
QString getValue()
Definition propertycontrolenum.cpp:82
void setItems(QStringList items)
Definition propertycontrolenum.cpp:47
void valueChanged(QString value)
QHBoxLayout * m_layout
Definition propertycontrolenum.h:56
std::string m_selectorName
Definition propertycontrolenum.h:54
std::shared_ptr< peak::core::NodeMap > m_nodemapRemoteDevice
Definition propertycontrolenum.h:52
QHBoxLayout * getLayout()
Definition propertycontrolenum.cpp:99
bool isEnabled()
Definition propertycontrolenum.cpp:94