- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
|
|
|
|
#pragma once
|
|
|
|
#include <Buildings/bld_enums.hpp>
|
|
#include <Buildings/logger.h>
|
|
#include <InfrastructureManagement/ism_enums.hpp>
|
|
#include <QDateTime>
|
|
#include <QWidget>
|
|
|
|
namespace Ui
|
|
{
|
|
class RelayInfoWidget;
|
|
}
|
|
|
|
namespace Buildings
|
|
{
|
|
|
|
class RelayInfoWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit RelayInfoWidget(int id, QWidget* parent = nullptr);
|
|
~RelayInfoWidget();
|
|
|
|
QString name() const;
|
|
bool state() const;
|
|
int id() const;
|
|
|
|
signals:
|
|
void effectOverrideChanged(int relayId, InfrastructureManagement::EffectOverride override);
|
|
|
|
public slots:
|
|
void setName(const QString& name);
|
|
void setState(bool state, qint64 stateTime, qint64 offlineTime);
|
|
void setEffectOverride(InfrastructureManagement::EffectOverride override);
|
|
void setEffectOverrideEnabled(InfrastructureManagement::EffectOverride override, bool enable = true);
|
|
void setLedVisible(bool enable = true);
|
|
void setOfflineColor();
|
|
|
|
private slots:
|
|
void onButtonClicked();
|
|
|
|
private:
|
|
NGL::INGLLogger& m_logger;
|
|
int m_id;
|
|
bool m_state;
|
|
Ui::RelayInfoWidget* m_ui;
|
|
};
|
|
|
|
} // namespace Buildings
|