summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/function_keyboard.cpp43
-rw-r--r--noncore/apps/opie-console/function_keyboard.h7
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp6
3 files changed, 48 insertions, 8 deletions
diff --git a/noncore/apps/opie-console/function_keyboard.cpp b/noncore/apps/opie-console/function_keyboard.cpp
index 3da8d61..ce65052 100644
--- a/noncore/apps/opie-console/function_keyboard.cpp
+++ b/noncore/apps/opie-console/function_keyboard.cpp
@@ -34,56 +34,92 @@ FunctionKeyboard::FunctionKeyboard(QWidget *parent) :
34 QString handle = "r" + QString::number(r) + "c" + QString::number(c); 34 QString handle = "r" + QString::number(r) + "c" + QString::number(c);
35 QStringList value_list = conf.readListEntry( handle, '|'); 35 QStringList value_list = conf.readListEntry( handle, '|');
36 36
37 if (value_list.isEmpty()) continue; 37 if (value_list.isEmpty()) continue;
38 38
39 keys.insert( 39 keys.insert(
40 40
41 handle, 41 handle,
42 FKey (value_list[0], value_list[1], value_list[2].toUShort(), value_list[3].toUShort()) 42 FKey (value_list[0], value_list[1], value_list[2].toUShort(), value_list[3].toUShort())
43 ); 43 );
44 } 44 }
45 //qWarning("loaded %d keys", keys.count()); 45 //qWarning("loaded %d keys", keys.count());
46 */ 46 */
47 if (keys.isEmpty()) loadDefaults(); 47 if (keys.isEmpty()) loadDefaults();
48 48
49 49
50 50
51} 51}
52 52
53FunctionKeyboard::~FunctionKeyboard() {} 53FunctionKeyboard::~FunctionKeyboard() {}
54 54
55void FunctionKeyboard::changeRows(int r) { 55void FunctionKeyboard::changeRows(int r) {
56 56
57 numRows = r; 57 numRows = r;
58 repaint(false); 58
59 // have to do this so the whole thing gets redrawn
60 hide(); show();
59} 61}
60void FunctionKeyboard::changeCols(int c) { 62void FunctionKeyboard::changeCols(int c) {
61 63
62 numCols = c; 64 numCols = c;
63 keyWidth = (double)width()/numCols; // have to reset this thing too 65 keyWidth = (double)width()/numCols; // have to reset this thing too
64 repaint(false); 66 repaint(false);
65} 67}
68void FunctionKeyboard::load (const Profile& prof) {
69
70 keys.clear();
71
72 numRows = prof.readNumEntry("keb_rows", 2);
73 numCols = prof.readNumEntry("keb_cols", 10);
74 keyWidth = (double)width()/numCols; // have to reset this thing too
75
76 /* load all the keys to the keyboard */
77 for (ushort i = 0; i <= numRows - 1; i++)
78 for (ushort j = 0; j <= numCols - 1; j++) {
79
80 QString h = "r" + QString::number(i) + "c" + QString::number(j);
81 QString values = prof.readEntry("keb_" + h);
82
83 if (!values.isEmpty()) {
84
85 QStringList l = QStringList::split(QChar('|'), values, TRUE);
86 keys[h] = FKey(l[0], l[1], l[2].toInt(), l[3].toInt());
87
88 // load pixmap if used
89 if (!l[1].isEmpty()) {
90
91 keys[h].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + l[1] ) );
92 }
93 }
94 }
95
96 if (keys.isEmpty()) loadDefaults();
97
98 hide();
99 show();
100
101}
66 102
67void FunctionKeyboard::paintEvent(QPaintEvent *e) { 103void FunctionKeyboard::paintEvent(QPaintEvent *e) {
68 104
69 QPainter p(this); 105 QPainter p(this);
70 p.setClipRect(e->rect()); 106 p.setClipRect(e->rect());
71 p.fillRect(0, 0, width(), height(), QColor(255,255,255)); 107 p.fillRect(0, 0, width(), height(), QColor(255,255,255));
72 108
73 p.setPen(QColor(0,0,0)); 109 p.setPen(QColor(0,0,0));
74 110
75 /* those decimals do count! becomes short if use plain int */ 111 /* those decimals do count! becomes short if use plain int */
76 for (double i = 0; i <= width(); i += keyWidth) { 112 for (double i = 0; i <= width(); i += keyWidth) {
77 113
78 p.drawLine((int)i, 0, (int)i, height()); 114 p.drawLine((int)i, 0, (int)i, height());
79 } 115 }
80 116
81 // sometimes the last line doesnt get drawn 117 // sometimes the last line doesnt get drawn
82 p.drawLine(width() -1, 0, width() -1, height()); 118 p.drawLine(width() -1, 0, width() -1, height());
83 119
84 for (int i = 0; i <= height(); i += keyHeight) { 120 for (int i = 0; i <= height(); i += keyHeight) {
85 121
86 p.drawLine(0, i, width(), i); 122 p.drawLine(0, i, width(), i);
87 } 123 }
88 124
89 for (uint r = 0; r < numRows; r++) { 125 for (uint r = 0; r < numRows; r++) {
@@ -252,97 +288,98 @@ FunctionKeyboardConfig::FunctionKeyboardConfig(const QString& name, QWidget* par
252 l = new QLabel("Q Keycode", editKey); 288 l = new QLabel("Q Keycode", editKey);
253 m_qvalues = new QComboBox(true, editKey); 289 m_qvalues = new QComboBox(true, editKey);
254 m_qvalues->setInsertionPolicy(QComboBox::AtTop); 290 m_qvalues->setInsertionPolicy(QComboBox::AtTop);
255 m_qvalues->setDuplicatesEnabled(false); 291 m_qvalues->setDuplicatesEnabled(false);
256 m_qvalues->insertItem(""); 292 m_qvalues->insertItem("");
257 connect (m_qvalues, SIGNAL(textChanged(const QString &)), this, SLOT(slotChangeQCode(const QString&))); 293 connect (m_qvalues, SIGNAL(textChanged(const QString &)), this, SLOT(slotChangeQCode(const QString&)));
258 294
259 l = new QLabel("Unicode Value", editKey); 295 l = new QLabel("Unicode Value", editKey);
260 m_uniValues = new QComboBox(true, editKey); 296 m_uniValues = new QComboBox(true, editKey);
261 m_uniValues->setInsertionPolicy(QComboBox::AtTop); 297 m_uniValues->setInsertionPolicy(QComboBox::AtTop);
262 m_uniValues->setDuplicatesEnabled(false); 298 m_uniValues->setDuplicatesEnabled(false);
263 m_uniValues->insertItem(""); 299 m_uniValues->insertItem("");
264 connect (m_uniValues, SIGNAL(textChanged(const QString &)), this, SLOT(slotChangeUnicode(const QString&))); 300 connect (m_uniValues, SIGNAL(textChanged(const QString &)), this, SLOT(slotChangeUnicode(const QString&)));
265 301
266 QVBoxLayout *root = new QVBoxLayout(this, 2); 302 QVBoxLayout *root = new QVBoxLayout(this, 2);
267 root->addWidget(kb); 303 root->addWidget(kb);
268 root->addWidget(dimentions); 304 root->addWidget(dimentions);
269 root->addWidget(editKey); 305 root->addWidget(editKey);
270} 306}
271FunctionKeyboardConfig::~FunctionKeyboardConfig() { 307FunctionKeyboardConfig::~FunctionKeyboardConfig() {
272 308
273} 309}
274void FunctionKeyboardConfig::load (const Profile& prof) { 310void FunctionKeyboardConfig::load (const Profile& prof) {
275 311
312 kb->keys.clear();
313 kb->loadDefaults();
314
276 m_rowBox->setValue(prof.readNumEntry("keb_rows", 2)); 315 m_rowBox->setValue(prof.readNumEntry("keb_rows", 2));
277 m_colBox->setValue(prof.readNumEntry("keb_cols", 10)); 316 m_colBox->setValue(prof.readNumEntry("keb_cols", 10));
278 317
279 /* load all the keys to the keyboard */ 318 /* load all the keys to the keyboard */
280 for (int i = 0; i <= m_rowBox->value() -1; i++) 319 for (int i = 0; i <= m_rowBox->value() -1; i++)
281 for (int j = 0; j <= m_colBox->value() -1; j++) { 320 for (int j = 0; j <= m_colBox->value() -1; j++) {
282 321
283 QString h = "r" + QString::number(i) + "c" + QString::number(j); 322 QString h = "r" + QString::number(i) + "c" + QString::number(j);
284 QString values = prof.readEntry("keb_" + h); 323 QString values = prof.readEntry("keb_" + h);
285 324
286 if (!values.isEmpty()) { 325 if (!values.isEmpty()) {
287 326
288 QStringList l = QStringList::split(QChar('|'), values, TRUE); 327 QStringList l = QStringList::split(QChar('|'), values, TRUE);
289 kb->keys[h] = FKey(l[0], l[1], l[2].toInt(), l[3].toInt()); 328 kb->keys[h] = FKey(l[0], l[1], l[2].toInt(), l[3].toInt());
290 329
291 // load pixmap if used 330 // load pixmap if used
292 if (!l[1].isEmpty()) { 331 if (!l[1].isEmpty()) {
293 332
294 kb->keys[h].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + l[1] ) ); 333 kb->keys[h].pix = new QPixmap( Resource::loadPixmap( "console/keys/" + l[1] ) );
295 } 334 }
296 } 335 }
297 } 336 }
298 337
299} 338}
300void FunctionKeyboardConfig::save (Profile& prof) { 339void FunctionKeyboardConfig::save (Profile& prof) {
301 340
302 prof.writeEntry("keb_rows", m_rowBox->value()); 341 prof.writeEntry("keb_rows", m_rowBox->value());
303 prof.writeEntry("keb_cols", m_colBox->value()); 342 prof.writeEntry("keb_cols", m_colBox->value());
304 343
305 QMap<QString, FKey>::Iterator it; 344 QMap<QString, FKey>::Iterator it;
306 for ( it = kb->keys.begin(); it != kb->keys.end(); it++) { 345 for ( it = kb->keys.begin(); it != kb->keys.end(); it++) {
307 346
308 FKey k = it.data(); 347 FKey k = it.data();
309 QString entry = k.label + "|" 348 QString entry = k.label + "|"
310 + k.pixFile + "|" 349 + k.pixFile + "|"
311 + QString::number(k.qcode) + "|" 350 + QString::number(k.qcode) + "|"
312 + QString::number(k.unicode); 351 + QString::number(k.unicode);
313 352
314 prof.writeEntry("keb_" + it.key(), entry); 353 prof.writeEntry("keb_" + it.key(), entry);
315 354
316 } 355 }
317 356
318} 357}
319void FunctionKeyboardConfig::slotChangeRows(int r) { 358void FunctionKeyboardConfig::slotChangeRows(int r) {
320 359
321 kb->changeRows(r); 360 kb->changeRows(r);
322 361
323 // have to do this so the whole thing gets redrawn
324 kb->hide(); kb->show();
325} 362}
326void FunctionKeyboardConfig::slotChangeCols(int c) { 363void FunctionKeyboardConfig::slotChangeCols(int c) {
327 364
328 kb->changeCols(c); 365 kb->changeCols(c);
329} 366}
330void FunctionKeyboardConfig::slotKeyPressed(FKey k, ushort r, ushort c, bool pressed) { 367void FunctionKeyboardConfig::slotKeyPressed(FKey k, ushort r, ushort c, bool pressed) {
331 368
332 if (!pressed) return; 369 if (!pressed) return;
333 370
334 selectedHandle = "r" + QString::number(r) + 371 selectedHandle = "r" + QString::number(r) +
335 "c" + QString::number(c); 372 "c" + QString::number(c);
336 selectedRow = r; 373 selectedRow = r;
337 selectedCol = c; 374 selectedCol = c;
338 375
339 if (k.pixFile.isEmpty()) { 376 if (k.pixFile.isEmpty()) {
340 377
341 m_labels->setEditable(true); 378 m_labels->setEditable(true);
342 m_labels->setCurrentItem(0); 379 m_labels->setCurrentItem(0);
343 m_labels->changeItem(k.label, 0); 380 m_labels->changeItem(k.label, 0);
344 381
345 } else { 382 } else {
346 383
347 // any better way to select the pixmap? 384 // any better way to select the pixmap?
348 m_labels->setCurrentItem((m_labels->listBox())->index((m_labels->listBox())->findItem(kb->keys[selectedHandle].pixFile))); 385 m_labels->setCurrentItem((m_labels->listBox())->index((m_labels->listBox())->findItem(kb->keys[selectedHandle].pixFile)));
diff --git a/noncore/apps/opie-console/function_keyboard.h b/noncore/apps/opie-console/function_keyboard.h
index 80d9f29..a60ff4b 100644
--- a/noncore/apps/opie-console/function_keyboard.h
+++ b/noncore/apps/opie-console/function_keyboard.h
@@ -24,65 +24,62 @@ struct FKey {
24 24
25 pix = new QPixmap ( Resource::loadPixmap("console/keys/" + f ) ); 25 pix = new QPixmap ( Resource::loadPixmap("console/keys/" + f ) );
26 } 26 }
27 }; 27 };
28 28
29 QString label; 29 QString label;
30 QPixmap *pix; 30 QPixmap *pix;
31 QString pixFile; 31 QString pixFile;
32 ushort qcode; 32 ushort qcode;
33 ushort unicode; 33 ushort unicode;
34}; 34};
35 35
36class FunctionKeyboard : public QFrame { 36class FunctionKeyboard : public QFrame {
37 Q_OBJECT 37 Q_OBJECT
38 38
39public: 39public:
40 FunctionKeyboard(QWidget *parent = 0); 40 FunctionKeyboard(QWidget *parent = 0);
41 ~FunctionKeyboard(); 41 ~FunctionKeyboard();
42 42
43 friend class FunctionKeyboardConfig; 43 friend class FunctionKeyboardConfig;
44 44
45 void changeRows(int); 45 void changeRows(int);
46 void changeCols(int); 46 void changeCols(int);
47 47
48 //Key getKey(int, int); 48 void load(const Profile &);
49 void loadDefaults();
49 50
50 void paintEvent(QPaintEvent *); 51 void paintEvent(QPaintEvent *);
51 void paintKey(uint, uint); 52 void paintKey(uint, uint);
52 void mousePressEvent(QMouseEvent*); 53 void mousePressEvent(QMouseEvent*);
53 void mouseReleaseEvent(QMouseEvent*); 54 void mouseReleaseEvent(QMouseEvent*);
54 void resizeEvent(QResizeEvent*); 55 void resizeEvent(QResizeEvent*);
55 QSize sizeHint() const; 56 QSize sizeHint() const;
56 57
57signals: 58signals:
58 59
59 void keyPressed(FKey, ushort, ushort, bool); 60 void keyPressed(FKey, ushort, ushort, bool);
60 61
61private:
62
63 void loadDefaults();
64
65 62
66private: 63private:
67 64
68 // thie key for the map is the row/col 65 // thie key for the map is the row/col
69 QMap<QString, FKey> keys; 66 QMap<QString, FKey> keys;
70 67
71 uint numRows; 68 uint numRows;
72 int test; 69 int test;
73 uint numCols; 70 uint numCols;
74 uint keyHeight; 71 uint keyHeight;
75 double keyWidth; // decimal point matters! 72 double keyWidth; // decimal point matters!
76 73
77 int pressedRow, pressedCol; 74 int pressedRow, pressedCol;
78 75
79 QObject *parent; 76 QObject *parent;
80 77
81}; 78};
82 79
83class FunctionKeyboardConfig : public ProfileDialogKeyWidget { 80class FunctionKeyboardConfig : public ProfileDialogKeyWidget {
84 81
85 Q_OBJECT 82 Q_OBJECT
86 83
87public: 84public:
88 FunctionKeyboardConfig(const QString& name, QWidget *wid, const char* name = 0l ); 85 FunctionKeyboardConfig(const QString& name, QWidget *wid, const char* name = 0l );
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index b177fa5..745efaf 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -386,48 +386,50 @@ void MainWindow::slotConfigure() {
386void MainWindow::slotClose() { 386void MainWindow::slotClose() {
387 if (!currentSession() ) 387 if (!currentSession() )
388 return; 388 return;
389 389
390 Session* ses = currentSession(); 390 Session* ses = currentSession();
391 qWarning("removing! currentSession %s", currentSession()->name().latin1() ); 391 qWarning("removing! currentSession %s", currentSession()->name().latin1() );
392 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */ 392 /* set to NULL to be safe, if its needed slotSessionChanged resets it automatically */
393 m_curSession = NULL; 393 m_curSession = NULL;
394 tabWidget()->remove( /*currentSession()*/ses ); 394 tabWidget()->remove( /*currentSession()*/ses );
395 /*it's autodelete */ 395 /*it's autodelete */
396 m_sessions.remove( ses ); 396 m_sessions.remove( ses );
397 qWarning("after remove!!"); 397 qWarning("after remove!!");
398 398
399 if (!currentSession() ) { 399 if (!currentSession() ) {
400 m_connect->setEnabled( false ); 400 m_connect->setEnabled( false );
401 m_disconnect->setEnabled( false ); 401 m_disconnect->setEnabled( false );
402 m_terminate->setEnabled( false ); 402 m_terminate->setEnabled( false );
403 m_transfer->setEnabled( false ); 403 m_transfer->setEnabled( false );
404 m_recordScript->setEnabled( false ); 404 m_recordScript->setEnabled( false );
405 m_saveScript->setEnabled( false ); 405 m_saveScript->setEnabled( false );
406 m_runScript->setEnabled( false ); 406 m_runScript->setEnabled( false );
407 m_fullscreen->setEnabled( false ); 407 m_fullscreen->setEnabled( false );
408 m_closewindow->setEnabled( false ); 408 m_closewindow->setEnabled( false );
409 } 409 }
410
411 m_kb->loadDefaults();
410} 412}
411 413
412/* 414/*
413 * We will get the name 415 * We will get the name
414 * Then the profile 416 * Then the profile
415 * and then we will make a profile 417 * and then we will make a profile
416 */ 418 */
417void MainWindow::slotProfile( int id) { 419void MainWindow::slotProfile( int id) {
418 Profile prof = manager()->profile( m_sessionsPop->text( id) ); 420 Profile prof = manager()->profile( m_sessionsPop->text( id) );
419 create( prof ); 421 create( prof );
420} 422}
421void MainWindow::create( const Profile& prof ) { 423void MainWindow::create( const Profile& prof ) {
422 Session *ses = manager()->fromProfile( prof, tabWidget() ); 424 Session *ses = manager()->fromProfile( prof, tabWidget() );
423 425
424 if((!ses) || (!ses->layer()) || (!ses->widgetStack())) 426 if((!ses) || (!ses->layer()) || (!ses->widgetStack()))
425 { 427 {
426 QMessageBox::warning(this, 428 QMessageBox::warning(this,
427 QObject::tr("Session failed"), 429 QObject::tr("Session failed"),
428 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>")); 430 QObject::tr("<qt>Cannot open session: Not all components were found.</qt>"));
429 //if(ses) delete ses; 431 //if(ses) delete ses;
430 return; 432 return;
431 } 433 }
432 434
433 m_sessions.append( ses ); 435 m_sessions.append( ses );
@@ -435,48 +437,50 @@ void MainWindow::create( const Profile& prof ) {
435 tabWidget()->repaint(); 437 tabWidget()->repaint();
436 m_curSession = ses; 438 m_curSession = ses;
437 439
438 // dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it 440 // dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it
439 m_connect->setEnabled( true ); 441 m_connect->setEnabled( true );
440 m_disconnect->setEnabled( false ); 442 m_disconnect->setEnabled( false );
441 m_terminate->setEnabled( true ); 443 m_terminate->setEnabled( true );
442 m_fullscreen->setEnabled( true ); 444 m_fullscreen->setEnabled( true );
443 m_closewindow->setEnabled( true ); 445 m_closewindow->setEnabled( true );
444 m_transfer->setEnabled( false ); 446 m_transfer->setEnabled( false );
445 m_recordScript->setEnabled( false ); 447 m_recordScript->setEnabled( false );
446 m_saveScript->setEnabled( false ); 448 m_saveScript->setEnabled( false );
447 m_runScript->setEnabled( false ); 449 m_runScript->setEnabled( false );
448 450
449 // is io_layer wants direct connection, then autoconnect 451 // is io_layer wants direct connection, then autoconnect
450 //if ( ( m_curSession->layer() )->supports()[0] == 1 ) { 452 //if ( ( m_curSession->layer() )->supports()[0] == 1 ) {
451 if (prof.autoConnect()) { 453 if (prof.autoConnect()) {
452 slotConnect(); 454 slotConnect();
453 } 455 }
454 456
455 457
456 458
457 QWidget *w = currentSession()->widget(); 459 QWidget *w = currentSession()->widget();
458 if(w) w->setFocus(); 460 if(w) w->setFocus();
461
462 m_kb->load(currentSession()->profile());
459} 463}
460 464
461void MainWindow::slotTransfer() 465void MainWindow::slotTransfer()
462{ 466{
463 if ( currentSession() ) { 467 if ( currentSession() ) {
464 TransferDialog dlg(currentSession()->widgetStack(), this); 468 TransferDialog dlg(currentSession()->widgetStack(), this);
465 dlg.showMaximized(); 469 dlg.showMaximized();
466 //currentSession()->widgetStack()->add(dlg); 470 //currentSession()->widgetStack()->add(dlg);
467 dlg.exec(); 471 dlg.exec();
468 } 472 }
469} 473}
470 474
471 475
472void MainWindow::slotOpenKeb(bool state) { 476void MainWindow::slotOpenKeb(bool state) {
473 477
474 if (state) m_keyBar->show(); 478 if (state) m_keyBar->show();
475 else m_keyBar->hide(); 479 else m_keyBar->hide();
476 480
477} 481}
478 482
479 483
480void MainWindow::slotOpenButtons( bool state ) { 484void MainWindow::slotOpenButtons( bool state ) {
481 485
482 if ( state ) { 486 if ( state ) {
@@ -498,48 +502,50 @@ void MainWindow::slotSessionChanged( Session* ses ) {
498 m_disconnect->setEnabled( true ); 502 m_disconnect->setEnabled( true );
499 m_recordScript->setEnabled( true ); 503 m_recordScript->setEnabled( true );
500 m_saveScript->setEnabled( true ); 504 m_saveScript->setEnabled( true );
501 m_runScript->setEnabled( true ); 505 m_runScript->setEnabled( true );
502 } else { 506 } else {
503 m_connect->setEnabled( true ); 507 m_connect->setEnabled( true );
504 m_disconnect->setEnabled( false ); 508 m_disconnect->setEnabled( false );
505 m_recordScript->setEnabled( false ); 509 m_recordScript->setEnabled( false );
506 m_saveScript->setEnabled( false ); 510 m_saveScript->setEnabled( false );
507 m_runScript->setEnabled( false ); 511 m_runScript->setEnabled( false );
508 } 512 }
509 513
510 if ( ( m_curSession->layer() )->supports()[1] == 0 ) { 514 if ( ( m_curSession->layer() )->supports()[1] == 0 ) {
511 m_transfer->setEnabled( false ); 515 m_transfer->setEnabled( false );
512 } else { 516 } else {
513 m_transfer->setEnabled( true ); 517 m_transfer->setEnabled( true );
514 } 518 }
515 519
516 520
517 521
518 522
519 523
520 QWidget *w = m_curSession->widget(); 524 QWidget *w = m_curSession->widget();
521 if(w) w->setFocus(); 525 if(w) w->setFocus();
526
527 m_kb->load(currentSession()->profile());
522 } 528 }
523} 529}
524 530
525void MainWindow::slotFullscreen() { 531void MainWindow::slotFullscreen() {
526 532
527 533
528 534
529 if ( m_isFullscreen ) { 535 if ( m_isFullscreen ) {
530 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true ); 536 ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true );
531 ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() ); 537 ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() );
532 ( m_curSession->emulationHandler() )->cornerButton()->hide(); 538 ( m_curSession->emulationHandler() )->cornerButton()->hide();
533 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 539 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
534 540
535 } else { 541 } else {
536 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget(); 542 savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget();
537 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); 543 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
538 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop 544 ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
539 , QPoint(0,0), false ); 545 , QPoint(0,0), false );
540 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() ); 546 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() );
541 ( m_curSession->widgetStack() )->setFocus(); 547 ( m_curSession->widgetStack() )->setFocus();
542 ( m_curSession->widgetStack() )->show(); 548 ( m_curSession->widgetStack() )->show();
543 549
544 ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); 550 ( ( m_curSession->emulationHandler() )->cornerButton() )->show();
545 551