summaryrefslogtreecommitdiff
path: root/core/applets
authoralwin <alwin>2004-03-02 12:14:15 (UTC)
committer alwin <alwin>2004-03-02 12:14:15 (UTC)
commit0d59c780513da78033f4d9040475dee9db0256d4 (patch) (unidiff)
tree503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /core/applets
parenta0981652d61776d70f25980f035748b21339e946 (diff)
downloadopie-0d59c780513da78033f4d9040475dee9db0256d4.zip
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you can check the diff (but it had compiled and run here)
Diffstat (limited to 'core/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/cardmon/cardmon.cpp8
-rw-r--r--core/applets/clipboardapplet/clipboard.cpp8
-rw-r--r--core/applets/clockapplet/clock.cpp6
-rw-r--r--core/applets/irdaapplet/irda.cpp4
-rw-r--r--core/applets/multikeyapplet/multikey.cpp4
-rw-r--r--core/applets/rotateapplet/rotate.cpp4
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp6
-rw-r--r--core/applets/vmemo/vmemo.cpp4
-rw-r--r--core/applets/volumeapplet/volume.cpp36
9 files changed, 40 insertions, 40 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp
index 7625545..e8072c6 100644
--- a/core/applets/cardmon/cardmon.cpp
+++ b/core/applets/cardmon/cardmon.cpp
@@ -31,55 +31,55 @@
31#include <qtextstream.h> 31#include <qtextstream.h>
32#include <qsound.h> 32#include <qsound.h>
33#include <qtimer.h> 33#include <qtimer.h>
34 34
35/* STD */ 35/* STD */
36#include <stdio.h> 36#include <stdio.h>
37#include <unistd.h> 37#include <unistd.h>
38#include <stdlib.h> 38#include <stdlib.h>
39#include <string.h> 39#include <string.h>
40#include <fcntl.h> 40#include <fcntl.h>
41 41
42#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 42#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
43#include <sys/vfs.h> 43#include <sys/vfs.h>
44#include <mntent.h> 44#include <mntent.h>
45#endif 45#endif
46 46
47using namespace Opie; 47using namespace Opie;
48 48
49CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), 49CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ),
50 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) 50 pm( Resource::loadPixmap( "cardmon/pcmcia" ) )
51{ 51{
52 52
53 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); 53 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this );
54 connect( pcmciaChannel, 54 connect( pcmciaChannel,
55 SIGNAL( received( const QCString &, const QByteArray & ) ), this, 55 SIGNAL( received(const QCString&,const QByteArray&) ), this,
56 SLOT( cardMessage( const QCString &, const QByteArray & ) ) ); 56 SLOT( cardMessage(const QCString&,const QByteArray&) ) );
57 57
58 QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this ); 58 QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this );
59 connect( sdChannel, 59 connect( sdChannel,
60 SIGNAL( received( const QCString &, const QByteArray & ) ), this, 60 SIGNAL( received(const QCString&,const QByteArray&) ), this,
61 SLOT( cardMessage( const QCString &, const QByteArray & ) ) ); 61 SLOT( cardMessage(const QCString&,const QByteArray&) ) );
62 62
63 cardInPcmcia0 = FALSE; 63 cardInPcmcia0 = FALSE;
64 cardInPcmcia1 = FALSE; 64 cardInPcmcia1 = FALSE;
65 cardInSd = FALSE; 65 cardInSd = FALSE;
66 66
67 setFocusPolicy( NoFocus ); 67 setFocusPolicy( NoFocus );
68 68
69 setFixedWidth ( AppLnk::smallIconSize() ); 69 setFixedWidth ( AppLnk::smallIconSize() );
70 setFixedHeight ( AppLnk::smallIconSize() ); 70 setFixedHeight ( AppLnk::smallIconSize() );
71 71
72 getStatusPcmcia( TRUE ); 72 getStatusPcmcia( TRUE );
73 getStatusSd( TRUE ); 73 getStatusSd( TRUE );
74 repaint( FALSE ); 74 repaint( FALSE );
75 popupMenu = 0; 75 popupMenu = 0;
76} 76}
77 77
78CardMonitor::~CardMonitor() 78CardMonitor::~CardMonitor()
79{ 79{
80 if ( popupMenu ) 80 if ( popupMenu )
81 { 81 {
82 delete popupMenu; 82 delete popupMenu;
83 } 83 }
84} 84}
85 85
diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp
index 34d151e..4fc8076 100644
--- a/core/applets/clipboardapplet/clipboard.cpp
+++ b/core/applets/clipboardapplet/clipboard.cpp
@@ -25,51 +25,51 @@
25#include <qpe/applnk.h> 25#include <qpe/applnk.h>
26 26
27#include <qpainter.h> 27#include <qpainter.h>
28#include <qpopupmenu.h> 28#include <qpopupmenu.h>
29#include <qwindowsystem_qws.h> 29#include <qwindowsystem_qws.h>
30#include <qapplication.h> 30#include <qapplication.h>
31#include <qclipboard.h> 31#include <qclipboard.h>
32#include <qtimer.h> 32#include <qtimer.h>
33 33
34//=========================================================================== 34//===========================================================================
35 35
36 36
37ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) 37ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( parent, name )
38{ 38{
39 setFixedWidth ( AppLnk::smallIconSize() ); 39 setFixedWidth ( AppLnk::smallIconSize() );
40 setFixedHeight ( AppLnk::smallIconSize() ); 40 setFixedHeight ( AppLnk::smallIconSize() );
41 41
42 QImage img = Resource::loadImage( "paste"); 42 QImage img = Resource::loadImage( "paste");
43 img = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); 43 img = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
44 44
45 m_clipboardPixmap.convertFromImage( img ); 45 m_clipboardPixmap.convertFromImage( img );
46 46
47 m_timer = new QTimer ( this ); 47 m_timer = new QTimer ( this );
48 48
49 connect ( QApplication::clipboard ( ), SIGNAL( dataChanged ( )), this, SLOT( newData ( ))); 49 connect ( QApplication::clipboard ( ), SIGNAL( dataChanged()), this, SLOT( newData()));
50 connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( newData ( ))); 50 connect ( m_timer, SIGNAL( timeout()), this, SLOT( newData()));
51 connect ( qApp, SIGNAL( aboutToQuit ( )), this, SLOT( shutdown ( ))); 51 connect ( qApp, SIGNAL( aboutToQuit()), this, SLOT( shutdown()));
52 52
53 m_menu = 0; 53 m_menu = 0;
54 m_dirty = true; 54 m_dirty = true;
55 m_lasttext = QString::null; 55 m_lasttext = QString::null;
56 56
57 m_timer-> start ( 0, true ); 57 m_timer-> start ( 0, true );
58} 58}
59 59
60ClipboardApplet::~ClipboardApplet ( ) 60ClipboardApplet::~ClipboardApplet ( )
61{ 61{
62} 62}
63 63
64int ClipboardApplet::position() 64int ClipboardApplet::position()
65{ 65{
66 return 6; 66 return 6;
67} 67}
68 68
69void ClipboardApplet::shutdown ( ) 69void ClipboardApplet::shutdown ( )
70{ 70{
71 // the timer has to be stopped, or Qt/E will hang on quit() 71 // the timer has to be stopped, or Qt/E will hang on quit()
72 // see launcher/desktop.cpp 72 // see launcher/desktop.cpp
73 73
74 m_timer-> stop ( ); 74 m_timer-> stop ( );
75} 75}
@@ -78,49 +78,49 @@ void ClipboardApplet::mousePressEvent ( QMouseEvent *)
78{ 78{
79 if ( m_dirty ) { 79 if ( m_dirty ) {
80 delete m_menu; 80 delete m_menu;
81 81
82 m_menu = new QPopupMenu ( this ); 82 m_menu = new QPopupMenu ( this );
83 m_menu-> setCheckable ( true ); 83 m_menu-> setCheckable ( true );
84 84
85 if ( m_history. count ( )) { 85 if ( m_history. count ( )) {
86 for ( unsigned int i = 0; i < m_history. count ( ); i++ ) { 86 for ( unsigned int i = 0; i < m_history. count ( ); i++ ) {
87 QString str = m_history [i]; 87 QString str = m_history [i];
88 88
89 if ( str. length ( ) > 20 ) 89 if ( str. length ( ) > 20 )
90 str = str. left ( 20 ) + "..."; 90 str = str. left ( 20 ) + "...";
91 91
92 m_menu-> insertItem ( QString ( "%1: %2" ). arg ( i + 1 ). arg ( str ), i ); 92 m_menu-> insertItem ( QString ( "%1: %2" ). arg ( i + 1 ). arg ( str ), i );
93 m_menu-> setItemChecked ( i, false ); 93 m_menu-> setItemChecked ( i, false );
94 } 94 }
95 m_menu-> setItemChecked ( m_history. count ( ) - 1, true ); 95 m_menu-> setItemChecked ( m_history. count ( ) - 1, true );
96 m_menu-> insertSeparator ( ); 96 m_menu-> insertSeparator ( );
97 } 97 }
98 m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "cut" )), tr( "Cut" ), 100 ); 98 m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "cut" )), tr( "Cut" ), 100 );
99 m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "copy" )), tr( "Copy" ), 101 ); 99 m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "copy" )), tr( "Copy" ), 101 );
100 m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "paste" )), tr( "Paste" ), 102 ); 100 m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "paste" )), tr( "Paste" ), 102 );
101 101
102 connect ( m_menu, SIGNAL( activated ( int )), this, SLOT( action ( int ))); 102 connect ( m_menu, SIGNAL( activated(int)), this, SLOT( action(int)));
103 103
104 m_dirty = false; 104 m_dirty = false;
105 } 105 }
106 QPoint p = mapToGlobal ( QPoint ( 0, 0 )); 106 QPoint p = mapToGlobal ( QPoint ( 0, 0 ));
107 QSize s = m_menu-> sizeHint ( ); 107 QSize s = m_menu-> sizeHint ( );
108 108
109 m_menu-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), p. y ( ) - s. height ( ))); 109 m_menu-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), p. y ( ) - s. height ( )));
110} 110}
111 111
112void ClipboardApplet::action(int id) 112void ClipboardApplet::action(int id)
113{ 113{
114 ushort unicode = 0; 114 ushort unicode = 0;
115 int scan = 0; 115 int scan = 0;
116 116
117 switch ( id ) { 117 switch ( id ) {
118 case 100: 118 case 100:
119 unicode = 'X' - '@'; 119 unicode = 'X' - '@';
120 scan = Key_X; // Cut 120 scan = Key_X; // Cut
121 break; 121 break;
122 case 101: 122 case 101:
123 unicode = 'C' - '@'; 123 unicode = 'C' - '@';
124 scan = Key_C; // Copy 124 scan = Key_C; // Copy
125 break; 125 break;
126 case 102: 126 case 102:
diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp
index 9fead03..120a019 100644
--- a/core/applets/clockapplet/clock.cpp
+++ b/core/applets/clockapplet/clock.cpp
@@ -9,51 +9,51 @@
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "clock.h" 21#include "clock.h"
22 22
23#include <opie2/otaskbarapplet.h> 23#include <opie2/otaskbarapplet.h>
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25#include <qpe/qcopenvelope_qws.h> 25#include <qpe/qcopenvelope_qws.h>
26#include <qpe/config.h> 26#include <qpe/config.h>
27 27
28LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) 28LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent )
29{ 29{
30 // If you want a sunken border around the clock do this: 30 // If you want a sunken border around the clock do this:
31 // setFrameStyle( QFrame::Panel | QFrame::Sunken ); 31 // setFrameStyle( QFrame::Panel | QFrame::Sunken );
32 //setFont( QFont( "Helvetica", , QFont::Normal ) ); 32 //setFont( QFont( "Helvetica", , QFont::Normal ) );
33 connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime( ) ) ); 33 connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime() ) );
34 connect( qApp, SIGNAL( clockChanged( bool ) ), 34 connect( qApp, SIGNAL( clockChanged(bool) ),
35 this, SLOT( slotClockChanged( bool ) ) ); 35 this, SLOT( slotClockChanged(bool) ) );
36 readConfig(); 36 readConfig();
37 timerId = 0; 37 timerId = 0;
38 timerEvent( 0 ); 38 timerEvent( 0 );
39 show(); 39 show();
40} 40}
41 41
42int LauncherClock::position() 42int LauncherClock::position()
43{ 43{
44 return 10; 44 return 10;
45} 45}
46 46
47void LauncherClock::readConfig() { 47void LauncherClock::readConfig() {
48 Config config( "qpe" ); 48 Config config( "qpe" );
49 config.setGroup( "Time" ); 49 config.setGroup( "Time" );
50 ampmFormat = config.readBoolEntry( "AMPM", TRUE ); 50 ampmFormat = config.readBoolEntry( "AMPM", TRUE );
51 config.setGroup( "Date" ); 51 config.setGroup( "Date" );
52 format = config.readNumEntry("ClockApplet",0); 52 format = config.readNumEntry("ClockApplet",0);
53} 53}
54 54
55void LauncherClock::mouseReleaseEvent( QMouseEvent * ) 55void LauncherClock::mouseReleaseEvent( QMouseEvent * )
56{ 56{
57 QCString setTimeApp; 57 QCString setTimeApp;
58 setTimeApp="systemtime"; 58 setTimeApp="systemtime";
59 QCopEnvelope e("QPE/Application/"+setTimeApp, "raise()"); 59 QCopEnvelope e("QPE/Application/"+setTimeApp, "raise()");
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
@@ -39,86 +39,86 @@
39 39
40IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) 40IrdaApplet::IrdaApplet ( QWidget *parent, const char *name )
41 : QWidget ( parent, name ) 41 : QWidget ( parent, name )
42{ 42{
43 setFixedHeight ( 18 ); 43 setFixedHeight ( 18 );
44 setFixedWidth ( 14 ); 44 setFixedWidth ( 14 );
45 45
46 m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); 46 m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP );
47 47
48 m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); 48 m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" );
49 m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); 49 m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" );
50 m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); 50 m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" );
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
66int IrdaApplet::position() 66int IrdaApplet::position()
67{ 67{
68 return 6; 68 return 6;
69} 69}
70 70
71void IrdaApplet::show() 71void IrdaApplet::show()
72{ 72{
73 QWidget::show ( ); 73 QWidget::show ( );
74 startTimer ( 2000 ); 74 startTimer ( 2000 );
75} 75}
76 76
77IrdaApplet::~IrdaApplet() 77IrdaApplet::~IrdaApplet()
78{ 78{
79 if ( m_sockfd >= 0 ) 79 if ( m_sockfd >= 0 )
80 ::close ( m_sockfd ); 80 ::close ( m_sockfd );
81} 81}
82 82
83void IrdaApplet::popup ( QString message, QString icon ) 83void IrdaApplet::popup ( QString message, QString icon )
84{ 84{
85 if ( !m_popup ) 85 if ( !m_popup )
86 m_popup = new QPopupMenu ( this ); 86 m_popup = new QPopupMenu ( this );
87 87
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
103void IrdaApplet::popupTimeout ( ) 103void IrdaApplet::popupTimeout ( )
104{ 104{
105 m_popup-> hide ( ); 105 m_popup-> hide ( );
106} 106}
107 107
108bool IrdaApplet::checkIrdaStatus ( ) 108bool 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
113 if ( ::ioctl ( m_sockfd, SIOCGIFFLAGS, &ifr ) < 0 ) 113 if ( ::ioctl ( m_sockfd, SIOCGIFFLAGS, &ifr ) < 0 )
114 return false; 114 return false;
115 115
116 return ( ifr. ifr_flags & IFF_UP ); 116 return ( ifr. ifr_flags & IFF_UP );
117} 117}
118 118
119bool IrdaApplet::setIrdaStatus ( bool b ) 119bool IrdaApplet::setIrdaStatus ( bool b )
120{ 120{
121 struct ifreq ifr; 121 struct ifreq ifr;
122 strcpy ( ifr. ifr_name, "irda0" ); 122 strcpy ( ifr. ifr_name, "irda0" );
123 123
124 if ( ::ioctl ( m_sockfd, SIOCGIFFLAGS, &ifr ) < 0 ) 124 if ( ::ioctl ( m_sockfd, SIOCGIFFLAGS, &ifr ) < 0 )
diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp
index b17498d..fc5f093 100644
--- a/core/applets/multikeyapplet/multikey.cpp
+++ b/core/applets/multikeyapplet/multikey.cpp
@@ -3,50 +3,50 @@
3** All rights reserved. 3** All rights reserved.
4** 4**
5** This file may be distributed and/or modified under the terms of the 5** This file may be distributed and/or modified under the terms of the
6** GNU General Public License version 2 as published by the Free Software 6** GNU General Public License version 2 as published by the Free Software
7** Foundation and appearing in the file LICENSE.GPL included in the 7** Foundation and appearing in the file LICENSE.GPL included in the
8** packaging of this file. 8** packaging of this file.
9** 9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12** 12**
13**********************************************************************/ 13**********************************************************************/
14 14
15#include "multikey.h" 15#include "multikey.h"
16 16
17/* OPIE */ 17/* OPIE */
18#include <opie2/otaskbarapplet.h> 18#include <opie2/otaskbarapplet.h>
19#include <qpe/qcopenvelope_qws.h> 19#include <qpe/qcopenvelope_qws.h>
20 20
21/* QT */ 21/* QT */
22#include <qdir.h> 22#include <qdir.h>
23 23
24Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN") 24Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN")
25{ 25{
26 QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this); 26 QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this);
27 connect( swChannel, SIGNAL(received(const QCString &, const QByteArray &)), 27 connect( swChannel, SIGNAL(received(const QCString&,const QByteArray&)),
28 this, SLOT(message(const QCString &, const QByteArray &))); 28 this, SLOT(message(const QCString&,const QByteArray&)));
29 29
30 setFont( QFont( "Helvetica", 10, QFont::Normal ) ); 30 setFont( QFont( "Helvetica", 10, QFont::Normal ) );
31 QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold); 31 QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold);
32 lang = 0; 32 lang = 0;
33 QCopEnvelope e("MultiKey/Keyboard", "getmultikey()"); 33 QCopEnvelope e("MultiKey/Keyboard", "getmultikey()");
34 setText("EN"); 34 setText("EN");
35 popupMenu.insertItem("EN", 0); 35 popupMenu.insertItem("EN", 0);
36 show(); 36 show();
37} 37}
38 38
39void Multikey::mousePressEvent(QMouseEvent *ev) 39void Multikey::mousePressEvent(QMouseEvent *ev)
40{ 40{
41 if (!sw_maps.count()) 41 if (!sw_maps.count())
42 return; 42 return;
43 43
44 if (ev->button() == RightButton) { 44 if (ev->button() == RightButton) {
45 45
46 QPoint p = mapToGlobal(QPoint(0, 0)); 46 QPoint p = mapToGlobal(QPoint(0, 0));
47 QSize s = popupMenu.sizeHint(); 47 QSize s = popupMenu.sizeHint();
48 int opt = popupMenu.exec(QPoint(p.x() + (width() / 2) - (s.width() / 2), 48 int opt = popupMenu.exec(QPoint(p.x() + (width() / 2) - (s.width() / 2),
49 p.y() - s.height()), 0); 49 p.y() - s.height()), 0);
50 50
51 if (opt == -1) 51 if (opt == -1)
52 return; 52 return;
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp
index dcbf809..0488c36 100644
--- a/core/applets/rotateapplet/rotate.cpp
+++ b/core/applets/rotateapplet/rotate.cpp
@@ -27,50 +27,50 @@
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "rotate.h" 31#include "rotate.h"
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie/odevice.h> 34#include <opie/odevice.h>
35#include <qpe/config.h> 35#include <qpe/config.h>
36#include <qpe/power.h> 36#include <qpe/power.h>
37#include <qpe/qcopenvelope_qws.h> 37#include <qpe/qcopenvelope_qws.h>
38#include <qpe/resource.h> 38#include <qpe/resource.h>
39using namespace Opie; 39using namespace Opie;
40 40
41/* QT */ 41/* QT */
42 42
43#include <time.h> 43#include <time.h>
44 44
45RotateApplet::RotateApplet() 45RotateApplet::RotateApplet()
46 :QObject( 0, "RotateApplet" ), m_flipped( false ) 46 :QObject( 0, "RotateApplet" ), m_flipped( false )
47{ 47{
48 48
49#if !defined(QT_NO_COP) 49#if !defined(QT_NO_COP)
50 QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this ); 50 QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this );
51 connect ( rotateChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 51 connect ( rotateChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
52 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); 52 this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) );
53#endif 53#endif
54 54
55} 55}
56 56
57RotateApplet::~RotateApplet ( ) 57RotateApplet::~RotateApplet ( )
58{} 58{}
59 59
60/** 60/**
61 * Qcop receive method. 61 * Qcop receive method.
62 */ 62 */
63void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) 63void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data )
64{ 64{
65 qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg ); 65 qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg );
66 66
67 if ( ODevice::inst()->hasHingeSensor() ) 67 if ( ODevice::inst()->hasHingeSensor() )
68 { 68 {
69 struct timespec interval; 69 struct timespec interval;
70 struct timespec remain; 70 struct timespec remain;
71 interval.tv_sec = 0; 71 interval.tv_sec = 0;
72 interval.tv_nsec = 600000; 72 interval.tv_nsec = 600000;
73 ::nanosleep( &interval, &remain ); 73 ::nanosleep( &interval, &remain );
74 OHingeStatus status = ODevice::inst()->readHingeSensor(); 74 OHingeStatus status = ODevice::inst()->readHingeSensor();
75 qDebug( "RotateApplet::readHingeSensor = %d", (int) status ); 75 qDebug( "RotateApplet::readHingeSensor = %d", (int) status );
76 76
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp
index 5d6bce4..20e1c9b 100644
--- a/core/applets/screenshotapplet/screenshot.cpp
+++ b/core/applets/screenshotapplet/screenshot.cpp
@@ -278,51 +278,51 @@ ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name )
278 saveNamedCheck-> setFocusPolicy ( QWidget::NoFocus ); 278 saveNamedCheck-> setFocusPolicy ( QWidget::NoFocus );
279 vbox->addWidget( saveNamedCheck); 279 vbox->addWidget( saveNamedCheck);
280 280
281 vbox-> addSpacing ( 3 ); 281 vbox-> addSpacing ( 3 );
282 282
283 l = new QLabel ( tr( "Save screenshot as..." ), this ); 283 l = new QLabel ( tr( "Save screenshot as..." ), this );
284 vbox-> addWidget ( l, AlignCenter ); 284 vbox-> addWidget ( l, AlignCenter );
285 285
286 hbox = new QHBoxLayout ( vbox ); 286 hbox = new QHBoxLayout ( vbox );
287 287
288 grabItButton = new QPushButton( tr( "File" ), this, "GrabButton" ); 288 grabItButton = new QPushButton( tr( "File" ), this, "GrabButton" );
289 grabItButton ->setFocusPolicy( QWidget::TabFocus ); 289 grabItButton ->setFocusPolicy( QWidget::TabFocus );
290 hbox-> addWidget ( grabItButton ); 290 hbox-> addWidget ( grabItButton );
291 291
292 scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" ); 292 scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" );
293 scapButton ->setFocusPolicy( QWidget::TabFocus ); 293 scapButton ->setFocusPolicy( QWidget::TabFocus );
294 hbox-> addWidget ( scapButton ); 294 hbox-> addWidget ( scapButton );
295 295
296 setFixedSize ( sizeHint ( )); 296 setFixedSize ( sizeHint ( ));
297 setFocusPolicy ( QWidget::NoFocus ); 297 setFocusPolicy ( QWidget::NoFocus );
298 298
299 299
300 grabTimer = new QTimer ( this, "grab timer"); 300 grabTimer = new QTimer ( this, "grab timer");
301 301
302 connect ( grabTimer, SIGNAL( timeout ( )), this, SLOT( performGrab ( ))); 302 connect ( grabTimer, SIGNAL( timeout()), this, SLOT( performGrab()));
303 connect ( grabItButton, SIGNAL( clicked ( )), SLOT( slotGrab ( ))); 303 connect ( grabItButton, SIGNAL( clicked()), SLOT( slotGrab()));
304 connect ( scapButton, SIGNAL( clicked ( )), SLOT( slotScap ( ))); 304 connect ( scapButton, SIGNAL( clicked()), SLOT( slotScap()));
305} 305}
306 306
307void ScreenshotControl::slotGrab() 307void ScreenshotControl::slotGrab()
308{ 308{
309 buttonPushed = 1; 309 buttonPushed = 1;
310 hide(); 310 hide();
311 311
312 setFileName = FALSE; 312 setFileName = FALSE;
313 if ( saveNamedCheck->isChecked()) { 313 if ( saveNamedCheck->isChecked()) {
314 setFileName = TRUE; 314 setFileName = TRUE;
315 InputDialog *fileDlg; 315 InputDialog *fileDlg;
316 316
317 fileDlg = new InputDialog( 0 , tr("Name of screenshot "), TRUE, 0); 317 fileDlg = new InputDialog( 0 , tr("Name of screenshot "), TRUE, 0);
318 fileDlg->exec(); 318 fileDlg->exec();
319 fileDlg->raise(); 319 fileDlg->raise();
320 QString fileName, list; 320 QString fileName, list;
321 if ( fileDlg->result() == 1 ) { 321 if ( fileDlg->result() == 1 ) {
322 fileName = fileDlg->LineEdit1->text(); 322 fileName = fileDlg->LineEdit1->text();
323 323
324 if (fileName.find("/", 0, TRUE) == -1) 324 if (fileName.find("/", 0, TRUE) == -1)
325 FileNamePath = QDir::homeDirPath() + "/Documents/image/png/" + fileName; 325 FileNamePath = QDir::homeDirPath() + "/Documents/image/png/" + fileName;
326 else 326 else
327 FileNamePath = fileName; 327 FileNamePath = fileName;
328 328
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index 563d110..27f6015 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -192,50 +192,50 @@ static char * vmemo_xpm[] = {
192 " *.B =. ", 192 " *.B =. ",
193 " n n n n n n n n n "}; 193 " n n n n n n n n n "};
194 194
195 195
196VMemo::VMemo( QWidget *parent, const char *_name ) 196VMemo::VMemo( QWidget *parent, const char *_name )
197 : QWidget( parent, _name ) { 197 : QWidget( parent, _name ) {
198 setFixedHeight( 18 ); 198 setFixedHeight( 18 );
199 setFixedWidth( 14 ); 199 setFixedWidth( 14 );
200 200
201 t_timer = new QTimer( this ); 201 t_timer = new QTimer( this );
202 connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) ); 202 connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) );
203 203
204 Config vmCfg("Vmemo"); 204 Config vmCfg("Vmemo");
205 vmCfg.setGroup("Defaults"); 205 vmCfg.setGroup("Defaults");
206 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); 206 int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1));
207 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0); 207 useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0);
208 208
209 qDebug("toggleKey %d", toggleKey); 209 qDebug("toggleKey %d", toggleKey);
210 if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) 210 if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" ))
211 systemZaurus=TRUE; 211 systemZaurus=TRUE;
212 else 212 else
213 systemZaurus=FALSE; 213 systemZaurus=FALSE;
214 214
215 myChannel = new QCopChannel( "QPE/VMemo", this ); 215 myChannel = new QCopChannel( "QPE/VMemo", this );
216 connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), 216 connect( myChannel, SIGNAL(received(const QCString&,const QByteArray&)),
217 this, SLOT(receive(const QCString&, const QByteArray&)) ); 217 this, SLOT(receive(const QCString&,const QByteArray&)) );
218 218
219 if( toggleKey != -1 ) { 219 if( toggleKey != -1 ) {
220 // keyRegister(key, channel, message) 220 // keyRegister(key, channel, message)
221 QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)"); 221 QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)");
222 // e << 4096; // Key_Escape 222 // e << 4096; // Key_Escape
223 // e << Key_F5; //4148 223 // e << Key_F5; //4148
224 e << toggleKey; 224 e << toggleKey;
225 e << QString("QPE/VMemo"); 225 e << QString("QPE/VMemo");
226 e << QString("toggleRecord()"); 226 e << QString("toggleRecord()");
227 } 227 }
228 if(toggleKey == 1) 228 if(toggleKey == 1)
229 usingIcon=TRUE; 229 usingIcon=TRUE;
230 else 230 else
231 usingIcon=FALSE; 231 usingIcon=FALSE;
232 if( vmCfg.readNumEntry("hideIcon",0) == 1) 232 if( vmCfg.readNumEntry("hideIcon",0) == 1)
233 hide(); 233 hide();
234 recording = FALSE; 234 recording = FALSE;
235 // } 235 // }
236} 236}
237 237
238VMemo::~VMemo() { 238VMemo::~VMemo() {
239} 239}
240 240
241int VMemo::position() 241int VMemo::position()
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 8fd88f6..942cebb 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -387,69 +387,69 @@ VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *pa
387 tapBox-> setFocusPolicy ( QWidget::NoFocus ); 387 tapBox-> setFocusPolicy ( QWidget::NoFocus );
388 388
389 vbox-> addWidget ( tapBox, AlignVCenter | AlignLeft ); 389 vbox-> addWidget ( tapBox, AlignVCenter | AlignLeft );
390 390
391 keyBox = new QCheckBox ( tr( "Key Clicks" ), this ); 391 keyBox = new QCheckBox ( tr( "Key Clicks" ), this );
392 keyBox-> setFocusPolicy ( QWidget::NoFocus ); 392 keyBox-> setFocusPolicy ( QWidget::NoFocus );
393 393
394 vbox-> addWidget ( keyBox, AlignVCenter | AlignLeft ); 394 vbox-> addWidget ( keyBox, AlignVCenter | AlignLeft );
395 395
396 alarmBox = new QCheckBox ( tr( "Alarm Sound" ), this ); 396 alarmBox = new QCheckBox ( tr( "Alarm Sound" ), this );
397 alarmBox-> setFocusPolicy ( QWidget::NoFocus ); 397 alarmBox-> setFocusPolicy ( QWidget::NoFocus );
398 398
399 vbox-> addWidget ( alarmBox, AlignVCenter | AlignLeft ); 399 vbox-> addWidget ( alarmBox, AlignVCenter | AlignLeft );
400 400
401 if ( has_wav_alarm ) { 401 if ( has_wav_alarm ) {
402 alarmBox-> hide ( ); 402 alarmBox-> hide ( );
403 } 403 }
404 404
405 vbox-> addStretch ( 100 ); 405 vbox-> addStretch ( 100 );
406 406
407 setFixedSize ( sizeHint ( )); 407 setFixedSize ( sizeHint ( ));
408 setFocusPolicy ( QWidget::NoFocus ); 408 setFocusPolicy ( QWidget::NoFocus );
409 409
410 rateTimer = new QTimer( this ); 410 rateTimer = new QTimer( this );
411 connect ( rateTimer, SIGNAL( timeout ( )), this, SLOT( rateTimerDone ( ))); 411 connect ( rateTimer, SIGNAL( timeout()), this, SLOT( rateTimerDone()));
412 412
413 connect ( upButton, SIGNAL( pressed ( )), this, SLOT( buttonChanged ( ))); 413 connect ( upButton, SIGNAL( pressed()), this, SLOT( buttonChanged()));
414 connect ( upButton, SIGNAL( released ( )), this, SLOT( buttonChanged ( ))); 414 connect ( upButton, SIGNAL( released()), this, SLOT( buttonChanged()));
415 connect ( downButton, SIGNAL( pressed ( )), this, SLOT( buttonChanged ( ))); 415 connect ( downButton, SIGNAL( pressed()), this, SLOT( buttonChanged()));
416 connect ( downButton, SIGNAL( released ( )), this, SLOT( buttonChanged ( ))); 416 connect ( downButton, SIGNAL( released()), this, SLOT( buttonChanged()));
417 417
418 connect ( micSlider, SIGNAL( valueChanged ( int )), this, SLOT( micMoved( int ))); 418 connect ( micSlider, SIGNAL( valueChanged(int)), this, SLOT( micMoved(int)));
419 connect ( volSlider, SIGNAL( valueChanged ( int )), this, SLOT( volMoved( int ))); 419 connect ( volSlider, SIGNAL( valueChanged(int)), this, SLOT( volMoved(int)));
420 connect ( alarmSlider, SIGNAL( valueChanged ( int )), this, SLOT( alarmMoved( int ))); 420 connect ( alarmSlider, SIGNAL( valueChanged(int)), this, SLOT( alarmMoved(int)));
421 connect ( bassSlider, SIGNAL( valueChanged ( int )), this, SLOT( bassMoved( int ))); 421 connect ( bassSlider, SIGNAL( valueChanged(int)), this, SLOT( bassMoved(int)));
422 connect ( trebleSlider, SIGNAL( valueChanged ( int )), this, SLOT( trebleMoved( int ))); 422 connect ( trebleSlider, SIGNAL( valueChanged(int)), this, SLOT( trebleMoved(int)));
423 423
424 424
425 connect ( volLed, SIGNAL( toggled ( bool )), this, SLOT( volMuteToggled ( bool ))); 425 connect ( volLed, SIGNAL( toggled(bool)), this, SLOT( volMuteToggled(bool)));
426 connect ( micLed, SIGNAL( toggled ( bool )), this, SLOT( micMuteToggled ( bool ))); 426 connect ( micLed, SIGNAL( toggled(bool)), this, SLOT( micMuteToggled(bool)));
427 connect ( alarmLed, SIGNAL( toggled ( bool )), this, SLOT( alarmSoundToggled ( bool ))); 427 connect ( alarmLed, SIGNAL( toggled(bool)), this, SLOT( alarmSoundToggled(bool)));
428 428
429 connect ( alarmBox, SIGNAL( toggled ( bool )), this, SLOT( alarmSoundToggled ( bool ))); 429 connect ( alarmBox, SIGNAL( toggled(bool)), this, SLOT( alarmSoundToggled(bool)));
430 connect ( keyBox, SIGNAL( toggled ( bool )), this, SLOT( keyClickToggled ( bool ))); 430 connect ( keyBox, SIGNAL( toggled(bool)), this, SLOT( keyClickToggled(bool)));
431 connect ( tapBox, SIGNAL( toggled ( bool )), this, SLOT( screenTapToggled ( bool ))); 431 connect ( tapBox, SIGNAL( toggled(bool)), this, SLOT( screenTapToggled(bool)));
432 432
433 // initialize variables 433 // initialize variables
434 434
435 readConfig ( true ); 435 readConfig ( true );
436 436
437 // initialize the config file, in case some entries are missing 437 // initialize the config file, in case some entries are missing
438 438
439 writeConfigEntry ( "VolumePercent", m_vol_percent, UPD_None ); 439 writeConfigEntry ( "VolumePercent", m_vol_percent, UPD_None );
440 writeConfigEntry ( "BassPercent", m_vol_percent, UPD_None ); 440 writeConfigEntry ( "BassPercent", m_vol_percent, UPD_None );
441 writeConfigEntry ( "TreblePercent", m_vol_percent, UPD_None ); 441 writeConfigEntry ( "TreblePercent", m_vol_percent, UPD_None );
442 writeConfigEntry ( "Mute", m_vol_muted, UPD_None ); 442 writeConfigEntry ( "Mute", m_vol_muted, UPD_None );
443 writeConfigEntry ( "AlarmPercent", m_alarm_percent, UPD_None ); 443 writeConfigEntry ( "AlarmPercent", m_alarm_percent, UPD_None );
444 writeConfigEntry ( "TouchSound", m_snd_touch, UPD_None ); 444 writeConfigEntry ( "TouchSound", m_snd_touch, UPD_None );
445 writeConfigEntry ( "KeySound", m_snd_key, UPD_None ); 445 writeConfigEntry ( "KeySound", m_snd_key, UPD_None );
446 writeConfigEntry ( "AlarmSound", m_snd_alarm, UPD_Vol ); 446 writeConfigEntry ( "AlarmSound", m_snd_alarm, UPD_Vol );
447 447
448 writeConfigEntry ( "Mic", m_mic_percent, UPD_None ); 448 writeConfigEntry ( "Mic", m_mic_percent, UPD_None );
449 writeConfigEntry ( "MicMute", m_mic_muted, UPD_Mic ); 449 writeConfigEntry ( "MicMute", m_mic_muted, UPD_Mic );
450} 450}
451 451
452bool VolumeControl::volMuted ( ) const 452bool VolumeControl::volMuted ( ) const
453{ 453{
454 return m_vol_muted; 454 return m_vol_muted;
455} 455}
@@ -703,50 +703,50 @@ void VolumeControl::writeConfigEntry ( const char *entry, int val, eUpdate upd )
703 break; 703 break;
704 } 704 }
705 case UPD_Treble: { 705 case UPD_Treble: {
706 QCopEnvelope ( "QPE/System", "trebleChange(bool)" ) << true; 706 QCopEnvelope ( "QPE/System", "trebleChange(bool)" ) << true;
707 break; 707 break;
708 } 708 }
709 709
710 case UPD_None: 710 case UPD_None:
711 break; 711 break;
712 } 712 }
713#endif 713#endif
714} 714}
715 715
716//=========================================================================== 716//===========================================================================
717 717
718VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) 718VolumeApplet::VolumeApplet( QWidget *parent, const char *name )
719 : QWidget( parent, name ) 719 : QWidget( parent, name )
720{ 720{
721 setFixedWidth ( AppLnk::smallIconSize() ); 721 setFixedWidth ( AppLnk::smallIconSize() );
722 setFixedHeight ( AppLnk::smallIconSize()+4 ); 722 setFixedHeight ( AppLnk::smallIconSize()+4 );
723 723
724 m_pixmap = new QPixmap ( Resource::loadPixmap ( "volume" )); 724 m_pixmap = new QPixmap ( Resource::loadPixmap ( "volume" ));
725 m_dialog = new VolumeControl ( this, true, this, "volumecontrol" ); 725 m_dialog = new VolumeControl ( this, true, this, "volumecontrol" );
726 726
727 connect ( qApp, SIGNAL( volumeChanged ( bool )), m_dialog, SLOT( volumeChanged( bool ))); 727 connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool)));
728 connect ( qApp, SIGNAL( micChanged ( bool )), m_dialog, SLOT ( micChanged( bool ))); 728 connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool)));
729} 729}
730 730
731VolumeApplet::~VolumeApplet() 731VolumeApplet::~VolumeApplet()
732{ 732{
733 delete m_pixmap; 733 delete m_pixmap;
734} 734}
735 735
736int VolumeApplet::position() 736int VolumeApplet::position()
737{ 737{
738 return 6; 738 return 6;
739} 739}
740 740
741void VolumeApplet::mousePressEvent ( QMouseEvent * ) 741void VolumeApplet::mousePressEvent ( QMouseEvent * )
742{ 742{
743 if ( m_dialog-> isVisible ( )) 743 if ( m_dialog-> isVisible ( ))
744 m_dialog-> hide ( ); 744 m_dialog-> hide ( );
745 else 745 else
746 m_dialog-> show ( true ); 746 m_dialog-> show ( true );
747} 747}
748 748
749void VolumeApplet::redraw ( bool all ) 749void VolumeApplet::redraw ( bool all )
750{ 750{
751 if ( all ) 751 if ( all )
752 repaint ( true ); 752 repaint ( true );