author | harlekin <harlekin> | 2002-10-14 23:23:55 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-14 23:23:55 (UTC) |
commit | c7aed90e02d06502dff04043103c5db0883cc011 (patch) (unidiff) | |
tree | 1787c9d92e23474d2e69bb1607ecaf565cac2475 | |
parent | 91adb54066037522a619ce5d072c2e932901fd74 (diff) | |
download | opie-c7aed90e02d06502dff04043103c5db0883cc011.zip opie-c7aed90e02d06502dff04043103c5db0883cc011.tar.gz opie-c7aed90e02d06502dff04043103c5db0883cc011.tar.bz2 |
half way fullscreen done
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 101 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 7 |
2 files changed, 88 insertions, 20 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp index 89cdf51..6dc9e6e 100644 --- a/noncore/apps/opie-console/mainwindow.cpp +++ b/noncore/apps/opie-console/mainwindow.cpp | |||
@@ -10,2 +10,3 @@ | |||
10 | #include <qmessagebox.h> | 10 | #include <qmessagebox.h> |
11 | #include <qpushbutton.h> | ||
11 | 12 | ||
@@ -28,2 +29,25 @@ | |||
28 | 29 | ||
30 | |||
31 | |||
32 | static char * menu_xpm[] = { | ||
33 | "12 12 5 1", | ||
34 | " c None", | ||
35 | ".c #000000", | ||
36 | "+c #FFFDAD", | ||
37 | "@c #FFFF00", | ||
38 | "#c #E5E100", | ||
39 | " ", | ||
40 | " ", | ||
41 | " ......... ", | ||
42 | " .+++++++. ", | ||
43 | " .+@@@@#. ", | ||
44 | " .+@@@#. ", | ||
45 | " .+@@#. ", | ||
46 | " .+@#. ", | ||
47 | " .+#. ", | ||
48 | " .+. ", | ||
49 | " .. ", | ||
50 | " "}; | ||
51 | |||
52 | |||
29 | MainWindow::MainWindow() { | 53 | MainWindow::MainWindow() { |
@@ -95,2 +119,15 @@ void MainWindow::initUI() { | |||
95 | 119 | ||
120 | |||
121 | /* | ||
122 | * fullscreen | ||
123 | */ | ||
124 | m_isFullscreen = false; | ||
125 | |||
126 | m_fullscreen = new QAction( tr("Full screen"), Resource::loadPixmap( "fullscreen" ) | ||
127 | , QString::null, 0, this, 0); | ||
128 | m_fullscreen->addTo( m_console ); | ||
129 | m_fullscreen->addTo( m_icons ); | ||
130 | connect( m_fullscreen, SIGNAL( activated() ), | ||
131 | this, SLOT( slotFullscreen() ) ); | ||
132 | |||
96 | /* | 133 | /* |
@@ -104,6 +141,6 @@ void MainWindow::initUI() { | |||
104 | 141 | ||
105 | a = new QAction(); | 142 | m_closewindow = new QAction(); |
106 | a->setText( tr("Close Window") ); | 143 | m_closewindow->setText( tr("Close Window") ); |
107 | a->addTo( m_console ); | 144 | m_closewindow->addTo( m_console ); |
108 | connect(a, SIGNAL(activated() ), | 145 | connect( m_closewindow, SIGNAL(activated() ), |
109 | this, SLOT(slotClose() ) ); | 146 | this, SLOT(slotClose() ) ); |
@@ -180,2 +217,4 @@ void MainWindow::initUI() { | |||
180 | m_runScript->setEnabled( false ); | 217 | m_runScript->setEnabled( false ); |
218 | m_fullscreen->setEnabled( false ); | ||
219 | m_closewindow->setEnabled( false ); | ||
181 | 220 | ||
@@ -327,2 +366,14 @@ void MainWindow::slotClose() { | |||
327 | tabWidget()->setCurrent( m_curSession ); | 366 | tabWidget()->setCurrent( m_curSession ); |
367 | |||
368 | if (!currentSession() ) { | ||
369 | m_connect->setEnabled( false ); | ||
370 | m_disconnect->setEnabled( false ); | ||
371 | m_terminate->setEnabled( false ); | ||
372 | m_transfer->setEnabled( false ); | ||
373 | m_recordScript->setEnabled( false ); | ||
374 | m_saveScript->setEnabled( false ); | ||
375 | m_runScript->setEnabled( false ); | ||
376 | m_fullscreen->setEnabled( false ); | ||
377 | m_closewindow->setEnabled( false ); | ||
378 | } | ||
328 | } | 379 | } |
@@ -354,3 +405,3 @@ void MainWindow::create( const Profile& prof ) { | |||
354 | 405 | ||
355 | // dicide if its a local term ( then no connction and no tranfer) | 406 | // dicide if its a local term ( then no connction and no tranfer), maybe make a wrapper method out of it |
356 | m_connect->setEnabled( true ); | 407 | m_connect->setEnabled( true ); |
@@ -362,4 +413,4 @@ void MainWindow::create( const Profile& prof ) { | |||
362 | m_runScript->setEnabled( true ); | 413 | m_runScript->setEnabled( true ); |
363 | 414 | m_fullscreen->setEnabled( true ); | |
364 | 415 | m_closewindow->setEnabled( true ); | |
365 | } | 416 | } |
@@ -389,14 +440,28 @@ void MainWindow::slotSessionChanged( Session* ses ) { | |||
389 | 440 | ||
390 | void MainWindow::setOn() { | 441 | void MainWindow::slotFullscreen() { |
391 | 442 | ||
392 | /* | 443 | if ( m_isFullscreen ) { |
393 | m_connect | 444 | ( m_curSession->widgetStack() )->reparent( m_consoleWindow, 0, QPoint(0,0), false ); |
394 | m_disconnect | 445 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::Panel | QFrame::Sunken ); |
395 | m_terminate | 446 | setCentralWidget( m_consoleWindow ); |
396 | m_transfer | 447 | ( m_curSession->widgetStack() )->show(); |
397 | m_recordScript | 448 | m_fullscreen->setText( tr("Full screen") ); |
398 | m_saveScript | 449 | |
399 | m_runScript | 450 | } else { |
400 | */ | 451 | ( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame ); |
452 | ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop, | ||
453 | QPoint(0,0), false); | ||
454 | ( m_curSession->widgetStack() )->resize(qApp->desktop()->width(), qApp->desktop()->height()); | ||
455 | ( m_curSession->widgetStack() )->setFocus(); | ||
456 | ( m_curSession->widgetStack() )->show(); | ||
457 | |||
458 | // QPushButton *cornerButton = new QPushButton( this ); | ||
459 | //cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); | ||
460 | //connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); | ||
461 | // need teh scrollbar | ||
462 | // ( m_curSession->widgetStack() )->setCornerWidget( cornerButton ); | ||
463 | m_fullscreen->setText( tr("Stop full screen") ); | ||
464 | } | ||
401 | 465 | ||
466 | m_isFullscreen = !m_isFullscreen; | ||
402 | 467 | ||
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h index 378870a..e63078a 100644 --- a/noncore/apps/opie-console/mainwindow.h +++ b/noncore/apps/opie-console/mainwindow.h | |||
@@ -59,3 +59,3 @@ private slots: | |||
59 | void slotProfile(int); | 59 | void slotProfile(int); |
60 | void slotTransfer(); | 60 | void slotTransfer(); |
61 | void slotOpenKeb(bool); | 61 | void slotOpenKeb(bool); |
@@ -64,3 +64,3 @@ private slots: | |||
64 | void slotRunScript(); | 64 | void slotRunScript(); |
65 | void setOn(); | 65 | void slotFullscreen(); |
66 | void slotSessionChanged( Session* ); | 66 | void slotSessionChanged( Session* ); |
@@ -104,4 +104,7 @@ private: | |||
104 | QAction* m_runScript; | 104 | QAction* m_runScript; |
105 | QAction* m_fullscreen; | ||
106 | QAction* m_closewindow; | ||
105 | 107 | ||
106 | FunctionKeyboard *m_kb; | 108 | FunctionKeyboard *m_kb; |
109 | bool m_isFullscreen; | ||
107 | }; | 110 | }; |