summaryrefslogtreecommitdiff
path: root/core/applets/vmemo/vmemo.cpp
Unidiff
Diffstat (limited to 'core/applets/vmemo/vmemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp4
1 files changed, 2 insertions, 2 deletions
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
@@ -168,98 +168,98 @@ static char * vmemo_xpm[] = {
168 " . c #65656A", 168 " . c #65656A",
169 ".. c #999AA2", 169 ".. c #999AA2",
170 "+. c #52535A", 170 "+. c #52535A",
171 "@. c #151B21", 171 "@. c #151B21",
172 "#. c #515257", 172 "#. c #515257",
173 "$. c #B5B5BE", 173 "$. c #B5B5BE",
174 "%. c #616167", 174 "%. c #616167",
175 "&. c #1A1D22", 175 "&. c #1A1D22",
176 "*. c #000713", 176 "*. c #000713",
177 "=. c #1F1F21", 177 "=. c #1F1F21",
178 " ", 178 " ",
179 " . + @ # ", 179 " . + @ # ",
180 " $ % & * = - ", 180 " $ % & * = - ",
181 " ; > , ' ) ! ~ ", 181 " ; > , ' ) ! ~ ",
182 " { ] ^ / ( _ : ", 182 " { ] ^ / ( _ : ",
183 " < [ } | 1 2 3 ", 183 " < [ } | 1 2 3 ",
184 " 4 5 6 7 8 9 0 a b c ", 184 " 4 5 6 7 8 9 0 a b c ",
185 " d e f g h i j 3 k l m n ", 185 " d e f g h i j 3 k l m n ",
186 " o p q r s t u v w n ", 186 " o p q r s t u v w n ",
187 " o x y z A B C D E n ", 187 " o x y z A B C D E n ",
188 " F G H I J K L M N O ", 188 " F G H I J K L M N O ",
189 " P Q R S T U V W X ", 189 " P Q R S T U V W X ",
190 " Y Z ` b ...+. ", 190 " Y Z ` b ...+. ",
191 " @.#.$.%.&. ", 191 " @.#.$.%.&. ",
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()
242{ 242{
243 return 6; 243 return 6;
244} 244}
245 245
246void VMemo::receive( const QCString &msg, const QByteArray &data ) { 246void VMemo::receive( const QCString &msg, const QByteArray &data ) {
247 qDebug("receive"); 247 qDebug("receive");
248 QDataStream stream( data, IO_ReadOnly ); 248 QDataStream stream( data, IO_ReadOnly );
249 249
250 if (msg == "toggleRecord()") { 250 if (msg == "toggleRecord()") {
251 if (recording) { 251 if (recording) {
252 fromToggle = TRUE; 252 fromToggle = TRUE;
253 stopRecording(); 253 stopRecording();
254 } else { 254 } else {
255 fromToggle = TRUE; 255 fromToggle = TRUE;
256 startRecording(); 256 startRecording();
257 } 257 }
258 } 258 }
259} 259}
260 260
261void VMemo::paintEvent( QPaintEvent* ) { 261void VMemo::paintEvent( QPaintEvent* ) {
262 QPainter p(this); 262 QPainter p(this);
263 p.drawPixmap( 0, 1,( const char** ) vmemo_xpm ); 263 p.drawPixmap( 0, 1,( const char** ) vmemo_xpm );
264} 264}
265 265