summaryrefslogtreecommitdiff
path: root/core/launcher/runningappbar.cpp
authormickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
committer mickeyl <mickeyl>2004-04-07 13:36:16 (UTC)
commit4f1d28a25ce6180850c3d26bac9b638f0f25532b (patch) (unidiff)
tree59b4879b1065086c9a2e28f16f7d48540c8a9456 /core/launcher/runningappbar.cpp
parent8af35b63a277ec14dcc4a0a6ca5bbe228e276b98 (diff)
downloadopie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.zip
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.gz
opie-4f1d28a25ce6180850c3d26bac9b638f0f25532b.tar.bz2
use Opie debugging framework
Diffstat (limited to 'core/launcher/runningappbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/runningappbar.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/core/launcher/runningappbar.cpp b/core/launcher/runningappbar.cpp
index 2e9d2a9..a25963f 100644
--- a/core/launcher/runningappbar.cpp
+++ b/core/launcher/runningappbar.cpp
@@ -20,15 +20,19 @@
20 20
21#define QTOPIA_INTERNAL_PRELOADACCESS 21#define QTOPIA_INTERNAL_PRELOADACCESS
22 22
23#include "runningappbar.h"
24#include "serverinterface.h"
23 25
24#include <stdlib.h> 26/* OPIE */
27#include <opie2/odebug.h>
28#include <qtopia/qcopenvelope_qws.h>
29using namespace Opie::Core;
25 30
31/* QT */
26#include <qpainter.h> 32#include <qpainter.h>
27 33
28#include <qtopia/qcopenvelope_qws.h> 34/* STD */
29 35#include <stdlib.h>
30#include "runningappbar.h"
31#include "serverinterface.h"
32 36
33RunningAppBar::RunningAppBar(QWidget* parent) 37RunningAppBar::RunningAppBar(QWidget* parent)
34 : QFrame(parent), selectedAppIndex(-1) 38 : QFrame(parent), selectedAppIndex(-1)
@@ -51,7 +55,7 @@ void RunningAppBar::received(const QCString& msg, const QByteArray& data) {
51 if ( msg == "fastAppShowing(QString)") { 55 if ( msg == "fastAppShowing(QString)") {
52 QString appName; 56 QString appName;
53 stream >> appName; 57 stream >> appName;
54 // qDebug("fastAppShowing %s", appName.data() ); 58 // odebug << "fastAppShowing " << appName.data() << "" << oendl;
55 const AppLnk* f = ServerInterface::appLnks().findExec(appName); 59 const AppLnk* f = ServerInterface::appLnks().findExec(appName);
56 if ( f ) addTask(*f); 60 if ( f ) addTask(*f);
57 } else if ( msg == "fastAppHiding(QString)") { 61 } else if ( msg == "fastAppHiding(QString)") {
@@ -63,7 +67,7 @@ void RunningAppBar::received(const QCString& msg, const QByteArray& data) {
63} 67}
64 68
65void RunningAppBar::addTask(const AppLnk& appLnk) { 69void RunningAppBar::addTask(const AppLnk& appLnk) {
66 qDebug("Added %s to app list.", appLnk.name().latin1()); 70 odebug << "Added " << appLnk.name() << " to app list." << oendl;
67 AppLnk* newApp = new AppLnk(appLnk); 71 AppLnk* newApp = new AppLnk(appLnk);
68 newApp->setExec(appLnk.exec()); 72 newApp->setExec(appLnk.exec());
69 appList.prepend(newApp); 73 appList.prepend(newApp);
@@ -75,7 +79,7 @@ void RunningAppBar::removeTask(const AppLnk& appLnk) {
75 for (; i < appList.count() ; i++) { 79 for (; i < appList.count() ; i++) {
76 AppLnk* target = appList.at(i); 80 AppLnk* target = appList.at(i);
77 if (target->exec() == appLnk.exec()) { 81 if (target->exec() == appLnk.exec()) {
78 qDebug("Removing %s from app list.", appLnk.name().latin1()); 82 odebug << "Removing " << appLnk.name() << " from app list." << oendl;
79 appList.remove(); 83 appList.remove();
80 delete target; 84 delete target;
81 } 85 }
@@ -135,7 +139,7 @@ void RunningAppBar::paintEvent( QPaintEvent * )
135 for (; it.current(); i++, ++it ) { 139 for (; it.current(); i++, ++it ) {
136 if ( x + spacing <= width() ) { 140 if ( x + spacing <= width() ) {
137 curApp = it.current(); 141 curApp = it.current();
138 qWarning("Drawing %s", curApp->name().latin1() ); 142 owarn << "Drawing " << curApp->name() << "" << oendl;
139 if ( (int)i == selectedAppIndex ) 143 if ( (int)i == selectedAppIndex )
140 p.fillRect( x, y, spacing, curApp->pixmap().height()+1, colorGroup().highlight() ); 144 p.fillRect( x, y, spacing, curApp->pixmap().height()+1, colorGroup().highlight() );
141 else 145 else
@@ -153,7 +157,7 @@ QSize RunningAppBar::sizeHint() const
153 157
154void RunningAppBar::applicationLaunched(const QString &appName) 158void RunningAppBar::applicationLaunched(const QString &appName)
155{ 159{
156 qDebug("desktop:: app: %s launched with pid ", appName.data() ); 160 odebug << "desktop:: app: " << appName.data() << " launched with pid " << oendl;
157 const AppLnk* newGuy = ServerInterface::appLnks().findExec(appName); 161 const AppLnk* newGuy = ServerInterface::appLnks().findExec(appName);
158 if ( newGuy && !newGuy->isPreloaded() ) { 162 if ( newGuy && !newGuy->isPreloaded() ) {
159 addTask( *newGuy ); 163 addTask( *newGuy );