51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
|
|
#ifndef MONITORDISPLAYSETTINGDLG_H
|
||
|
|
#define MONITORDISPLAYSETTINGDLG_H
|
||
|
|
|
||
|
|
/*******************监控图元设置界面**********************/
|
||
|
|
#include <QDialog>
|
||
|
|
#include "global.h"
|
||
|
|
|
||
|
|
QT_BEGIN_NAMESPACE
|
||
|
|
namespace Ui { class monitorDisplaySettingDlg; }
|
||
|
|
QT_END_NAMESPACE
|
||
|
|
|
||
|
|
class MonitorPanel;
|
||
|
|
|
||
|
|
class MonitorDisplaySettingDlg : public QDialog
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
MonitorDisplaySettingDlg(QWidget *parent = nullptr);
|
||
|
|
~MonitorDisplaySettingDlg();
|
||
|
|
|
||
|
|
void initial();
|
||
|
|
void showDlg();
|
||
|
|
public slots:
|
||
|
|
void onSaveClicked();
|
||
|
|
void onCancelClicked();
|
||
|
|
void onIconSelectClicked();
|
||
|
|
|
||
|
|
void onCheckboxToggled(bool);
|
||
|
|
void onTypeChanged(const QString&);
|
||
|
|
void onStateChanged(const QString&);
|
||
|
|
|
||
|
|
private:
|
||
|
|
void loadSetting(monitorItemTypeStruct type,monitorItemStateStruct state); //载入设定到界面
|
||
|
|
void saveSetting(monitorItemTypeStruct type,monitorItemStateStruct state);
|
||
|
|
|
||
|
|
void updatePreview(); //预览更新
|
||
|
|
void clearStateDisplay();
|
||
|
|
private:
|
||
|
|
Ui::monitorDisplaySettingDlg *ui;
|
||
|
|
MonitorPanel* _parent;
|
||
|
|
monitorItemTypeStruct _curType; //当前类型
|
||
|
|
monitorItemStateStruct _curState; //当前状态
|
||
|
|
QColor _curColor;
|
||
|
|
QString _curMeta;
|
||
|
|
QString _curModel;
|
||
|
|
QMap<monitorItemTypeStruct,QMap<monitorItemStateStruct,monitorItemDisplayInfo>> _tempSetting;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|