summaryrefslogtreecommitdiff
path: root/core/applets
Unidiff
Diffstat (limited to 'core/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/batteryapplet/batteryappletimpl.cpp2
-rw-r--r--core/applets/cardmon/cardmonimpl.cpp2
-rw-r--r--core/applets/clipboardapplet/clipboardappletimpl.cpp2
-rw-r--r--core/applets/clockapplet/clockappletimpl.cpp2
-rw-r--r--core/applets/homeapplet/home.cpp2
-rw-r--r--core/applets/irdaapplet/irdaappletimpl.cpp4
-rw-r--r--core/applets/logoutapplet/logout.cpp2
-rw-r--r--core/applets/multikeyapplet/multikeyappletimpl.cpp2
-rw-r--r--core/applets/restartapplet/restartappletimpl.cpp4
-rw-r--r--core/applets/restartapplet2/restart.cpp2
-rw-r--r--core/applets/rotateapplet/rotate.cpp2
-rw-r--r--core/applets/screenshotapplet/screenshotappletimpl.cpp4
-rw-r--r--core/applets/suspendapplet/suspend.cpp2
-rw-r--r--core/applets/vmemo/vmemoimpl.cpp2
-rw-r--r--core/applets/volumeapplet/volumeappletimpl.cpp2
-rw-r--r--core/applets/vtapplet/vt.cpp2
16 files changed, 35 insertions, 3 deletions
diff --git a/core/applets/batteryapplet/batteryappletimpl.cpp b/core/applets/batteryapplet/batteryappletimpl.cpp
index 3f3079a..9ad0382 100644
--- a/core/applets/batteryapplet/batteryappletimpl.cpp
+++ b/core/applets/batteryapplet/batteryappletimpl.cpp
@@ -29,35 +29,37 @@ BatteryAppletImpl::BatteryAppletImpl()
29BatteryAppletImpl::~BatteryAppletImpl() 29BatteryAppletImpl::~BatteryAppletImpl()
30{ 30{
31 delete battery; 31 delete battery;
32} 32}
33 33
34QWidget *BatteryAppletImpl::applet( QWidget *parent ) 34QWidget *BatteryAppletImpl::applet( QWidget *parent )
35{ 35{
36 if ( !battery ) 36 if ( !battery )
37 battery = new BatteryMeter( parent ); 37 battery = new BatteryMeter( parent );
38 return battery; 38 return battery;
39} 39}
40 40
41int BatteryAppletImpl::position() const 41int BatteryAppletImpl::position() const
42{ 42{
43 return 8; 43 return 8;
44} 44}
45 45
46QRESULT BatteryAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 46QRESULT BatteryAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
47{ 47{
48 *iface = 0; 48 *iface = 0;
49 if ( uuid == IID_QUnknown ) 49 if ( uuid == IID_QUnknown )
50 *iface = this; 50 *iface = this;
51 else if ( uuid == IID_TaskbarApplet ) 51 else if ( uuid == IID_TaskbarApplet )
52 *iface = this; 52 *iface = this;
53 else
54 return QS_FALSE;
53 55
54 if ( *iface ) 56 if ( *iface )
55 (*iface)->addRef(); 57 (*iface)->addRef();
56 return QS_OK; 58 return QS_OK;
57} 59}
58 60
59Q_EXPORT_INTERFACE() 61Q_EXPORT_INTERFACE()
60{ 62{
61 Q_CREATE_INSTANCE( BatteryAppletImpl ) 63 Q_CREATE_INSTANCE( BatteryAppletImpl )
62} 64}
63 65
diff --git a/core/applets/cardmon/cardmonimpl.cpp b/core/applets/cardmon/cardmonimpl.cpp
index 0aa55de..265214e 100644
--- a/core/applets/cardmon/cardmonimpl.cpp
+++ b/core/applets/cardmon/cardmonimpl.cpp
@@ -6,35 +6,37 @@ CardMonitorImpl::CardMonitorImpl()
6 : cardMonitor(0), ref(0) { 6 : cardMonitor(0), ref(0) {
7} 7}
8 8
9CardMonitorImpl::~CardMonitorImpl() { 9CardMonitorImpl::~CardMonitorImpl() {
10 delete cardMonitor; 10 delete cardMonitor;
11} 11}
12 12
13QWidget *CardMonitorImpl::applet( QWidget *parent ) { 13QWidget *CardMonitorImpl::applet( QWidget *parent ) {
14 if ( !cardMonitor ) { 14 if ( !cardMonitor ) {
15 cardMonitor = new CardMonitor( parent ); 15 cardMonitor = new CardMonitor( parent );
16 } 16 }
17 return cardMonitor; 17 return cardMonitor;
18} 18}
19 19
20int CardMonitorImpl::position() const { 20int CardMonitorImpl::position() const {
21 return 7; 21 return 7;
22} 22}
23 23
24QRESULT CardMonitorImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { 24QRESULT CardMonitorImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
25 *iface = 0; 25 *iface = 0;
26 if ( uuid == IID_QUnknown ) { 26 if ( uuid == IID_QUnknown ) {
27 *iface = this; 27 *iface = this;
28 } else if ( uuid == IID_TaskbarApplet ) { 28 } else if ( uuid == IID_TaskbarApplet ) {
29 *iface = this; 29 *iface = this;
30 } else {
31 return QS_FALSE;
30 } 32 }
31 33
32 if ( *iface ) { 34 if ( *iface ) {
33 (*iface)->addRef(); 35 (*iface)->addRef();
34 } 36 }
35 return QS_OK; 37 return QS_OK;
36} 38}
37 39
38Q_EXPORT_INTERFACE() { 40Q_EXPORT_INTERFACE() {
39 Q_CREATE_INSTANCE( CardMonitorImpl ) 41 Q_CREATE_INSTANCE( CardMonitorImpl )
40} 42}
diff --git a/core/applets/clipboardapplet/clipboardappletimpl.cpp b/core/applets/clipboardapplet/clipboardappletimpl.cpp
index 8080690..8fcf117 100644
--- a/core/applets/clipboardapplet/clipboardappletimpl.cpp
+++ b/core/applets/clipboardapplet/clipboardappletimpl.cpp
@@ -29,36 +29,38 @@ ClipboardAppletImpl::ClipboardAppletImpl()
29ClipboardAppletImpl::~ClipboardAppletImpl() 29ClipboardAppletImpl::~ClipboardAppletImpl()
30{ 30{
31 delete clipboard; 31 delete clipboard;
32} 32}
33 33
34QWidget *ClipboardAppletImpl::applet( QWidget *parent ) 34QWidget *ClipboardAppletImpl::applet( QWidget *parent )
35{ 35{
36 if ( !clipboard ) 36 if ( !clipboard )
37 clipboard = new ClipboardApplet( parent ); 37 clipboard = new ClipboardApplet( parent );
38 return clipboard; 38 return clipboard;
39} 39}
40 40
41int ClipboardAppletImpl::position() const 41int ClipboardAppletImpl::position() const
42{ 42{
43 return 6; 43 return 6;
44} 44}
45 45
46QRESULT ClipboardAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 46QRESULT ClipboardAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
47{ 47{
48 *iface = 0; 48 *iface = 0;
49 if ( uuid == IID_QUnknown ) 49 if ( uuid == IID_QUnknown )
50 *iface = this; 50 *iface = this;
51 else if ( uuid == IID_TaskbarApplet ) 51 else if ( uuid == IID_TaskbarApplet )
52 *iface = this; 52 *iface = this;
53 else
54 return QS_FALSE;
53 55
54 if ( *iface ) 56 if ( *iface )
55 (*iface)->addRef(); 57 (*iface)->addRef();
56 return QS_OK; 58 return QS_OK;
57} 59}
58 60
59Q_EXPORT_INTERFACE() 61Q_EXPORT_INTERFACE()
60{ 62{
61 Q_CREATE_INSTANCE( ClipboardAppletImpl ) 63 Q_CREATE_INSTANCE( ClipboardAppletImpl )
62} 64}
63 65
64 66
diff --git a/core/applets/clockapplet/clockappletimpl.cpp b/core/applets/clockapplet/clockappletimpl.cpp
index 8bf1baf..2b9cc05 100644
--- a/core/applets/clockapplet/clockappletimpl.cpp
+++ b/core/applets/clockapplet/clockappletimpl.cpp
@@ -30,36 +30,38 @@ ClockAppletImpl::~ClockAppletImpl()
30{ 30{
31 delete clock; 31 delete clock;
32} 32}
33 33
34QWidget *ClockAppletImpl::applet( QWidget *parent ) 34QWidget *ClockAppletImpl::applet( QWidget *parent )
35{ 35{
36 if ( !clock ) 36 if ( !clock )
37 clock = new LauncherClock( parent ); 37 clock = new LauncherClock( parent );
38 return clock; 38 return clock;
39} 39}
40 40
41int ClockAppletImpl::position() const 41int ClockAppletImpl::position() const
42{ 42{
43 return 10; 43 return 10;
44} 44}
45 45
46#ifndef QT_NO_COMPONENT 46#ifndef QT_NO_COMPONENT
47QRESULT ClockAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 47QRESULT ClockAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
48{ 48{
49 *iface = 0; 49 *iface = 0;
50 if ( uuid == IID_QUnknown ) 50 if ( uuid == IID_QUnknown )
51 *iface = this; 51 *iface = this;
52 else if ( uuid == IID_TaskbarApplet ) 52 else if ( uuid == IID_TaskbarApplet )
53 *iface = this; 53 *iface = this;
54 else
55 return QS_FALSE;
54 56
55 if ( *iface ) 57 if ( *iface )
56 (*iface)->addRef(); 58 (*iface)->addRef();
57 return QS_OK; 59 return QS_OK;
58} 60}
59 61
60Q_EXPORT_INTERFACE() 62Q_EXPORT_INTERFACE()
61{ 63{
62 Q_CREATE_INSTANCE( ClockAppletImpl ) 64 Q_CREATE_INSTANCE( ClockAppletImpl )
63} 65}
64#endif 66#endif
65 67
diff --git a/core/applets/homeapplet/home.cpp b/core/applets/homeapplet/home.cpp
index 017de27..36307ab 100644
--- a/core/applets/homeapplet/home.cpp
+++ b/core/applets/homeapplet/home.cpp
@@ -50,36 +50,38 @@ QIconSet HomeApplet::icon ( ) const
50 if ( !img. isNull ( )) 50 if ( !img. isNull ( ))
51 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 51 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
52 return pix; 52 return pix;
53} 53}
54 54
55QPopupMenu *HomeApplet::popup ( QWidget * ) const 55QPopupMenu *HomeApplet::popup ( QWidget * ) const
56{ 56{
57 return 0; 57 return 0;
58} 58}
59 59
60void HomeApplet::activated ( ) 60void HomeApplet::activated ( )
61{ 61{
62 // to desktop (home) 62 // to desktop (home)
63 QCopEnvelope ( "QPE/Application/qpe", "raise()" ); 63 QCopEnvelope ( "QPE/Application/qpe", "raise()" );
64} 64}
65 65
66 66
67QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 67QRESULT HomeApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
68{ 68{
69 *iface = 0; 69 *iface = 0;
70 if ( uuid == IID_QUnknown ) 70 if ( uuid == IID_QUnknown )
71 *iface = this; 71 *iface = this;
72 else if ( uuid == IID_MenuApplet ) 72 else if ( uuid == IID_MenuApplet )
73 *iface = this; 73 *iface = this;
74 else
75 return QS_FALSE;
74 76
75 if ( *iface ) 77 if ( *iface )
76 (*iface)-> addRef ( ); 78 (*iface)-> addRef ( );
77 return QS_OK; 79 return QS_OK;
78} 80}
79 81
80Q_EXPORT_INTERFACE( ) 82Q_EXPORT_INTERFACE( )
81{ 83{
82 Q_CREATE_INSTANCE( HomeApplet ) 84 Q_CREATE_INSTANCE( HomeApplet )
83} 85}
84 86
85 87
diff --git a/core/applets/irdaapplet/irdaappletimpl.cpp b/core/applets/irdaapplet/irdaappletimpl.cpp
index 02443db..3617698 100644
--- a/core/applets/irdaapplet/irdaappletimpl.cpp
+++ b/core/applets/irdaapplet/irdaappletimpl.cpp
@@ -29,36 +29,38 @@ IrdaAppletImpl::IrdaAppletImpl()
29IrdaAppletImpl::~IrdaAppletImpl() 29IrdaAppletImpl::~IrdaAppletImpl()
30{ 30{
31 delete irda; 31 delete irda;
32} 32}
33 33
34QWidget *IrdaAppletImpl::applet( QWidget *parent ) 34QWidget *IrdaAppletImpl::applet( QWidget *parent )
35{ 35{
36 if ( !irda ) 36 if ( !irda )
37 irda = new IrdaApplet( parent ); 37 irda = new IrdaApplet( parent );
38 return irda; 38 return irda;
39} 39}
40 40
41int IrdaAppletImpl::position() const 41int IrdaAppletImpl::position() const
42{ 42{
43 return 6; 43 return 6;
44} 44}
45 45
46QRESULT IrdaAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 46QRESULT IrdaAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
47{ 47{
48 *iface = 0; 48 *iface = 0;
49 if ( uuid == IID_QUnknown ) 49 if ( uuid == IID_QUnknown )
50 *iface = this; 50 *iface = this;
51 else if ( uuid == IID_TaskbarApplet ) 51 else if ( uuid == IID_TaskbarApplet )
52 *iface = this; 52 *iface = this;
53 53 else
54 return QS_FALSE;
55
54 if ( *iface ) 56 if ( *iface )
55 (*iface)->addRef(); 57 (*iface)->addRef();
56 return QS_OK; 58 return QS_OK;
57} 59}
58 60
59Q_EXPORT_INTERFACE() 61Q_EXPORT_INTERFACE()
60{ 62{
61 Q_CREATE_INSTANCE( IrdaAppletImpl ) 63 Q_CREATE_INSTANCE( IrdaAppletImpl )
62} 64}
63 65
64 66
diff --git a/core/applets/logoutapplet/logout.cpp b/core/applets/logoutapplet/logout.cpp
index 1769ae6..8d3cdba 100644
--- a/core/applets/logoutapplet/logout.cpp
+++ b/core/applets/logoutapplet/logout.cpp
@@ -90,35 +90,37 @@ void LogoutApplet::activated ( )
90 90
91 mb. setButtonText ( QMessageBox::Yes, "Yes" ); 91 mb. setButtonText ( QMessageBox::Yes, "Yes" );
92 mb. setButtonText ( QMessageBox::No, "No" ); 92 mb. setButtonText ( QMessageBox::No, "No" );
93 mb. setIconPixmap ( icon ( ). pixmap ( )); 93 mb. setIconPixmap ( icon ( ). pixmap ( ));
94 94
95 if ( mb. exec ( ) == QMessageBox::Yes ) { 95 if ( mb. exec ( ) == QMessageBox::Yes ) {
96 { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); } 96 { QCopEnvelope envelope( "QPE/System", "forceQuit()" ); }
97 97
98 qApp-> processEvents ( ); // ensure the message goes out. 98 qApp-> processEvents ( ); // ensure the message goes out.
99 sleep ( 1 ); // You have 1 second to comply. 99 sleep ( 1 ); // You have 1 second to comply.
100 100
101 ((HackApplication *) qApp )-> emit_about_to_quit ( ); 101 ((HackApplication *) qApp )-> emit_about_to_quit ( );
102 qApp-> quit(); 102 qApp-> quit();
103 } 103 }
104} 104}
105 105
106 106
107QRESULT LogoutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 107QRESULT LogoutApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
108{ 108{
109 *iface = 0; 109 *iface = 0;
110 if ( uuid == IID_QUnknown ) 110 if ( uuid == IID_QUnknown )
111 *iface = this; 111 *iface = this;
112 else if ( uuid == IID_MenuApplet ) 112 else if ( uuid == IID_MenuApplet )
113 *iface = this; 113 *iface = this;
114 else
115 return QS_FALSE;
114 116
115 if ( *iface ) 117 if ( *iface )
116 (*iface)-> addRef ( ); 118 (*iface)-> addRef ( );
117 return QS_OK; 119 return QS_OK;
118} 120}
119 121
120Q_EXPORT_INTERFACE( ) 122Q_EXPORT_INTERFACE( )
121{ 123{
122 Q_CREATE_INSTANCE( LogoutApplet ) 124 Q_CREATE_INSTANCE( LogoutApplet )
123} 125}
124 126
diff --git a/core/applets/multikeyapplet/multikeyappletimpl.cpp b/core/applets/multikeyapplet/multikeyappletimpl.cpp
index 4644556..adf92c4 100644
--- a/core/applets/multikeyapplet/multikeyappletimpl.cpp
+++ b/core/applets/multikeyapplet/multikeyappletimpl.cpp
@@ -23,35 +23,37 @@ MultikeyAppletImpl::~MultikeyAppletImpl()
23{ 23{
24 delete kbd; 24 delete kbd;
25} 25}
26 26
27QWidget *MultikeyAppletImpl::applet( QWidget *parent ) 27QWidget *MultikeyAppletImpl::applet( QWidget *parent )
28{ 28{
29 if ( !kbd ) 29 if ( !kbd )
30 kbd = new Multikey(parent); 30 kbd = new Multikey(parent);
31 return kbd; 31 return kbd;
32} 32}
33 33
34int MultikeyAppletImpl::position() const 34int MultikeyAppletImpl::position() const
35{ 35{
36 return 10; 36 return 10;
37} 37}
38 38
39#ifndef QT_NO_COMPONENT 39#ifndef QT_NO_COMPONENT
40QRESULT MultikeyAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 40QRESULT MultikeyAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
41{ 41{
42 *iface = 0; 42 *iface = 0;
43 if ( uuid == IID_QUnknown ) 43 if ( uuid == IID_QUnknown )
44 *iface = this; 44 *iface = this;
45 else if ( uuid == IID_TaskbarApplet ) 45 else if ( uuid == IID_TaskbarApplet )
46 *iface = this; 46 *iface = this;
47 else
48 return QS_FALSE;
47 49
48 if ( *iface ) 50 if ( *iface )
49 (*iface)->addRef(); 51 (*iface)->addRef();
50 return QS_OK; 52 return QS_OK;
51} 53}
52 54
53Q_EXPORT_INTERFACE() 55Q_EXPORT_INTERFACE()
54{ 56{
55 Q_CREATE_INSTANCE( MultikeyAppletImpl ) 57 Q_CREATE_INSTANCE( MultikeyAppletImpl )
56} 58}
57#endif 59#endif
diff --git a/core/applets/restartapplet/restartappletimpl.cpp b/core/applets/restartapplet/restartappletimpl.cpp
index e675c0b..5b0092d 100644
--- a/core/applets/restartapplet/restartappletimpl.cpp
+++ b/core/applets/restartapplet/restartappletimpl.cpp
@@ -30,36 +30,38 @@ RestartAppletImpl::~RestartAppletImpl()
30{ 30{
31 delete restart; 31 delete restart;
32} 32}
33 33
34QWidget *RestartAppletImpl::applet( QWidget *parent ) 34QWidget *RestartAppletImpl::applet( QWidget *parent )
35{ 35{
36 qDebug("restart applet"); 36 qDebug("restart applet");
37 if ( !restart ) 37 if ( !restart )
38 restart = new RestartApplet( parent ); 38 restart = new RestartApplet( parent );
39 return restart; 39 return restart;
40} 40}
41 41
42int RestartAppletImpl::position() const 42int RestartAppletImpl::position() const
43{ 43{
44 return 6; 44 return 6;
45} 45}
46 46
47QRESULT RestartAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 47QRESULT RestartAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
48{ 48{
49 *iface = 0; 49 *iface = 0;
50 if ( uuid == IID_QUnknown ) 50 if ( uuid == IID_QUnknown )
51 *iface = this; 51 *iface = this;
52 else if ( uuid == IID_TaskbarApplet ) 52 else if ( uuid == IID_TaskbarApplet )
53 *iface = this; 53 *iface = this;
54 54 else
55 return QS_FALSE;
56
55 if ( *iface ) 57 if ( *iface )
56 (*iface)->addRef(); 58 (*iface)->addRef();
57 return QS_OK; 59 return QS_OK;
58} 60}
59 61
60Q_EXPORT_INTERFACE() 62Q_EXPORT_INTERFACE()
61{ 63{
62 Q_CREATE_INSTANCE( RestartAppletImpl ) 64 Q_CREATE_INSTANCE( RestartAppletImpl )
63} 65}
64 66
65 67
diff --git a/core/applets/restartapplet2/restart.cpp b/core/applets/restartapplet2/restart.cpp
index caed9e5..576087b 100644
--- a/core/applets/restartapplet2/restart.cpp
+++ b/core/applets/restartapplet2/restart.cpp
@@ -72,36 +72,38 @@ QIconSet RestartApplet::icon ( ) const
72 72
73 if ( !img. isNull ( )) 73 if ( !img. isNull ( ))
74 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 74 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
75 return pix; 75 return pix;
76} 76}
77 77
78QPopupMenu *RestartApplet::popup ( QWidget * ) const 78QPopupMenu *RestartApplet::popup ( QWidget * ) const
79{ 79{
80 return 0; 80 return 0;
81} 81}
82 82
83void RestartApplet::activated ( ) 83void RestartApplet::activated ( )
84{ 84{
85 QCopEnvelope e("QPE/System", "restart()"); 85 QCopEnvelope e("QPE/System", "restart()");
86} 86}
87 87
88 88
89QRESULT RestartApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 89QRESULT RestartApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
90{ 90{
91 *iface = 0; 91 *iface = 0;
92 if ( uuid == IID_QUnknown ) 92 if ( uuid == IID_QUnknown )
93 *iface = this; 93 *iface = this;
94 else if ( uuid == IID_MenuApplet ) 94 else if ( uuid == IID_MenuApplet )
95 *iface = this; 95 *iface = this;
96 else
97 return QS_FALSE;
96 98
97 if ( *iface ) 99 if ( *iface )
98 (*iface)-> addRef ( ); 100 (*iface)-> addRef ( );
99 return QS_OK; 101 return QS_OK;
100} 102}
101 103
102Q_EXPORT_INTERFACE( ) 104Q_EXPORT_INTERFACE( )
103{ 105{
104 Q_CREATE_INSTANCE( RestartApplet ) 106 Q_CREATE_INSTANCE( RestartApplet )
105} 107}
106 108
107 109
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp
index 906063e..b676c74 100644
--- a/core/applets/rotateapplet/rotate.cpp
+++ b/core/applets/rotateapplet/rotate.cpp
@@ -221,34 +221,36 @@ void RotateApplet::activated()
221 else if ( rot == CW ) 221 else if ( rot == CW )
222 { 222 {
223 newRotation = ( defaultRotation + 270 ) % 360; 223 newRotation = ( defaultRotation + 270 ) % 360;
224 } 224 }
225 else if ( rot == Flip ) 225 else if ( rot == Flip )
226 { 226 {
227 newRotation = ( defaultRotation + 180 ) % 360; 227 newRotation = ( defaultRotation + 180 ) % 360;
228 } 228 }
229 } 229 }
230 230
231 QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" ); 231 QCopEnvelope env( "QPE/System", "setCurrentRotation(int)" );
232 env << newRotation; 232 env << newRotation;
233 233
234 m_flipped = !m_flipped; 234 m_flipped = !m_flipped;
235} 235}
236 236
237 237
238QRESULT RotateApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 238QRESULT RotateApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
239{ 239{
240 *iface = 0; 240 *iface = 0;
241 if ( uuid == IID_QUnknown ) 241 if ( uuid == IID_QUnknown )
242 *iface = this; 242 *iface = this;
243 else if ( uuid == IID_MenuApplet ) 243 else if ( uuid == IID_MenuApplet )
244 *iface = this; 244 *iface = this;
245 else
246 return QS_FALSE;
245 247
246 if ( *iface ) 248 if ( *iface )
247 (*iface)->addRef(); 249 (*iface)->addRef();
248 return QS_OK; 250 return QS_OK;
249} 251}
250 252
251Q_EXPORT_INTERFACE() 253Q_EXPORT_INTERFACE()
252{ 254{
253 Q_CREATE_INSTANCE( RotateApplet ) 255 Q_CREATE_INSTANCE( RotateApplet )
254} 256}
diff --git a/core/applets/screenshotapplet/screenshotappletimpl.cpp b/core/applets/screenshotapplet/screenshotappletimpl.cpp
index a537162..4a7512e 100644
--- a/core/applets/screenshotapplet/screenshotappletimpl.cpp
+++ b/core/applets/screenshotapplet/screenshotappletimpl.cpp
@@ -29,36 +29,38 @@ ScreenshotAppletImpl::ScreenshotAppletImpl()
29ScreenshotAppletImpl::~ScreenshotAppletImpl() 29ScreenshotAppletImpl::~ScreenshotAppletImpl()
30{ 30{
31 delete screenshot; 31 delete screenshot;
32} 32}
33 33
34QWidget *ScreenshotAppletImpl::applet( QWidget *parent ) 34QWidget *ScreenshotAppletImpl::applet( QWidget *parent )
35{ 35{
36 if ( !screenshot ) 36 if ( !screenshot )
37 screenshot = new ScreenshotApplet( parent ); 37 screenshot = new ScreenshotApplet( parent );
38 return screenshot; 38 return screenshot;
39} 39}
40 40
41int ScreenshotAppletImpl::position() const 41int ScreenshotAppletImpl::position() const
42{ 42{
43 return 6; 43 return 6;
44} 44}
45 45
46QRESULT ScreenshotAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 46QRESULT ScreenshotAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
47{ 47{
48 *iface = 0; 48 *iface = 0;
49 if ( uuid == IID_QUnknown ) 49 if ( uuid == IID_QUnknown )
50 *iface = this; 50 *iface = this;
51 else if ( uuid == IID_TaskbarApplet ) 51 else if ( uuid == IID_TaskbarApplet )
52 *iface = this; 52 *iface = this;
53 53 else
54 return QS_FALSE;
55
54 if ( *iface ) 56 if ( *iface )
55 (*iface)->addRef(); 57 (*iface)->addRef();
56 return QS_OK; 58 return QS_OK;
57} 59}
58 60
59Q_EXPORT_INTERFACE() 61Q_EXPORT_INTERFACE()
60{ 62{
61 Q_CREATE_INSTANCE( ScreenshotAppletImpl ) 63 Q_CREATE_INSTANCE( ScreenshotAppletImpl )
62} 64}
63 65
64 66
diff --git a/core/applets/suspendapplet/suspend.cpp b/core/applets/suspendapplet/suspend.cpp
index 4bdc8fb..63f16b8 100644
--- a/core/applets/suspendapplet/suspend.cpp
+++ b/core/applets/suspendapplet/suspend.cpp
@@ -50,36 +50,38 @@ QIconSet SuspendApplet::icon ( ) const
50 if ( !img. isNull ( )) 50 if ( !img. isNull ( ))
51 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 51 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
52 return pix; 52 return pix;
53} 53}
54 54
55QPopupMenu *SuspendApplet::popup ( QWidget * ) const 55QPopupMenu *SuspendApplet::popup ( QWidget * ) const
56{ 56{
57 return 0; 57 return 0;
58} 58}
59 59
60void SuspendApplet::activated ( ) 60void SuspendApplet::activated ( )
61{ 61{
62 // suspend 62 // suspend
63 QCopEnvelope ( "QPE/System", "suspend()" ); 63 QCopEnvelope ( "QPE/System", "suspend()" );
64} 64}
65 65
66 66
67QRESULT SuspendApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 67QRESULT SuspendApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
68{ 68{
69 *iface = 0; 69 *iface = 0;
70 if ( uuid == IID_QUnknown ) 70 if ( uuid == IID_QUnknown )
71 *iface = this; 71 *iface = this;
72 else if ( uuid == IID_MenuApplet ) 72 else if ( uuid == IID_MenuApplet )
73 *iface = this; 73 *iface = this;
74 else
75 return QS_FALSE;
74 76
75 if ( *iface ) 77 if ( *iface )
76 (*iface)-> addRef ( ); 78 (*iface)-> addRef ( );
77 return QS_OK; 79 return QS_OK;
78} 80}
79 81
80Q_EXPORT_INTERFACE( ) 82Q_EXPORT_INTERFACE( )
81{ 83{
82 Q_CREATE_INSTANCE( SuspendApplet ) 84 Q_CREATE_INSTANCE( SuspendApplet )
83} 85}
84 86
85 87
diff --git a/core/applets/vmemo/vmemoimpl.cpp b/core/applets/vmemo/vmemoimpl.cpp
index ef4a3a6..71d47e5 100644
--- a/core/applets/vmemo/vmemoimpl.cpp
+++ b/core/applets/vmemo/vmemoimpl.cpp
@@ -26,34 +26,36 @@ VMemoAppletImpl::VMemoAppletImpl()
26VMemoAppletImpl::~VMemoAppletImpl() 26VMemoAppletImpl::~VMemoAppletImpl()
27{ 27{
28 delete vmemo; 28 delete vmemo;
29} 29}
30 30
31QWidget *VMemoAppletImpl::applet( QWidget *parent ) 31QWidget *VMemoAppletImpl::applet( QWidget *parent )
32{ 32{
33 if ( !vmemo ) 33 if ( !vmemo )
34 vmemo = new VMemo( parent ); 34 vmemo = new VMemo( parent );
35 return vmemo; 35 return vmemo;
36} 36}
37 37
38int VMemoAppletImpl::position() const 38int VMemoAppletImpl::position() const
39{ 39{
40 return 6; 40 return 6;
41} 41}
42 42
43QRESULT VMemoAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 43QRESULT VMemoAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
44{ 44{
45 *iface = 0; 45 *iface = 0;
46 if ( uuid == IID_QUnknown ) 46 if ( uuid == IID_QUnknown )
47 *iface = this; 47 *iface = this;
48 else if ( uuid == IID_TaskbarApplet ) 48 else if ( uuid == IID_TaskbarApplet )
49 *iface = this; 49 *iface = this;
50 else
51 return QS_FALSE;
50 52
51 if ( *iface ) 53 if ( *iface )
52 (*iface)->addRef(); 54 (*iface)->addRef();
53 return QS_OK; 55 return QS_OK;
54} 56}
55 57
56Q_EXPORT_INTERFACE() 58Q_EXPORT_INTERFACE()
57{ 59{
58 Q_CREATE_INSTANCE( VMemoAppletImpl ) 60 Q_CREATE_INSTANCE( VMemoAppletImpl )
59 } 61 }
diff --git a/core/applets/volumeapplet/volumeappletimpl.cpp b/core/applets/volumeapplet/volumeappletimpl.cpp
index 47506cc..80b3e74 100644
--- a/core/applets/volumeapplet/volumeappletimpl.cpp
+++ b/core/applets/volumeapplet/volumeappletimpl.cpp
@@ -30,36 +30,38 @@ VolumeAppletImpl::VolumeAppletImpl()
30VolumeAppletImpl::~VolumeAppletImpl() 30VolumeAppletImpl::~VolumeAppletImpl()
31{ 31{
32 delete volume; 32 delete volume;
33} 33}
34 34
35QWidget *VolumeAppletImpl::applet( QWidget *parent ) 35QWidget *VolumeAppletImpl::applet( QWidget *parent )
36{ 36{
37 if ( !volume ) 37 if ( !volume )
38 volume = new VolumeApplet( parent ); 38 volume = new VolumeApplet( parent );
39 return volume; 39 return volume;
40} 40}
41 41
42int VolumeAppletImpl::position() const 42int VolumeAppletImpl::position() const
43{ 43{
44 return 6; 44 return 6;
45} 45}
46 46
47QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 47QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
48{ 48{
49 *iface = 0; 49 *iface = 0;
50 if ( uuid == IID_QUnknown ) 50 if ( uuid == IID_QUnknown )
51 *iface = this; 51 *iface = this;
52 else if ( uuid == IID_TaskbarApplet ) 52 else if ( uuid == IID_TaskbarApplet )
53 *iface = this; 53 *iface = this;
54 else
55 return QS_FALSE;
54 56
55 if ( *iface ) 57 if ( *iface )
56 (*iface)->addRef(); 58 (*iface)->addRef();
57 return QS_OK; 59 return QS_OK;
58} 60}
59 61
60Q_EXPORT_INTERFACE() 62Q_EXPORT_INTERFACE()
61{ 63{
62 Q_CREATE_INSTANCE( VolumeAppletImpl ) 64 Q_CREATE_INSTANCE( VolumeAppletImpl )
63} 65}
64 66
65 67
diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp
index 4cc2d60..cdd3c97 100644
--- a/core/applets/vtapplet/vt.cpp
+++ b/core/applets/vtapplet/vt.cpp
@@ -127,36 +127,38 @@ void VTApplet::updateMenu()
127 else 127 else
128 qDebug( "VT %d _not_ disallocated == busy", i ); 128 qDebug( "VT %d _not_ disallocated == busy", i );
129 */ 129 */
130 130
131 submenu->setItemEnabled( 500+i, result == -1 ); 131 submenu->setItemEnabled( 500+i, result == -1 );
132 } 132 }
133 133
134 ::close( fd ); 134 ::close( fd );
135} 135}
136 136
137 137
138void VTApplet::activated() 138void VTApplet::activated()
139{ 139{
140 qDebug( "VTApplet::activated()" ); 140 qDebug( "VTApplet::activated()" );
141} 141}
142 142
143 143
144QRESULT VTApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface ) 144QRESULT VTApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface )
145{ 145{
146 *iface = 0; 146 *iface = 0;
147 if ( uuid == IID_QUnknown ) 147 if ( uuid == IID_QUnknown )
148 *iface = this; 148 *iface = this;
149 else if ( uuid == IID_MenuApplet ) 149 else if ( uuid == IID_MenuApplet )
150 *iface = this; 150 *iface = this;
151 else
152 return QS_FALSE;
151 153
152 if ( *iface ) 154 if ( *iface )
153 (*iface)-> addRef ( ); 155 (*iface)-> addRef ( );
154 return QS_OK; 156 return QS_OK;
155} 157}
156 158
157Q_EXPORT_INTERFACE( ) 159Q_EXPORT_INTERFACE( )
158{ 160{
159 Q_CREATE_INSTANCE( VTApplet ) 161 Q_CREATE_INSTANCE( VTApplet )
160} 162}
161 163
162 164