Diffstat (limited to 'core/applets/irdaapplet/irda.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index 267714e..6148308 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp | |||
@@ -9,56 +9,57 @@ | |||
9 | ** Foundation and appearing in the file LICENSE.GPL included in the | 9 | ** Foundation and appearing in the file LICENSE.GPL included in the |
10 | ** packaging of this file. | 10 | ** packaging of this file. |
11 | ** | 11 | ** |
12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 12 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 13 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
14 | ** | 14 | ** |
15 | **********************************************************************/ | 15 | **********************************************************************/ |
16 | 16 | ||
17 | #include "irda.h" | 17 | #include "irda.h" |
18 | 18 | ||
19 | /* OPIE */ | 19 | /* OPIE */ |
20 | #include <opie2/otaskbarapplet.h> | 20 | #include <opie2/otaskbarapplet.h> |
21 | #include <qpe/applnk.h> | ||
21 | #include <qpe/resource.h> | 22 | #include <qpe/resource.h> |
22 | #include <qpe/qcopenvelope_qws.h> | 23 | #include <qpe/qcopenvelope_qws.h> |
24 | using namespace Opie::Ui; | ||
23 | 25 | ||
24 | /* QT */ | 26 | /* QT */ |
25 | #include <qpainter.h> | 27 | #include <qpainter.h> |
26 | #include <qfile.h> | 28 | #include <qfile.h> |
27 | #include <qtimer.h> | 29 | #include <qtimer.h> |
28 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
29 | 31 | ||
30 | /* STD */ | 32 | /* STD */ |
31 | #include <unistd.h> | 33 | #include <unistd.h> |
32 | #include <net/if.h> | 34 | #include <net/if.h> |
33 | #include <netinet/in.h> | 35 | #include <netinet/in.h> |
34 | #include <sys/types.h> | 36 | #include <sys/types.h> |
35 | #include <sys/socket.h> | 37 | #include <sys/socket.h> |
36 | #include <sys/ioctl.h> | 38 | #include <sys/ioctl.h> |
37 | 39 | ||
38 | //=========================================================================== | 40 | //=========================================================================== |
39 | 41 | ||
40 | using namespace Opie::Ui; | ||
41 | IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) | 42 | IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) |
42 | : QWidget ( parent, name ) | 43 | : QWidget ( parent, name ) |
43 | { | 44 | { |
44 | setFixedHeight ( 18 ); | 45 | setFixedHeight( AppLnk::smallIconSize() ); |
45 | setFixedWidth ( 14 ); | 46 | setFixedWidth( AppLnk::smallIconSize() ); |
46 | 47 | ||
47 | m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); | 48 | m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); |
48 | 49 | ||
49 | m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); | 50 | m_irdaOnPixmap = Resource::loadImage( "irdaapplet/irdaon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); |
50 | m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); | 51 | m_irdaOffPixmap = Resource::loadImage( "irdaapplet/irdaoff" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); |
51 | m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); | 52 | m_irdaDiscoveryOnPixmap = Resource::loadImage( "irdaapplet/magglass" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); |
52 | m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); | 53 | m_receiveActivePixmap = Resource::loadImage( "irdaapplet/receive" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); |
53 | 54 | ||
54 | m_irda_active = false; | 55 | m_irda_active = false; |
55 | m_irda_discovery_active = false; | 56 | m_irda_discovery_active = false; |
56 | m_receive_active = false; | 57 | m_receive_active = false; |
57 | m_receive_state_changed = false; | 58 | m_receive_state_changed = false; |
58 | m_popup = 0; | 59 | m_popup = 0; |
59 | m_wasOn = false; | 60 | m_wasOn = false; |
60 | m_wasDiscover = false; | 61 | m_wasDiscover = false; |
61 | 62 | ||
62 | QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); | 63 | QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); |
63 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), | 64 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), |
64 | this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); | 65 | this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); |