author | sandman <sandman> | 2002-12-16 23:43:25 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-16 23:43:25 (UTC) |
commit | 79b94019014efe998b126219827f3050395beea7 (patch) (unidiff) | |
tree | 916c16dd21cc64fa98c0eed7042223d69efc27c4 /core/launcher/runningappbar.h | |
parent | 3f28b7e0edb6115699b19f9db37b55f775b91dc7 (diff) | |
download | opie-79b94019014efe998b126219827f3050395beea7.zip opie-79b94019014efe998b126219827f3050395beea7.tar.gz opie-79b94019014efe998b126219827f3050395beea7.tar.bz2 |
Finally the app-killer in the launcher works. TT solution was calling
ps with some special options, that busybox ps didn't provide. I'm now
scanning /proc/<pid>/stat for the right process.
Diffstat (limited to 'core/launcher/runningappbar.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/runningappbar.h | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/core/launcher/runningappbar.h b/core/launcher/runningappbar.h index 880bb69..eb5880e 100644 --- a/core/launcher/runningappbar.h +++ b/core/launcher/runningappbar.h | |||
@@ -28,61 +28,61 @@ | |||
28 | class AppLnk; | 28 | class AppLnk; |
29 | class AppLnkSet; | 29 | class AppLnkSet; |
30 | class QCString; | 30 | class QCString; |
31 | class QProcess; | 31 | class QProcess; |
32 | class QMessageBox; | 32 | class QMessageBox; |
33 | 33 | ||
34 | class RunningAppBar : public QFrame { | 34 | class RunningAppBar : public QFrame |
35 | Q_OBJECT | 35 | { |
36 | Q_OBJECT | ||
36 | 37 | ||
37 | public: | 38 | public: |
38 | RunningAppBar(QWidget* parent); | 39 | RunningAppBar(QWidget* parent); |
39 | ~RunningAppBar(); | 40 | ~RunningAppBar(); |
40 | |||
41 | void addTask(const AppLnk& appLnk); | ||
42 | void removeTask(const AppLnk& appLnk); | ||
43 | void paintEvent(QPaintEvent* event); | ||
44 | void mousePressEvent(QMouseEvent*); | ||
45 | void mouseReleaseEvent(QMouseEvent*); | ||
46 | QSize sizeHint() const; | ||
47 | 41 | ||
48 | private slots: | 42 | void addTask(const AppLnk& appLnk); |
49 | void newQcopChannel(const QString& channel); | 43 | void removeTask(const AppLnk& appLnk); |
50 | void removedQcopChannel(const QString& channel); | 44 | void paintEvent(QPaintEvent* event); |
51 | void received(const QCString& msg, const QByteArray& data); | 45 | void mousePressEvent(QMouseEvent*); |
46 | void mouseReleaseEvent(QMouseEvent*); | ||
47 | QSize sizeHint() const; | ||
52 | 48 | ||
53 | private: | 49 | private slots: |
54 | AppLnkSet* m_AppLnkSet; | 50 | void newQcopChannel(const QString& channel); |
55 | QList<AppLnk> m_AppList; | 51 | void removedQcopChannel(const QString& channel); |
56 | int m_SelectedAppIndex; | 52 | void received(const QCString& msg, const QByteArray& data); |
57 | int spacing; | 53 | |
54 | private: | ||
55 | AppLnkSet* m_AppLnkSet; | ||
56 | QList<AppLnk> m_AppList; | ||
57 | int m_SelectedAppIndex; | ||
58 | int spacing; | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | /** | 61 | /** |
61 | * Internal class that checks back in on the process when timerExpired is called | 62 | * Internal class that checks back in on the process when timerExpired is called |
62 | * to make sure the process is on top. If it's not it displays a dialog | 63 | * to make sure the process is on top. If it's not it displays a dialog |
63 | * box asking permission to kill it. | 64 | * box asking permission to kill it. |
64 | */ | 65 | */ |
65 | class AppMonitor : public QObject { | 66 | class AppMonitor : public QObject |
66 | Q_OBJECT | 67 | { |
67 | 68 | Q_OBJECT | |
68 | public: | 69 | |
69 | static const int RAISE_TIMEOUT_MS; | 70 | public: |
71 | static const int RAISE_TIMEOUT_MS; | ||
72 | |||
73 | AppMonitor(const AppLnk& app, RunningAppBar& owner); | ||
74 | ~AppMonitor(); | ||
70 | 75 | ||
71 | AppMonitor(const AppLnk& app, RunningAppBar& owner); | 76 | private slots: |
72 | ~AppMonitor(); | 77 | void timerExpired(); |
73 | 78 | void received(const QCString& msg, const QByteArray& data); | |
74 | private slots: | ||
75 | void timerExpired(); | ||
76 | void received(const QCString& msg, const QByteArray& data); | ||
77 | void psProcFinished(); | ||
78 | 79 | ||
79 | private: | 80 | private: |
80 | RunningAppBar& m_Owner; | 81 | RunningAppBar& m_Owner; |
81 | const AppLnk& m_App; | 82 | const AppLnk& m_App; |
82 | QTimer m_Timer; | 83 | QTimer m_Timer; |
83 | QProcess* m_PsProc; | 84 | QMessageBox* m_AppKillerBox; |
84 | QMessageBox* m_AppKillerBox; | ||
85 | }; | 85 | }; |
86 | 86 | ||
87 | #endif | 87 | #endif |
88 | 88 | ||