summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp37
-rw-r--r--noncore/apps/opie-console/mainwindow.h7
2 files changed, 44 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index 88727e4..2a4d069 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -5,4 +5,6 @@
#include <qpopupmenu.h>
#include <qtoolbar.h>
+#include <qpe/resource.h>
+
#include "profileeditordialog.h"
@@ -15,4 +17,5 @@
#include "tabwidget.h"
#include "transferdialog.h"
+#include "function_keyboard.h"
MainWindow::MainWindow() {
@@ -30,4 +33,5 @@ void MainWindow::initUI() {
setToolBarsMovable( FALSE );
+ /* tool bar for the menu */
m_tool = new QToolBar( this );
m_tool->setHorizontalStretchable( TRUE );
@@ -38,4 +42,8 @@ void MainWindow::initUI() {
m_settings = new QPopupMenu( this );
+ /* add a toolbar for icons */
+ m_icons = new QToolBar(this);
+ m_icons->setHorizontalStretchable( TRUE );
+
/*
* new Action for new sessions
@@ -95,4 +103,18 @@ void MainWindow::initUI() {
this, SLOT(slotConfigure() ) );
+ /*
+ * action that open/closes the keyboard
+ */
+ m_openKeys = new QAction ("Keyboard...",
+ Resource::loadPixmap( "down" ),
+ QString::null, 0, this, 0);
+
+ m_openKeys->setToggleAction(true);
+
+ connect (m_openKeys, SIGNAL(toggled(bool)),
+ this, SLOT(slotOpenKeb(bool)));
+ m_openKeys->addTo(m_icons);
+
+
/* insert the submenu */
m_console->insertItem(tr("New from Profile"), m_sessionsPop,
@@ -105,4 +127,12 @@ void MainWindow::initUI() {
m_bar->insertItem( tr("Settings"), m_settings );
+ /* and the keyboard */
+ m_keyBar = new QToolBar(this);
+ addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE );
+ m_keyBar->setHorizontalStretchable( TRUE );
+ m_keyBar->hide();
+
+ m_kb = new FunctionKeyboard(m_keyBar);
+
/*
* connect to the menu activation
@@ -234,2 +264,9 @@ void MainWindow::slotTransfer()
}
+
+void MainWindow::slotOpenKeb(bool state) {
+
+ if (state) m_keyBar->show();
+ else m_keyBar->hide();
+
+}
diff --git a/noncore/apps/opie-console/mainwindow.h b/noncore/apps/opie-console/mainwindow.h
index c8b0b65..73bb285 100644
--- a/noncore/apps/opie-console/mainwindow.h
+++ b/noncore/apps/opie-console/mainwindow.h
@@ -13,4 +13,5 @@
*/
class QToolBar;
+class QToolButton;
class QMenuBar;
class QAction;
@@ -19,4 +20,5 @@ class TabWidget;
class ProfileManager;
class Profile;
+class FunctionKeyboard;
class MainWindow : public QMainWindow {
Q_OBJECT
@@ -57,4 +59,5 @@ private slots:
void slotProfile(int);
void slotTransfer();
+ void slotOpenKeb(bool);
private:
@@ -80,4 +83,6 @@ private:
TabWidget* m_consoleWindow;
QToolBar* m_tool;
+ QToolBar* m_icons;
+ QToolBar* m_keyBar;
QMenuBar* m_bar;
QPopupMenu* m_console;
@@ -89,5 +94,7 @@ private:
QAction* m_transfer;
QAction* m_setProfiles;
+ QAction* m_openKeys;
+ FunctionKeyboard *m_kb;
};