Diffstat (limited to 'core/applets/irdaapplet/irda.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/irdaapplet/irda.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index afc0592..dde8050 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp | |||
@@ -51,25 +51,25 @@ IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) | |||
51 | m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); | 51 | m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); |
52 | 52 | ||
53 | m_irda_active = false; | 53 | m_irda_active = false; |
54 | m_irda_discovery_active = false; | 54 | m_irda_discovery_active = false; |
55 | m_receive_active = false; | 55 | m_receive_active = false; |
56 | m_receive_state_changed = false; | 56 | m_receive_state_changed = false; |
57 | m_popup = 0; | 57 | m_popup = 0; |
58 | m_wasOn = false; | 58 | m_wasOn = false; |
59 | m_wasDiscover = false; | 59 | m_wasDiscover = false; |
60 | 60 | ||
61 | QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); | 61 | QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); |
62 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), | 62 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), |
63 | this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) ); | 63 | this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); |
64 | } | 64 | } |
65 | 65 | ||
66 | int IrdaApplet::position() | 66 | int IrdaApplet::position() |
67 | { | 67 | { |
68 | return 6; | 68 | return 6; |
69 | } | 69 | } |
70 | 70 | ||
71 | void IrdaApplet::show() | 71 | void IrdaApplet::show() |
72 | { | 72 | { |
73 | QWidget::show ( ); | 73 | QWidget::show ( ); |
74 | startTimer ( 2000 ); | 74 | startTimer ( 2000 ); |
75 | } | 75 | } |
@@ -88,25 +88,25 @@ void IrdaApplet::popup ( QString message, QString icon ) | |||
88 | m_popup-> clear ( ); | 88 | m_popup-> clear ( ); |
89 | 89 | ||
90 | if ( icon. isEmpty ( )) | 90 | if ( icon. isEmpty ( )) |
91 | m_popup-> insertItem ( message, 0 ); | 91 | m_popup-> insertItem ( message, 0 ); |
92 | else | 92 | else |
93 | m_popup-> insertItem ( QIconSet ( Resource::loadPixmap ( icon )), message, 0 ); | 93 | m_popup-> insertItem ( QIconSet ( Resource::loadPixmap ( icon )), message, 0 ); |
94 | 94 | ||
95 | QPoint p = mapToGlobal ( QPoint ( 0, 0 )); | 95 | QPoint p = mapToGlobal ( QPoint ( 0, 0 )); |
96 | QSize s = m_popup-> sizeHint ( ); | 96 | QSize s = m_popup-> sizeHint ( ); |
97 | m_popup-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), | 97 | m_popup-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), |
98 | p. y ( ) - s. height ( ))); | 98 | p. y ( ) - s. height ( ))); |
99 | 99 | ||
100 | QTimer::singleShot ( 2000, this, SLOT( popupTimeout ( ))); | 100 | QTimer::singleShot ( 2000, this, SLOT( popupTimeout())); |
101 | } | 101 | } |
102 | 102 | ||
103 | void IrdaApplet::popupTimeout ( ) | 103 | void IrdaApplet::popupTimeout ( ) |
104 | { | 104 | { |
105 | m_popup-> hide ( ); | 105 | m_popup-> hide ( ); |
106 | } | 106 | } |
107 | 107 | ||
108 | bool IrdaApplet::checkIrdaStatus ( ) | 108 | bool IrdaApplet::checkIrdaStatus ( ) |
109 | { | 109 | { |
110 | struct ifreq ifr; | 110 | struct ifreq ifr; |
111 | strcpy ( ifr. ifr_name, "irda0" ); | 111 | strcpy ( ifr. ifr_name, "irda0" ); |
112 | 112 | ||