FemaLocalSoftware/sensorwidget.h
Lopata PC 9e459078e1 SensorTab all Done
paginationBar Done
2024-12-16 11:38:04 +03:00

37 lines
714 B
C++

#ifndef SENSORWIDGET_H
#define SENSORWIDGET_H
#include "getsensors_r.h"
#include <QFrame>
#include <QLabel>
#include <QVBoxLayout>
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