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