32 lines
853 B
C++
32 lines
853 B
C++
#ifndef LOGWIDGET_H
|
|
#define LOGWIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QLabel>
|
|
|
|
class LogWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit LogWidget(QMap<QString, QMap<QString, QPair<QString, QString>>> &translate,
|
|
const QString &time = "",
|
|
const QString &log = "",
|
|
const QString &sensorId = "",
|
|
const QString &group = "",
|
|
const int status = 4,
|
|
QWidget *parent = nullptr);
|
|
|
|
private:
|
|
QLabel *createLabel(const QString &text, int minSize = 100, int maxSize = 250);
|
|
|
|
private:
|
|
QMap<QString, QMap<QString, QPair<QString, QString>>> _translate;
|
|
QLabel *timeLabel;
|
|
QLabel *logLabel;
|
|
QLabel *sensorIdLabel;
|
|
QLabel *groupLabel;
|
|
QLabel *statusLabel;
|
|
};
|
|
|
|
#endif // LOGWIDGET_H
|