eismultiplexer-qt/channelwidget.h
Carl Philipp Klemm 5c5efb5029 Support windows
2025-08-25 17:00:16 +02:00

50 lines
1 KiB
C++

#ifndef CHANNELWIDGET_H
#define CHANNELWIDGET_H
#include <QWidget>
#include <QCheckBox>
#include <QLabel>
#include <QHBoxLayout>
#include <QComboBox>
#include <eismultiplexer.h>
#include <memory>
class ChannelWidget : public QWidget
{
Q_OBJECT
public:
explicit ChannelWidget(uint16_t deviceSerial, uint16_t channelNumber,
std::shared_ptr<struct eismultiplexer> multiplexer,
QWidget *parent = nullptr);
~ChannelWidget() override;
uint16_t getDeviceSerial() const;
uint16_t getChannelNumber() const;
bool isChecked() const;
signals:
void channelAboutToBeTurnedOn(uint16_t deviceSerial, uint16_t channelNumber);
private slots:
void onChannelToggled(bool checked);
private:
uint16_t deviceSerial;
uint16_t channelNumber;
std::shared_ptr<struct eismultiplexer> multiplexer;
QCheckBox checkbox;
QLabel devicelabel;
QLabel channellabel;
QLabel ganglabel;
QComboBox gangcombo;
QFrame line;
QVBoxLayout vlayout;
QHBoxLayout hlayout;
QVBoxLayout labellayout;
};
#endif // CHANNELWIDGET_H