summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp40
1 files changed, 9 insertions, 31 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 5295600..408d3dd 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -26,31 +26,11 @@
26#include "tabwidget.h" 26#include "tabwidget.h"
27#include "transferdialog.h" 27#include "transferdialog.h"
28#include "function_keyboard.h" 28#include "function_keyboard.h"
29#include "emulation_handler.h"
29#include "script.h" 30#include "script.h"
30 31
31 32
32 33
33static char * menu_xpm[] = {
34"12 12 5 1",
35 " c None",
36 ".c #000000",
37 "+c #FFFDAD",
38 "@c #FFFF00",
39 "#c #E5E100",
40" ",
41" ",
42" ......... ",
43" .+++++++. ",
44" .+@@@@#. ",
45" .+@@@#. ",
46" .+@@#. ",
47" .+@#. ",
48" .+#. ",
49" .+. ",
50" .. ",
51" "};
52
53
54MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { 34MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
55 KeyTrans::loadAll(); 35 KeyTrans::loadAll();
56 for (int i = 0; i < KeyTrans::count(); i++ ) { 36 for (int i = 0; i < KeyTrans::count(); i++ ) {
@@ -462,25 +442,23 @@ void MainWindow::slotFullscreen() {
462 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 442 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken );
463 setCentralWidget( m_consoleWindow ); 443 setCentralWidget( m_consoleWindow );
464 ( m_curSession->widgetStack() )->show(); 444 ( m_curSession->widgetStack() )->show();
465 m_fullscreen->setText( tr("Full screen") ); 445 ( m_curSession->emulationHandler() )->cornerButton()->hide();
446 disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
466 447
467 } else { 448 } else {
468 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); 449 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
469 ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop 450 ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
470 , QPoint(0,0), false); 451 , QPoint(0,0), false );
471 ( m_curSession->widgetStack() )->resize(qApp->desktop()->width(), qApp->desktop()->height()); 452 ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() );
472 ( m_curSession->widgetStack() )->setFocus(); 453 ( m_curSession->widgetStack() )->setFocus();
473 ( m_curSession->widgetStack() )->show(); 454 ( m_curSession->widgetStack() )->show();
474 455
475 QPushButton *cornerButton = new QPushButton( m_curSession->widgetStack() ); 456 ( ( m_curSession->emulationHandler() )->cornerButton() )->show();
476 cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); 457
477 connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 458 connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
478 // would need a scrollview
479 // ( m_curSession->widgetStack() )->setCornerWidget( cornerButton );
480 m_fullscreen->setText( tr("Stop full screen") );
481 } 459 }
482 m_isFullscreen = !m_isFullscreen;
483 460
461 m_isFullscreen = !m_isFullscreen;
484} 462}
485 463
486 464