2025-03-14 15:07:39 +08:00
|
|
|
|
#ifndef CADDSHIELDDIALOG_H
|
|
|
|
|
|
#define CADDSHIELDDIALOG_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
#include "CDevTreeModel.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
|
class CAddShieldDialog;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class QCheckBox;
|
|
|
|
|
|
class CAddShieldDialog : public QDialog
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit CAddShieldDialog(QWidget *parent = 0, bool add = true);
|
|
|
|
|
|
~CAddShieldDialog();
|
|
|
|
|
|
|
|
|
|
|
|
void setInfo(ST_Shield_Info &info, QList<ST_Shield_Obj> &objList);
|
|
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
void sigUpdateTagCheckState(const QString &tag, const bool &checked);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
void initialize();
|
|
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void slotObjTypeChanged(int index);
|
|
|
|
|
|
void slotShieldTypeChanged(int index);
|
|
|
|
|
|
void slotTimeTypeChanged(int index);
|
|
|
|
|
|
void slotCheck(bool checked);
|
|
|
|
|
|
void slotSaveShield();
|
|
|
|
|
|
void slotCancel();
|
|
|
|
|
|
void slotTreeCheck(const QString &objTag, const E_Tree_ItemType &type, const int &checkState);
|
|
|
|
|
|
void slotFilter(const QString &text);
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
void showMessage(const QString &text);
|
|
|
|
|
|
void setWeekOption(int option);
|
|
|
|
|
|
void setMonthOption(int option);
|
|
|
|
|
|
int getWeekOption();
|
|
|
|
|
|
int getMonthOption();
|
|
|
|
|
|
bool getCurUser(int &userId, int &usergId, QString &hostName, int &locationId);
|
|
|
|
|
|
bool permCheck();
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
Ui::CAddShieldDialog *ui;
|
|
|
|
|
|
QMap<int, QCheckBox*> m_shieldCheckBoxMap;
|
|
|
|
|
|
CDevTreeModel *m_pModel;
|
|
|
|
|
|
QMap<QString, int> m_editObjMap;
|
|
|
|
|
|
QMap<QString, int> m_shieldObjMap;
|
|
|
|
|
|
bool m_bAdd;
|
|
|
|
|
|
bool m_perm;
|
|
|
|
|
|
ST_Shield_Info m_objPreInfo;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CADDSHIELDDIALOG_H
|