remove build dir from git
This commit is contained in:
parent
64e01ea599
commit
278db0b23f
|
@ -32,8 +32,28 @@ ChannelWidget::~ChannelWidget()
|
|||
// Nothing to clean up
|
||||
}
|
||||
|
||||
uint16_t ChannelWidget::getDeviceSerial() const
|
||||
{
|
||||
return deviceSerial;
|
||||
}
|
||||
|
||||
uint16_t ChannelWidget::getChannelNumber() const
|
||||
{
|
||||
return channelNumber;
|
||||
}
|
||||
|
||||
bool ChannelWidget::isChecked() const
|
||||
{
|
||||
return checkbox->isChecked();
|
||||
}
|
||||
|
||||
void ChannelWidget::onChannelToggled(bool checked)
|
||||
{
|
||||
if (checked) {
|
||||
// Emit signal before actually turning on the channel
|
||||
emit channelAboutToBeTurnedOn(deviceSerial, channelNumber);
|
||||
}
|
||||
|
||||
channel_t channelFlag = static_cast<channel_t>(1 << channelNumber);
|
||||
if (checked) {
|
||||
if (eismultiplexer_connect_channel(multiplexer, channelFlag) < 0) {
|
||||
|
|
|
@ -19,6 +19,13 @@ public:
|
|||
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);
|
||||
|
||||
|
@ -27,7 +34,7 @@ private:
|
|||
uint16_t channelNumber;
|
||||
struct eismultiplexer* multiplexer;
|
||||
QCheckBox* checkbox;
|
||||
QLabel* label; // No need for tr() function, QObject already provides it
|
||||
QLabel* label;
|
||||
};
|
||||
|
||||
#endif // CHANNELWIDGET_H
|
||||
|
|
|
@ -22,7 +22,8 @@ public:
|
|||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow() override;
|
||||
|
||||
// No need for tr() function, QObject already provides it
|
||||
private slots:
|
||||
void onChannelAboutToBeTurnedOn(uint16_t deviceSerial, uint16_t channelNumber);
|
||||
|
||||
private:
|
||||
void enumerateDevices();
|
||||
|
|
Loading…
Reference in a new issue