-rw-r--r-- | noncore/apps/opie-console/TEWidget.cpp | 16 | ||||
-rw-r--r-- | noncore/apps/opie-console/TEWidget.h | 28 | ||||
-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 | 36 |
6 files changed, 57 insertions, 32 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 @@ -61,4 +61,5 @@ #include <qfile.h> #include <qdragobject.h> +#include <qvbox.h> #include <stdio.h> @@ -72,4 +73,6 @@ #include <assert.h> + + // #include "TEWidget.moc" //#include <kapp.h> @@ -275,5 +278,7 @@ void TEWidget::setFont(const QFont &) /* Constructor / Destructor */ /* */ -/* ------------------------------------------------------------------------- */ +/* ----------------------------------------------------------------------- */ + + TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) @@ -285,8 +290,14 @@ TEWidget::TEWidget(QWidget *parent, const char *name) : QFrame(parent,name) #endif + scrollbar = new QScrollBar(this); scrollbar->setCursor( arrowCursor ); connect(scrollbar, SIGNAL(valueChanged(int)), this, SLOT(scrollChanged(int))); + m_cornerButton = new QPushButton( this ); + m_cornerButton->setPixmap( QPixmap( (const char**)menu_xpm ) ); + m_cornerButton->setMaximumSize( 14, 14 ); + m_cornerButton->hide(); + Config cfg("Konsole"); cfg.setGroup("ScrollBar"); @@ -1263,2 +1274,5 @@ 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 @@ -27,4 +27,5 @@ #include <qpopupmenu.h> +#include <qpushbutton.h> #include "TECommon.h" @@ -32,4 +33,26 @@ 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; @@ -38,5 +61,6 @@ class TESession; class TEWidget : public QFrame // a widget representing attributed text -{ Q_OBJECT +{ + Q_OBJECT // friend class Konsole; @@ -50,4 +74,5 @@ public: QColor getDefaultBackColor(); + QPushButton *cornerButton(); const ColorEntry* getColorTable() const; @@ -180,4 +205,5 @@ private: BOOL preserve_line_breaks; + QPushButton *m_cornerButton; QClipboard* cb; QScrollBar* scrollbar; 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,3 +1,4 @@ #include <qwidget.h> +#include <qpushbutton.h> #include "TEWidget.h" @@ -141,2 +142,6 @@ QColor EmulationHandler::backColor(int col ) { return co; } + +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 @@ -26,4 +26,5 @@ class Profile; class QWidget; +class QPushButton; class TEWidget; class TEmulation; @@ -47,4 +48,6 @@ public: QWidget* widget(); void setColor( const QColor& fore, const QColor& back ); + QPushButton* cornerButton(); + signals: void send( const QByteArray& ); 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 @@ -30,5 +30,4 @@ bool IOBt::open() { // now it should also be checked, if there is a connection to the device with that mac allready - // hciattach here m_attach = new OProcess(); 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 @@ -27,29 +27,9 @@ #include "transferdialog.h" #include "function_keyboard.h" +#include "emulation_handler.h" #include "script.h" -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) { KeyTrans::loadAll(); @@ -463,5 +443,6 @@ void MainWindow::slotFullscreen() { setCentralWidget( m_consoleWindow ); ( 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() ) ); } else { @@ -473,13 +454,10 @@ void MainWindow::slotFullscreen() { ( m_curSession->widgetStack() )->show(); - 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; } |