#ifndef ALARMWIDGET_H #define ALARMWIDGET_H #include "sensorservice.h" #include #include #include #include #include #include class AlarmWidget : public QWidget { Q_OBJECT public: explicit AlarmWidget(QMap>> &translate, const QString &sensorId = "", const QString &group = "", const QString &date = "", const QString &time = "", const QString &timeEnd = "", SensorService *sensorService = nullptr, QWidget *parent = nullptr); private: QLabel *createLabel(const QString &text, int minSize = 100, int maxSize = 250); signals: void dialogClosedFromWidget(QString groupWithSensor, QDateTime start, QDateTime end); private slots: void onInfoButtonClicked(); void onDialogClosed(); private: QMap>> _translate; const QString _timeEnd; const QString _sensorId; SensorService *_sensorService; QLabel *groupLabel; QLabel *sensorLabel; QLabel *dateLabel; QLabel *timeLabel; QPushButton *infoButton; }; #endif // ALARMWIDGET_H