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.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 9ccefa0..5295600 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -1,23 +1,24 @@
1#include <assert.h> 1#include <assert.h>
2 2
3 3
4 4
5#include <qaction.h> 5#include <qaction.h>
6#include <qmenubar.h> 6#include <qmenubar.h>
7#include <qlabel.h> 7#include <qlabel.h>
8#include <qpopupmenu.h> 8#include <qpopupmenu.h>
9#include <qtoolbar.h> 9#include <qtoolbar.h>
10#include <qmessagebox.h> 10#include <qmessagebox.h>
11#include <qpushbutton.h> 11#include <qpushbutton.h>
12#include <qwhatsthis.h>
12 13
13#include <qpe/resource.h> 14#include <qpe/resource.h>
14#include <opie/ofiledialog.h> 15#include <opie/ofiledialog.h>
15 16
16 17
17#include "keytrans.h" 18#include "keytrans.h"
18#include "profileeditordialog.h" 19#include "profileeditordialog.h"
19#include "configdialog.h" 20#include "configdialog.h"
20#include "default.h" 21#include "default.h"
21#include "metafactory.h" 22#include "metafactory.h"
22#include "profile.h" 23#include "profile.h"
23#include "profilemanager.h" 24#include "profilemanager.h"
@@ -41,25 +42,25 @@ static char * menu_xpm[] = {
41" ......... ", 42" ......... ",
42" .+++++++. ", 43" .+++++++. ",
43" .+@@@@#. ", 44" .+@@@@#. ",
44" .+@@@#. ", 45" .+@@@#. ",
45" .+@@#. ", 46" .+@@#. ",
46" .+@#. ", 47" .+@#. ",
47" .+#. ", 48" .+#. ",
48" .+. ", 49" .+. ",
49" .. ", 50" .. ",
50" "}; 51" "};
51 52
52 53
53MainWindow::MainWindow() { 54MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
54 KeyTrans::loadAll(); 55 KeyTrans::loadAll();
55 for (int i = 0; i < KeyTrans::count(); i++ ) { 56 for (int i = 0; i < KeyTrans::count(); i++ ) {
56 KeyTrans* s = KeyTrans::find(i ); 57 KeyTrans* s = KeyTrans::find(i );
57 assert( s ); 58 assert( s );
58 } 59 }
59 m_factory = new MetaFactory(); 60 m_factory = new MetaFactory();
60 Default def(m_factory); 61 Default def(m_factory);
61 m_sessions.setAutoDelete( TRUE ); 62 m_sessions.setAutoDelete( TRUE );
62 m_curSession = 0; 63 m_curSession = 0;
63 m_manager = new ProfileManager( m_factory ); 64 m_manager = new ProfileManager( m_factory );
64 m_manager->load(); 65 m_manager->load();
65 66
@@ -456,38 +457,37 @@ void MainWindow::slotSessionChanged( Session* ses ) {
456 457
457void MainWindow::slotFullscreen() { 458void MainWindow::slotFullscreen() {
458 459
459 if ( m_isFullscreen ) { 460 if ( m_isFullscreen ) {
460 ( m_curSession->widgetStack() )->reparent( m_consoleWindow, 0, QPoint(0,0), false ); 461 ( m_curSession->widgetStack() )->reparent( m_consoleWindow, 0, QPoint(0,0), false );
461 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); 462 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken );
462 setCentralWidget( m_consoleWindow ); 463 setCentralWidget( m_consoleWindow );
463 ( m_curSession->widgetStack() )->show(); 464 ( m_curSession->widgetStack() )->show();
464 m_fullscreen->setText( tr("Full screen") ); 465 m_fullscreen->setText( tr("Full screen") );
465 466
466 } else { 467 } else {
467 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); 468 ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
468 ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop, 469 ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop
469 QPoint(0,0), false); 470 , QPoint(0,0), false);
470 ( m_curSession->widgetStack() )->resize(qApp->desktop()->width(), qApp->desktop()->height()); 471 ( m_curSession->widgetStack() )->resize(qApp->desktop()->width(), qApp->desktop()->height());
471 ( m_curSession->widgetStack() )->setFocus(); 472 ( m_curSession->widgetStack() )->setFocus();
472 ( m_curSession->widgetStack() )->show(); 473 ( m_curSession->widgetStack() )->show();
473 474
474 //QPushButton *cornerButton = new QPushButton( ); 475 QPushButton *cornerButton = new QPushButton( m_curSession->widgetStack() );
475 //cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); 476 cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) );
476 //connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); 477 connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) );
477 // need teh scrollbar 478 // would need a scrollview
478 // ( m_curSession->widgetStack() )->setCornerWidget( cornerButton ); 479 // ( m_curSession->widgetStack() )->setCornerWidget( cornerButton );
479 m_fullscreen->setText( tr("Stop full screen") ); 480 m_fullscreen->setText( tr("Stop full screen") );
480 } 481 }
481
482 m_isFullscreen = !m_isFullscreen; 482 m_isFullscreen = !m_isFullscreen;
483 483
484} 484}
485 485
486 486
487void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool, bool) { 487void MainWindow::slotKeyReceived(ushort u, ushort q, bool, bool, bool) {
488 488
489 qWarning("received key event! relay to TE widget"); 489 qWarning("received key event! relay to TE widget");
490 490
491 if ( m_curSession ) { 491 if ( m_curSession ) {
492 QKeyEvent ke(QEvent::KeyPress, q, u, 0); 492 QKeyEvent ke(QEvent::KeyPress, q, u, 0);
493 493