FemaLocalSoftware/sensorwidget.h
lopata29435_NSK 3af06d02ec finish
2025-01-08 05:13:48 +07:00

36 lines
687 B
C++

#ifndef SENSORWIDGET_H
#define SENSORWIDGET_H
#include <QFrame>
#include <QLabel>
#include <QVBoxLayout>
#include "getsensors_r.h"
class SensorWidget : public QFrame
{
Q_OBJECT
public:
explicit SensorWidget(QWidget *parent = nullptr, const Sensor &sensor = Sensor());
void setErrorState();
Sensor getSensor() const;
void setSensor(const Sensor value);
signals:
void clicked(SensorWidget *sensor);
protected:
void mousePressEvent(QMouseEvent *event) override;
private:
Sensor sensor;
QLabel *titleLabel;
QLabel *valueLabel;
QLabel *incidentLabel;
QVBoxLayout *layout;
};
#endif // SENSORWIDGET_H