35 lines
777 B
C++
35 lines
777 B
C++
#ifndef FAULTQUERYPAGE_H
|
|
#define FAULTQUERYPAGE_H
|
|
|
|
#include "base.h"
|
|
#include <QVector>
|
|
|
|
class FaultTable;
|
|
class QLabel;
|
|
class QPushButton;
|
|
|
|
// ===================== ⑫ 故障查询界面 =====================
|
|
class FaultQueryPage : public BasePage
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit FaultQueryPage(AppContext* ctx, QWidget* parent = nullptr);
|
|
|
|
void setReturnPage(PageId id) { m_returnPage = id; }
|
|
|
|
private slots:
|
|
void refresh();
|
|
void onCategoryToggled(bool on);
|
|
void onRowClicked(int globalIndex);
|
|
|
|
private:
|
|
FaultTable* m_table = nullptr;
|
|
QLabel* m_title = nullptr;
|
|
QVector<QPushButton*> m_categoryButtons;
|
|
QVector<QString> m_categories;
|
|
QString m_filter; // 空 = 全部
|
|
PageId m_returnPage = PageJob;
|
|
};
|
|
|
|
#endif // FAULTQUERYPAGE_H
|