Diffstat (limited to 'core/applets/vtapplet/vt.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/vtapplet/vt.cpp | 65 |
1 files changed, 34 insertions, 31 deletions
diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp index bd39093..aec63c3 100644 --- a/core/applets/vtapplet/vt.cpp +++ b/core/applets/vtapplet/vt.cpp | |||
@@ -1,5 +1,3 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2003-2004 Michael 'Mickey' Lauer <mickey@Vanille.de> |
3 | ** | ||
4 | ** Contact me @ mickeyl@handhelds.org | ||
5 | ** | 3 | ** |
@@ -15,6 +13,13 @@ | |||
15 | 13 | ||
14 | #include "vt.h" | ||
15 | |||
16 | /* OPIE */ | ||
17 | #include <opie2/odebug.h> | ||
16 | #include <qpe/resource.h> | 18 | #include <qpe/resource.h> |
19 | using namespace Opie::Core; | ||
17 | 20 | ||
21 | /* QT */ | ||
18 | #include <qpopupmenu.h> | 22 | #include <qpopupmenu.h> |
19 | 23 | ||
24 | /* STD */ | ||
20 | #include <fcntl.h> | 25 | #include <fcntl.h> |
@@ -26,6 +31,4 @@ | |||
26 | 31 | ||
27 | #include "vt.h" | ||
28 | |||
29 | VTApplet::VTApplet ( ) | 32 | VTApplet::VTApplet ( ) |
30 | : QObject ( 0, "VTApplet" ) | 33 | : QObject ( 0, "VTApplet" ) |
31 | { | 34 | { |
@@ -44,3 +47,3 @@ QString VTApplet::name ( ) const | |||
44 | { | 47 | { |
45 | return tr( "VT shortcut" ); | 48 | return tr( "VT shortcut" ); |
46 | } | 49 | } |
@@ -49,3 +52,3 @@ QString VTApplet::text ( ) const | |||
49 | { | 52 | { |
50 | return tr( "Terminal" ); | 53 | return tr( "Terminal" ); |
51 | } | 54 | } |
@@ -66,8 +69,8 @@ QIconSet VTApplet::icon ( ) const | |||
66 | { | 69 | { |
67 | QPixmap pix; | 70 | QPixmap pix; |
68 | QImage img = Resource::loadImage ( "terminal" ); | 71 | QImage img = Resource::loadImage ( "terminal" ); |
69 | 72 | ||
70 | if ( !img. isNull ( )) | 73 | if ( !img. isNull ( )) |
71 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); | 74 | pix. convertFromImage ( img. smoothScale ( 14, 14 )); |
72 | return pix; | 75 | return pix; |
73 | } | 76 | } |
@@ -76,3 +79,3 @@ QPopupMenu *VTApplet::popup ( QWidget* parent ) const | |||
76 | { | 79 | { |
77 | qDebug( "VTApplet::popup" ); | 80 | odebug << "VTApplet::popup" << oendl; |
78 | 81 | ||
@@ -101,3 +104,3 @@ void VTApplet::changeVT( int index ) | |||
101 | { | 104 | { |
102 | //qDebug( "VTApplet::changeVT( %d )", index-500 ); | 105 | //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl; |
103 | 106 | ||
@@ -111,3 +114,3 @@ void VTApplet::updateMenu() | |||
111 | { | 114 | { |
112 | //qDebug( "VTApplet::updateMenu()" ); | 115 | //odebug << "VTApplet::updateMenu()" << oendl; |
113 | 116 | ||
@@ -122,5 +125,5 @@ void VTApplet::updateMenu() | |||
122 | if ( result == -1 ) | 125 | if ( result == -1 ) |
123 | qDebug( "VT %d disallocated == free", i ); | 126 | odebug << "VT " << i << " disallocated == free" << oendl; |
124 | else | 127 | else |
125 | qDebug( "VT %d _not_ disallocated == busy", i ); | 128 | odebug << "VT " << i << " _not_ disallocated == busy" << oendl; |
126 | */ | 129 | */ |
@@ -136,3 +139,3 @@ void VTApplet::activated() | |||
136 | { | 139 | { |
137 | qDebug( "VTApplet::activated()" ); | 140 | odebug << "VTApplet::activated()" << oendl; |
138 | } | 141 | } |
@@ -142,13 +145,13 @@ QRESULT VTApplet::queryInterface ( const QUuid &uuid, QUnknownInterface **iface | |||
142 | { | 145 | { |
143 | *iface = 0; | 146 | *iface = 0; |
144 | if ( uuid == IID_QUnknown ) | 147 | if ( uuid == IID_QUnknown ) |
145 | *iface = this; | 148 | *iface = this; |
146 | else if ( uuid == IID_MenuApplet ) | 149 | else if ( uuid == IID_MenuApplet ) |
147 | *iface = this; | 150 | *iface = this; |
148 | else | 151 | else |
149 | return QS_FALSE; | 152 | return QS_FALSE; |
150 | 153 | ||
151 | if ( *iface ) | 154 | if ( *iface ) |
152 | (*iface)-> addRef ( ); | 155 | (*iface)-> addRef ( ); |
153 | return QS_OK; | 156 | return QS_OK; |
154 | } | 157 | } |
@@ -157,3 +160,3 @@ Q_EXPORT_INTERFACE( ) | |||
157 | { | 160 | { |
158 | Q_CREATE_INSTANCE( VTApplet ) | 161 | Q_CREATE_INSTANCE( VTApplet ) |
159 | } | 162 | } |