author | hash <hash> | 2002-10-24 16:24:00 (UTC) |
---|---|---|
committer | hash <hash> | 2002-10-24 16:24:00 (UTC) |
commit | f8875264ece878f5bb7e8e528200f6ba437138c5 (patch) (unidiff) | |
tree | 343ef25aae76316e4931f15b63938388ff0d5dd8 /noncore/apps/opie-console/mainwindow.cpp | |
parent | 07811d76c261ece00a45589a2eb9d2bb8971943e (diff) | |
download | opie-f8875264ece878f5bb7e8e528200f6ba437138c5.zip opie-f8875264ece878f5bb7e8e528200f6ba437138c5.tar.gz opie-f8875264ece878f5bb7e8e528200f6ba437138c5.tar.bz2 |
got rid of those warnings
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 406586c..b177fa5 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -468,124 +468,124 @@ void MainWindow::slotTransfer() | |||
468 | } | 468 | } |
469 | } | 469 | } |
470 | 470 | ||
471 | 471 | ||
472 | void MainWindow::slotOpenKeb(bool state) { | 472 | void MainWindow::slotOpenKeb(bool state) { |
473 | 473 | ||
474 | if (state) m_keyBar->show(); | 474 | if (state) m_keyBar->show(); |
475 | else m_keyBar->hide(); | 475 | else m_keyBar->hide(); |
476 | 476 | ||
477 | } | 477 | } |
478 | 478 | ||
479 | 479 | ||
480 | void MainWindow::slotOpenButtons( bool state ) { | 480 | void MainWindow::slotOpenButtons( bool state ) { |
481 | 481 | ||
482 | if ( state ) { | 482 | if ( state ) { |
483 | m_buttonBar->show(); | 483 | m_buttonBar->show(); |
484 | } else { | 484 | } else { |
485 | m_buttonBar->hide(); | 485 | m_buttonBar->hide(); |
486 | } | 486 | } |
487 | } | 487 | } |
488 | 488 | ||
489 | 489 | ||
490 | 490 | ||
491 | void MainWindow::slotSessionChanged( Session* ses ) { | 491 | void MainWindow::slotSessionChanged( Session* ses ) { |
492 | qWarning("changed!"); | 492 | qWarning("changed!"); |
493 | if ( ses ) { | 493 | if ( ses ) { |
494 | m_curSession = ses; | 494 | m_curSession = ses; |
495 | qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); | 495 | qDebug(QString("is connected : %1").arg( m_curSession->layer()->isConnected() ) ); |
496 | if ( m_curSession->layer()->isConnected() ) { | 496 | if ( m_curSession->layer()->isConnected() ) { |
497 | m_connect->setEnabled( false ); | 497 | m_connect->setEnabled( false ); |
498 | m_disconnect->setEnabled( true ); | 498 | m_disconnect->setEnabled( true ); |
499 | m_recordScript->setEnabled( true ); | 499 | m_recordScript->setEnabled( true ); |
500 | m_saveScript->setEnabled( true ); | 500 | m_saveScript->setEnabled( true ); |
501 | m_runScript->setEnabled( true ); | 501 | m_runScript->setEnabled( true ); |
502 | } else { | 502 | } else { |
503 | m_connect->setEnabled( true ); | 503 | m_connect->setEnabled( true ); |
504 | m_disconnect->setEnabled( false ); | 504 | m_disconnect->setEnabled( false ); |
505 | m_recordScript->setEnabled( false ); | 505 | m_recordScript->setEnabled( false ); |
506 | m_saveScript->setEnabled( false ); | 506 | m_saveScript->setEnabled( false ); |
507 | m_runScript->setEnabled( false ); | 507 | m_runScript->setEnabled( false ); |
508 | } | 508 | } |
509 | 509 | ||
510 | if ( ( m_curSession->layer() )->supports()[1] == 0 ) { | 510 | if ( ( m_curSession->layer() )->supports()[1] == 0 ) { |
511 | m_transfer->setEnabled( false ); | 511 | m_transfer->setEnabled( false ); |
512 | } else { | 512 | } else { |
513 | m_transfer->setEnabled( true ); | 513 | m_transfer->setEnabled( true ); |
514 | } | 514 | } |
515 | 515 | ||
516 | 516 | ||
517 | 517 | ||
518 | 518 | ||
519 | 519 | ||
520 | QWidget *w = m_curSession->widget(); | 520 | QWidget *w = m_curSession->widget(); |
521 | if(w) w->setFocus(); | 521 | if(w) w->setFocus(); |
522 | } | 522 | } |
523 | } | 523 | } |
524 | 524 | ||
525 | void MainWindow::slotFullscreen() { | 525 | void MainWindow::slotFullscreen() { |
526 | 526 | ||
527 | 527 | ||
528 | 528 | ||
529 | if ( m_isFullscreen ) { | 529 | if ( m_isFullscreen ) { |
530 | ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true ); | 530 | ( m_curSession->widgetStack() )->reparent( savedParentFullscreen, 0, QPoint(0,0), true ); |
531 | ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() ); | 531 | ( m_curSession->widgetStack() )->resize( savedParentFullscreen->width(), savedParentFullscreen->height() ); |
532 | ( m_curSession->emulationHandler() )->cornerButton()->hide(); | 532 | ( m_curSession->emulationHandler() )->cornerButton()->hide(); |
533 | disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); | 533 | disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); |
534 | 534 | ||
535 | } else { | 535 | } else { |
536 | savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget(); | 536 | savedParentFullscreen = ( m_curSession->widgetStack() )->parentWidget(); |
537 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); | 537 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); |
538 | ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop | 538 | ( m_curSession->widgetStack() )->reparent( 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop |
539 | , QPoint(0,0), false ); | 539 | , QPoint(0,0), false ); |
540 | ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() ); | 540 | ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() ); |
541 | ( m_curSession->widgetStack() )->setFocus(); | 541 | ( m_curSession->widgetStack() )->setFocus(); |
542 | ( m_curSession->widgetStack() )->show(); | 542 | ( m_curSession->widgetStack() )->show(); |
543 | 543 | ||
544 | ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); | 544 | ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); |
545 | 545 | ||
546 | connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); | 546 | connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); |
547 | } | 547 | } |
548 | 548 | ||
549 | m_isFullscreen = !m_isFullscreen; | 549 | m_isFullscreen = !m_isFullscreen; |
550 | } | 550 | } |
551 | 551 | ||
552 | 552 | ||
553 | void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { | 553 | void MainWindow::slotKeyReceived(FKey k, ushort, ushort, bool pressed) { |
554 | 554 | ||
555 | if ( m_curSession ) { | 555 | if ( m_curSession ) { |
556 | 556 | ||
557 | QEvent::Type state; | 557 | QEvent::Type state; |
558 | 558 | ||
559 | if (pressed) state = QEvent::KeyPress; | 559 | if (pressed) state = QEvent::KeyPress; |
560 | else state = QEvent::KeyRelease; | 560 | else state = QEvent::KeyRelease; |
561 | 561 | ||
562 | QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode))); | 562 | QKeyEvent ke(state, k.qcode, k.unicode, 0, QString(QChar(k.unicode))); |
563 | 563 | ||
564 | // where should i send this event? doesnt work sending it here | 564 | // is this the best way to do this? cant figure out any other way to work |
565 | QApplication::sendEvent((QObject *)m_curSession->widget(), &ke); | 565 | QApplication::sendEvent((QObject *)m_curSession->widget(), &ke); |
566 | ke.ignore(); | 566 | ke.ignore(); |
567 | } | 567 | } |
568 | } | 568 | } |
569 | void MainWindow::slotCopy() { | 569 | void MainWindow::slotCopy() { |
570 | if (!currentSession() ) return; | 570 | if (!currentSession() ) return; |
571 | currentSession()->emulationHandler()->copy(); | 571 | currentSession()->emulationHandler()->copy(); |
572 | } | 572 | } |
573 | void MainWindow::slotPaste() { | 573 | void MainWindow::slotPaste() { |
574 | if (!currentSession() ) return; | 574 | if (!currentSession() ) return; |
575 | currentSession()->emulationHandler()->paste(); | 575 | currentSession()->emulationHandler()->paste(); |
576 | } | 576 | } |
577 | 577 | ||
578 | /* | 578 | /* |
579 | * Save the session | 579 | * Save the session |
580 | */ | 580 | */ |
581 | 581 | ||
582 | void MainWindow::slotSaveSession() { | 582 | void MainWindow::slotSaveSession() { |
583 | if (!currentSession() ) { | 583 | if (!currentSession() ) { |
584 | QMessageBox::information(this, tr("Save Connection"), | 584 | QMessageBox::information(this, tr("Save Connection"), |
585 | tr("<qt>There is no Connection.</qt>"), 1 ); | 585 | tr("<qt>There is no Connection.</qt>"), 1 ); |
586 | return; | 586 | return; |
587 | } | 587 | } |
588 | manager()->add( currentSession()->profile() ); | 588 | manager()->add( currentSession()->profile() ); |
589 | manager()->save(); | 589 | manager()->save(); |
590 | populateProfiles(); | 590 | populateProfiles(); |
591 | } | 591 | } |