summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -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 = 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");
@@ -855,5 +866,5 @@ void TEWidget::mouseDoubleClickEvent(QMouseEvent* ev)
void TEWidget::focusInEvent( QFocusEvent * )
{
-
+
// do nothing, to prevent repainting
}
@@ -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;
@@ -132,5 +157,5 @@ protected:
public:
const QPixmap *backgroundPixmap();
-
+
void setSelection(const QString &t);
@@ -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,23 +443,21 @@ 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 {
( m_curSession->widgetStack() )->setFrameStyle( QFrame::NoFrame );
( 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();
( 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;
}