2026-08-18 09:40:43 +08:00
|
|
|
#ifndef DEVICEPAGE_H
|
|
|
|
|
#define DEVICEPAGE_H
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
|
|
#include "../services/deviceservice.h"
|
|
|
|
|
|
|
|
|
|
namespace Ui { class DevicePage; }
|
2026-08-24 17:28:59 +08:00
|
|
|
class QLabel;
|
2026-08-18 09:40:43 +08:00
|
|
|
|
|
|
|
|
class DevicePage : public QWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit DevicePage(QWidget *parent = nullptr);
|
|
|
|
|
~DevicePage();
|
|
|
|
|
|
2026-08-23 09:41:44 +08:00
|
|
|
public slots:
|
2026-08-18 09:40:43 +08:00
|
|
|
void updateStatus(const DeviceStatus &status);
|
|
|
|
|
void handleCommunicationError(const QString &error);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void setupTable();
|
|
|
|
|
void setRow(int row, const QStringList &values);
|
|
|
|
|
|
|
|
|
|
Ui::DevicePage *ui;
|
2026-08-24 17:28:59 +08:00
|
|
|
QLabel *communicationErrorLabel;
|
2026-08-18 09:40:43 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // DEVICEPAGE_H
|