summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-17 17:19:20 (UTC)
committer harlekin <harlekin>2002-10-17 17:19:20 (UTC)
commitdf5a8d26c398ad65f09bd26c492c08f6c0ee22e0 (patch) (unidiff)
treee1fcefde6e4942f65fa2b5ad253f40a190caa78a
parentcedc9eed0c0b8d1685c3ca745eafd77988d394dc (diff)
downloadopie-df5a8d26c398ad65f09bd26c492c08f6c0ee22e0.zip
opie-df5a8d26c398ad65f09bd26c492c08f6c0ee22e0.tar.gz
opie-df5a8d26c398ad65f09bd26c492c08f6c0ee22e0.tar.bz2
fullscreen mode ready
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp20
-rw-r--r--noncore/apps/opie-console/TEWidget.h30
-rw-r--r--noncore/apps/opie-console/emulation_handler.cpp5
-rw-r--r--noncore/apps/opie-console/emulation_handler.h3
-rw-r--r--noncore/apps/opie-console/io_bt.cpp1
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp40
6 files changed, 62 insertions, 37 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index 75c438c..f3f462f 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -62,2 +62,3 @@
62#include <qdragobject.h> 62#include <qdragobject.h>
63#include <qvbox.h>
63 64
@@ -73,2 +74,4 @@
73 74
75
76
74// #include "TEWidget.moc" 77// #include "TEWidget.moc"
@@ -276,3 +279,5 @@ void TEWidget::setFont(const QFont &)
276/* */ 279/* */
277/* ------------------------------------------------------------------------- */ 280/* ----------------------------------------------------------------------- */
281
282
278 283
@@ -286,3 +291,4 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
286 291
287 scrollbar = new QScrollBar(this); 292
293 scrollbar = new QScrollBar( this );
288 scrollbar->setCursor( arrowCursor ); 294 scrollbar->setCursor( arrowCursor );
@@ -290,2 +296,7 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name)
290 296
297 m_cornerButton = new QPushButton( this );
298 m_cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) );
299 m_cornerButton->setMaximumSize( 14, 14 );
300 m_cornerButton->hide();
301
291 Config cfg("Konsole"); 302 Config cfg("Konsole");
@@ -856,3 +867,3 @@ void TEWidget::focusInEvent( QFocusEvent * )
856{ 867{
857 868
858 // do nothing, to prevent repainting 869 // do nothing, to prevent repainting
@@ -1264 +1275,4 @@ void TEWidget::drop_menu_activated(int item)
1264 1275
1276QPushButton* TEWidget::cornerButton() {
1277 return m_cornerButton;
1278}
diff --git a/noncore/apps/opie-console/TEWidget.h b/noncore/apps/opie-console/TEWidget.h
index 40e1aea..1b5300f 100644
--- a/noncore/apps/opie-console/TEWidget.h
+++ b/noncore/apps/opie-console/TEWidget.h
@@ -28,2 +28,3 @@
28#include <qpopupmenu.h> 28#include <qpopupmenu.h>
29#include <qpushbutton.h>
29 30
@@ -33,2 +34,24 @@ extern unsigned short vt100_graphics[32];
33 34
35
36
37static char * menu_xpm[] = {
38"12 12 5 1",
39 " c None",
40 ".c #000000",
41 "+c #FFFDAD",
42 "@c #FFFF00",
43 "#c #E5E100",
44" ",
45" ",
46" ......... ",
47" .+++++++. ",
48" .+@@@@#. ",
49" .+@@@#. ",
50" .+@@#. ",
51" .+@#. ",
52" .+#. ",
53" .+. ",
54" .. ",
55" "};
56
34class TESession; 57class TESession;
@@ -39,3 +62,4 @@ class TEWidget : public QFrame
39// a widget representing attributed text 62// a widget representing attributed text
40{ Q_OBJECT 63{
64 Q_OBJECT
41 65
@@ -51,2 +75,3 @@ public:
51 QColor getDefaultBackColor(); 75 QColor getDefaultBackColor();
76 QPushButton *cornerButton();
52 77
@@ -133,3 +158,3 @@ public:
133 const QPixmap *backgroundPixmap(); 158 const QPixmap *backgroundPixmap();
134 159
135 void setSelection(const QString &t); 160 void setSelection(const QString &t);
@@ -181,2 +206,3 @@ private:
181 206
207 QPushButton *m_cornerButton;
182 QClipboard* cb; 208 QClipboard* cb;
diff --git a/noncore/apps/opie-console/emulation_handler.cpp b/noncore/apps/opie-console/emulation_handler.cpp
index b2cd348..8846959 100644
--- a/noncore/apps/opie-console/emulation_handler.cpp
+++ b/noncore/apps/opie-console/emulation_handler.cpp
@@ -1,2 +1,3 @@
1#include <qwidget.h> 1#include <qwidget.h>
2#include <qpushbutton.h>
2 3
@@ -142 +143,5 @@ QColor EmulationHandler::backColor(int col ) {
142} 143}
144
145QPushButton* EmulationHandler::cornerButton() {
146 return m_teWid->cornerButton();
147}
diff --git a/noncore/apps/opie-console/emulation_handler.h b/noncore/apps/opie-console/emulation_handler.h
index 9af7680..9ceafc6 100644
--- a/noncore/apps/opie-console/emulation_handler.h
+++ b/noncore/apps/opie-console/emulation_handler.h
@@ -27,2 +27,3 @@ class Profile;
27class QWidget; 27class QWidget;
28class QPushButton;
28class TEWidget; 29class TEWidget;
@@ -48,2 +49,4 @@ public:
48 void setColor( const QColor& fore, const QColor& back ); 49 void setColor( const QColor& fore, const QColor& back );
50 QPushButton* cornerButton();
51
49signals: 52signals:
diff --git a/noncore/apps/opie-console/io_bt.cpp b/noncore/apps/opie-console/io_bt.cpp
index d71aacc..4486eea 100644
--- a/noncore/apps/opie-console/io_bt.cpp
+++ b/noncore/apps/opie-console/io_bt.cpp
@@ -31,3 +31,2 @@ bool IOBt::open() {
31 // now it should also be checked, if there is a connection to the device with that mac allready 31 // now it should also be checked, if there is a connection to the device with that mac allready
32
33 // hciattach here 32 // hciattach here
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
@@ -28,2 +28,3 @@
28#include "function_keyboard.h" 28#include "function_keyboard.h"
29#include "emulation_handler.h"
29#include "script.h" 30#include "script.h"
@@ -32,23 +33,2 @@
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) {
@@ -464,3 +444,4 @@ void MainWindow::slotFullscreen() {
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
@@ -469,4 +450,4 @@ void MainWindow::slotFullscreen() {
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();
@@ -474,11 +455,8 @@ void MainWindow::slotFullscreen() {
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}