79 lines
1.6 KiB
C++
79 lines
1.6 KiB
C++
#ifndef PROCMNGFORM_H
|
|
#define PROCMNGFORM_H
|
|
|
|
#include <QWidget>
|
|
#include <QTreeWidgetItem>
|
|
#include <QButtonGroup>
|
|
#include <QList>
|
|
#include <QCheckBox>
|
|
|
|
#include "MonitorCommon.h"
|
|
|
|
using namespace workBench;
|
|
|
|
namespace Ui {
|
|
class ProcMngForm;
|
|
}
|
|
|
|
class ProcMngForm : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ProcMngForm(QWidget *parent = 0);
|
|
~ProcMngForm();
|
|
|
|
signals:
|
|
void sigReloadAppAndProc();
|
|
|
|
void sigStartProc(int appId,const QString procName);
|
|
|
|
void sigStopProc(int appId,const QString procName);
|
|
|
|
void sigRestartProc(int appId,const QString procName);
|
|
|
|
void sigForceStopProc(int appId,const QString procName);
|
|
|
|
public slots:
|
|
void updateProcTree();
|
|
|
|
void customContext(const QPoint &pos);
|
|
|
|
void procItemClicked(QTreeWidgetItem *item, int column);
|
|
|
|
void checkBoxStateChange(int state);
|
|
|
|
void allCheckBoxStateChange(int state);
|
|
|
|
|
|
public:
|
|
void initProcTree();
|
|
|
|
void updateItem(const SProcess &proc,QTreeWidgetItem *item , const QSet<QString> &appDescList );
|
|
|
|
void blockAppSignals(bool b);
|
|
|
|
private:
|
|
int getCurAppRdbStatus(int appId);
|
|
|
|
void outLog(const std::vector<workBench::SProcess> &procInfo);
|
|
|
|
void upDataProcTreeByDesc(const QSet<QString> &appDescList = {}); //过滤树节点
|
|
|
|
QSet<QString> retAllCheckBoxName(); //获取所有勾选的复选框的名称
|
|
|
|
void createOrUpdataCheckBox(const QSet<QString> &appDescSet ); //创建与更新复选框控件
|
|
private:
|
|
Ui::ProcMngForm *ui;
|
|
|
|
uint64 m_ntime;
|
|
|
|
bool m_isZh;
|
|
|
|
QButtonGroup *m_btnGroup;
|
|
|
|
QCheckBox *m_allCheckBox; //全选复选框
|
|
};
|
|
|
|
#endif // PROCMNGFORM_H
|