summaryrefslogtreecommitdiff
authorhash <hash>2002-10-13 01:49:42 (UTC)
committer hash <hash>2002-10-13 01:49:42 (UTC)
commite99b83c709d04a892f2c63d389a5e5932035dcb6 (patch) (side-by-side diff)
treef1484cd7b8961717d209fe491582b30a364c4bc5
parentb977a4bc4a8ac2b8685c4fa13534f630dabbf956 (diff)
downloadopie-e99b83c709d04a892f2c63d389a5e5932035dcb6.zip
opie-e99b83c709d04a892f2c63d389a5e5932035dcb6.tar.gz
opie-e99b83c709d04a892f2c63d389a5e5932035dcb6.tar.bz2
added the keyboard open/close button
Diffstat (more/less context) (show 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
@@ -6,2 +6,4 @@
#include <qtoolbar.h>
+#include <qpe/resource.h>
+
@@ -16,2 +18,3 @@
#include "transferdialog.h"
+#include "function_keyboard.h"
@@ -31,2 +34,3 @@ void MainWindow::initUI() {
+ /* tool bar for the menu */
m_tool = new QToolBar( this );
@@ -39,2 +43,6 @@ void MainWindow::initUI() {
+ /* add a toolbar for icons */
+ m_icons = new QToolBar(this);
+ m_icons->setHorizontalStretchable( TRUE );
+
/*
@@ -96,2 +104,16 @@ void MainWindow::initUI() {
+ /*
+ * 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 */
@@ -106,2 +128,10 @@ void MainWindow::initUI() {
+ /* 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);
+
/*
@@ -235 +265,8 @@ 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
@@ -14,2 +14,3 @@
class QToolBar;
+class QToolButton;
class QMenuBar;
@@ -20,2 +21,3 @@ class ProfileManager;
class Profile;
+class FunctionKeyboard;
class MainWindow : public QMainWindow {
@@ -58,2 +60,3 @@ private slots:
void slotTransfer();
+ void slotOpenKeb(bool);
@@ -81,2 +84,4 @@ private:
QToolBar* m_tool;
+ QToolBar* m_icons;
+ QToolBar* m_keyBar;
QMenuBar* m_bar;
@@ -90,3 +95,5 @@ private:
QAction* m_setProfiles;
+ QAction* m_openKeys;
+ FunctionKeyboard *m_kb;
};