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
@@ -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;
}