16 */ |
16 */ |
17 |
17 |
18 #ifndef MEMSPYTHREADVIEW_H_ |
18 #ifndef MEMSPYTHREADVIEW_H_ |
19 #define MEMSPYTHREADVIEW_H_ |
19 #define MEMSPYTHREADVIEW_H_ |
20 |
20 |
21 #include "memspyview.h" |
21 #include "memspylistview.h" |
22 #include "enginewrapper.h" |
22 #include "enginewrapper.h" |
23 |
23 |
24 class MemSpyThreadModel : public QAbstractListModel |
24 class MemSpyThreadModel : public QAbstractListModel |
25 { |
25 { |
26 public: |
26 public: |
30 |
30 |
31 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
31 int rowCount(const QModelIndex &parent = QModelIndex()) const; |
32 |
32 |
33 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; |
33 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; |
34 |
34 |
|
35 void refresh(); |
|
36 |
35 private: |
37 private: |
|
38 ProcessId mProcessId; |
|
39 |
|
40 EngineWrapper& mEngine; |
|
41 |
36 QList<MemSpyThread*> mThreads; |
42 QList<MemSpyThread*> mThreads; |
37 |
43 |
38 QMap<int, QString> mPriorityMap; |
44 QMap<int, QString> mPriorityMap; |
39 }; |
45 }; |
40 |
46 |
41 |
47 |
42 class MemSpyThreadView : public MemSpyView |
48 class MemSpyThreadView : public MemSpyListView |
43 { |
49 { |
44 Q_OBJECT |
50 Q_OBJECT |
45 |
51 |
46 public: |
52 public: |
47 MemSpyThreadView(EngineWrapper &engine, ViewManager &viewManager); |
53 MemSpyThreadView(EngineWrapper &engine, ViewManager &viewManager); |
48 ~MemSpyThreadView(); |
54 ~MemSpyThreadView(); |
|
55 |
|
56 public slots: |
|
57 virtual void refresh(); |
49 |
58 |
50 protected: |
59 protected: |
51 void initialize(const QVariantMap& params); |
60 void initialize(const QVariantMap& params); |
52 |
61 |
53 protected: |
62 protected: |
54 virtual bool isRefreshable() const { return true; } |
63 virtual bool isRefreshable() const { return true; } |
|
64 |
|
65 virtual bool isBreadCrumbVisible() const; |
|
66 |
|
67 QString getBreadCrumbText() const; |
55 |
68 |
56 private slots: |
69 private slots: |
57 void itemClicked(const QModelIndex& index); |
70 void itemClicked(const QModelIndex& index); |
58 void catchLongPress(HbAbstractViewItem *item, const QPointF &coords); |
71 void catchLongPress(HbAbstractViewItem *item, const QPointF &coords); |
59 void changePriority(); |
72 void changePriority(); |
60 |
73 |
61 private: |
74 private: |
62 HbMenu* mContextMenu; |
75 HbMenu* mContextMenu; |
63 HbMenu* mPriorityMenu; |
76 HbMenu* mPriorityMenu; |
64 ThreadId mThreadId; |
77 ThreadId mThreadId; |
|
78 QString mProcessName; |
|
79 |
|
80 MemSpyThreadModel* mModel; |
65 }; |
81 }; |
66 |
82 |
67 #endif /* MEMSPYTHREADVIEW_H_ */ |
83 #endif /* MEMSPYTHREADVIEW_H_ */ |