author | harlekin <harlekin> | 2002-10-17 17:19:20 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-17 17:19:20 (UTC) |
commit | df5a8d26c398ad65f09bd26c492c08f6c0ee22e0 (patch) (side-by-side diff) | |
tree | e1fcefde6e4942f65fa2b5ad253f40a190caa78a | |
parent | cedc9eed0c0b8d1685c3ca745eafd77988d394dc (diff) | |
download | opie-df5a8d26c398ad65f09bd26c492c08f6c0ee22e0.zip opie-df5a8d26c398ad65f09bd26c492c08f6c0ee22e0.tar.gz opie-df5a8d26c398ad65f09bd26c492c08f6c0ee22e0.tar.bz2 |
fullscreen mode ready
-rw-r--r-- | noncore/apps/opie-console/TEWidget.cpp | 20 | ||||
-rw-r--r-- | noncore/apps/opie-console/TEWidget.h | 30 | ||||
-rw-r--r-- | noncore/apps/opie-console/emulation_handler.cpp | 5 | ||||
-rw-r--r-- | noncore/apps/opie-console/emulation_handler.h | 3 | ||||
-rw-r--r-- | noncore/apps/opie-console/io_bt.cpp | 1 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 40 |
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 @@ #include <qdragobject.h> +#include <qvbox.h> @@ -73,2 +74,4 @@ + + // #include "TEWidget.moc" @@ -276,3 +279,5 @@ void TEWidget::setFont(const QFont &) /* */ -/* ------------------------------------------------------------------------- */ +/* ----------------------------------------------------------------------- */ + + @@ -286,3 +291,4 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) - scrollbar = new QScrollBar(this); + + scrollbar = new QScrollBar( this ); scrollbar->setCursor( arrowCursor ); @@ -290,2 +296,7 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) + m_cornerButton = new QPushButton( this ); + m_cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); + m_cornerButton->setMaximumSize( 14, 14 ); + m_cornerButton->hide(); + Config cfg("Konsole"); @@ -856,3 +867,3 @@ void TEWidget::focusInEvent( QFocusEvent * ) { - + // do nothing, to prevent repainting @@ -1264 +1275,4 @@ void TEWidget::drop_menu_activated(int item) +QPushButton* TEWidget::cornerButton() { + return m_cornerButton; +} 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 @@ #include <qpopupmenu.h> +#include <qpushbutton.h> @@ -33,2 +34,24 @@ extern unsigned short vt100_graphics[32]; + + +static char * menu_xpm[] = { +"12 12 5 1", +" c None", +". c #000000", +"+ c #FFFDAD", +"@ c #FFFF00", +"# c #E5E100", +" ", +" ", +" ......... ", +" .+++++++. ", +" .+@@@@#. ", +" .+@@@#. ", +" .+@@#. ", +" .+@#. ", +" .+#. ", +" .+. ", +" .. ", +" "}; + class TESession; @@ -39,3 +62,4 @@ class TEWidget : public QFrame // a widget representing attributed text -{ Q_OBJECT +{ + Q_OBJECT @@ -51,2 +75,3 @@ public: QColor getDefaultBackColor(); + QPushButton *cornerButton(); @@ -133,3 +158,3 @@ public: const QPixmap *backgroundPixmap(); - + void setSelection(const QString &t); @@ -181,2 +206,3 @@ private: + QPushButton *m_cornerButton; 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 @@ #include <qwidget.h> +#include <qpushbutton.h> @@ -142 +143,5 @@ QColor EmulationHandler::backColor(int col ) { } + +QPushButton* EmulationHandler::cornerButton() { + return m_teWid->cornerButton(); +} 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; class QWidget; +class QPushButton; class TEWidget; @@ -48,2 +49,4 @@ public: void setColor( const QColor& fore, const QColor& back ); + QPushButton* cornerButton(); + signals: 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() { // now it should also be checked, if there is a connection to the device with that mac allready - // 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 @@ #include "function_keyboard.h" +#include "emulation_handler.h" #include "script.h" @@ -32,23 +33,2 @@ -static char * menu_xpm[] = { -"12 12 5 1", -" c None", -". c #000000", -"+ c #FFFDAD", -"@ c #FFFF00", -"# c #E5E100", -" ", -" ", -" ......... ", -" .+++++++. ", -" .+@@@@#. ", -" .+@@@#. ", -" .+@@#. ", -" .+@#. ", -" .+#. ", -" .+. ", -" .. ", -" "}; - - MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) { @@ -464,3 +444,4 @@ void MainWindow::slotFullscreen() { ( m_curSession->widgetStack() )->show(); - m_fullscreen->setText( tr("Full screen") ); + ( m_curSession->emulationHandler() )->cornerButton()->hide(); + disconnect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); @@ -469,4 +450,4 @@ void MainWindow::slotFullscreen() { ( m_curSession->widgetStack() )->reparent( 0,WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop - , QPoint(0,0), false); - ( m_curSession->widgetStack() )->resize(qApp->desktop()->width(), qApp->desktop()->height()); + , QPoint(0,0), false ); + ( m_curSession->widgetStack() )->resize( qApp->desktop()->width(), qApp->desktop()->height() ); ( m_curSession->widgetStack() )->setFocus(); @@ -474,11 +455,8 @@ void MainWindow::slotFullscreen() { - QPushButton *cornerButton = new QPushButton( m_curSession->widgetStack() ); - cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); - connect( cornerButton, SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); - // would need a scrollview - // ( m_curSession->widgetStack() )->setCornerWidget( cornerButton ); - m_fullscreen->setText( tr("Stop full screen") ); + ( ( m_curSession->emulationHandler() )->cornerButton() )->show(); + + connect( ( m_curSession->emulationHandler() )->cornerButton(), SIGNAL( pressed() ), this, SLOT( slotFullscreen() ) ); } - m_isFullscreen = !m_isFullscreen; + m_isFullscreen = !m_isFullscreen; } |