-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskListBox.h
119 lines (96 loc) · 2.89 KB
/
TaskListBox.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#ifndef TASKLISTBOX_H
#define TASKLISTBOX_H
#include <ZListBox.h>
#include <RES_ICON_Reader.h>
#include <AM_AppLnk.h>
#include <AM_LauncherClient.h>
#include <qvaluelist.h>
#include "ZTaskItem.h"
#include "myDef.h"
#include "TaskThread.h"
#ifdef NEW_JAVA_LIST
typedef QValueList<AM_LauncherClient::AM_ApplicationState> AM_AppLaunchedList;
#endif
class TaskListBox : public ZListBox
{
Q_OBJECT
public :
TaskListBox(const QString& type = QString::null, QWidget* parent = 0, WFlags f = 0);
~TaskListBox();
void buildTaskList(bool isShowAll = false);
void RefreshTaskList(bool isShowAll = false);
void showNativeIcon();
void kvmToInfo(); //if has kvm in process list >> replace kvm to java name and java icon
#ifdef NEW_JAVA_LIST
void buildJavaListNew(); // if define new java list
#endif
void updateTaskList();
void updateNativeIcon();
void updateKvmToInfo();
#ifdef NEW_JAVA_LIST
void updateJavaListNew(); // if define new java list
// buggy , need to debug
#endif
//int getListPids();
#ifdef RAISE_PHONE
int getPidPhone();
#else
bool getKvmStats();
#endif
int getPidProc(); //RokrToolsPro pid
QString getHlOriName(); //Highlighted item info
QString getHlUid();
ITEMTYPE getHlType();
uint getHlPid();
QString getSelOriName(); //Selected item info
QString getSelUid();
ITEMTYPE getSelType();
uint getSelPid();
private:
QString getCmd(int pid);
bool procFilter(QString &filterStr);
//int getListCount();
void addPid2cmd(int pid);
void addAllPid2cmd(int pid);
void updatePid2cmd(int pid);
//void nativeIconUpdate(int itemIndex, ITEMTYPE t);
void addNativeIcon(int itemIndex, ITEMTYPE t, QString cmdName);//, int width, int height, QObject *parent = 0);
void addKvm2Info(int itemIndex, QString cmdName);
int gItemNum;
public slots:
signals:
void taskHighlighted(int index);
void taskSelected(int index);
void taskSelected();
private slots:
void itemHighlighted(int index);
void itemSelected(int index);
void slotAddPid2cmd(int pid, QString pCmd, QString pName);
void slotAddAllPid2cmd(int pid, QString pCmd, QString pName);
void slotUpdatePid2cmd(int pid, QString pCmd, QString pName);
void slotAddNativeIcon(int itemIndex, QImage iconImg);
void slotAddKvm2Info(int itemIndex, QString jname, QImage iconImg);
private:
//bool codeCmp();
//bool boolCodeCmp;
//void preChk();
QString hOriName;
QString hUid;
ITEMTYPE hType;
uint hPid;
QString sOriName;
QString sUid;
ITEMTYPE sType;
uint sPid;
QString mCmdStrList; // global list for each process cmd when refresh the list box
#ifdef RAISE_PHONE
int pidPhone;
#else
bool kvmStats;
#endif
int pidProc;
RES_ICON_Reader iconReader;
//QList<struct procObj> refreshTmpList;
QStringList refreshTmpList;
};
#endif // TASKLISTBOX_H