summaryrefslogtreecommitdiff
path: root/core/launcher/appicons.cpp
Unidiff
Diffstat (limited to 'core/launcher/appicons.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/appicons.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/core/launcher/appicons.cpp b/core/launcher/appicons.cpp
index c51ee5a..4d48b24 100644
--- a/core/launcher/appicons.cpp
+++ b/core/launcher/appicons.cpp
@@ -1,10 +1,10 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
@@ -18,27 +18,29 @@
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21 21
22#include "appicons.h" 22#include "appicons.h"
23 23
24#include <qpe/qcopenvelope_qws.h> 24#ifdef QWS
25#include <qtopia/qcopenvelope_qws.h>
26#endif
25 27
26#include <qtooltip.h> 28#include <qtooltip.h>
27#include <qpixmap.h> 29#include <qpixmap.h>
28 30
29 31
30AppIcons::AppIcons( QWidget *parent ) : 32AppIcons::AppIcons( QWidget *parent ) :
31 QHBox(parent) 33 QHBox(parent)
32{ 34{
33 buttons.setAutoDelete(TRUE); 35 buttons.setAutoDelete(TRUE);
34 36
35#ifndef QT_NO_COP 37#ifndef QT_NO_COP
36 QCopChannel* channel = new QCopChannel("Qt/Tray", this); 38 QCopChannel* channel = new QCopChannel("Qt/Tray", this);
37 connect(channel, SIGNAL(received(const QCString&, const QByteArray&)), 39 connect(channel, SIGNAL(received(const QCString&,const QByteArray&)),
38 this, SLOT(receive(const QCString&, const QByteArray&))); 40 this, SLOT(receive(const QCString&,const QByteArray&)));
39#endif 41#endif
40} 42}
41 43
42void AppIcons::setIcon(int id, const QPixmap& pm) 44void AppIcons::setIcon(int id, const QPixmap& pm)
43{ 45{
44 button(id)->setPixmap(pm); 46 button(id)->setPixmap(pm);
@@ -65,13 +67,13 @@ signals:
65 67
66QLabel* AppIcons::button(int id) 68QLabel* AppIcons::button(int id)
67{ 69{
68 QLabel* f = buttons.find(id); 70 QLabel* f = buttons.find(id);
69 if ( !f ) { 71 if ( !f ) {
70 buttons.insert(id,f=new FlatButton(this)); 72 buttons.insert(id,f=new FlatButton(this));
71 connect(f,SIGNAL(clicked(const QPoint&, int, bool)),this,SLOT(clicked(const QPoint&, int, bool))); 73 connect(f,SIGNAL(clicked(const QPoint&,int,bool)),this,SLOT(clicked(const QPoint&,int,bool)));
72 f->show(); 74 f->show();
73 } 75 }
74 return f; 76 return f;
75} 77}
76 78
77int AppIcons::findId(QLabel* b) 79int AppIcons::findId(QLabel* b)