summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
authorhash <hash>2002-10-13 01:49:42 (UTC)
committer hash <hash>2002-10-13 01:49:42 (UTC)
commite99b83c709d04a892f2c63d389a5e5932035dcb6 (patch) (unidiff)
treef1484cd7b8961717d209fe491582b30a364c4bc5 /noncore/apps/opie-console/mainwindow.cpp
parentb977a4bc4a8ac2b8685c4fa13534f630dabbf956 (diff)
downloadopie-e99b83c709d04a892f2c63d389a5e5932035dcb6.zip
opie-e99b83c709d04a892f2c63d389a5e5932035dcb6.tar.gz
opie-e99b83c709d04a892f2c63d389a5e5932035dcb6.tar.bz2
added the keyboard open/close button
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp37
1 files changed, 37 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 @@
5#include <qpopupmenu.h> 5#include <qpopupmenu.h>
6#include <qtoolbar.h> 6#include <qtoolbar.h>
7#include <qpe/resource.h>
8
7 9
8#include "profileeditordialog.h" 10#include "profileeditordialog.h"
@@ -15,4 +17,5 @@
15#include "tabwidget.h" 17#include "tabwidget.h"
16#include "transferdialog.h" 18#include "transferdialog.h"
19#include "function_keyboard.h"
17 20
18MainWindow::MainWindow() { 21MainWindow::MainWindow() {
@@ -30,4 +33,5 @@ void MainWindow::initUI() {
30 setToolBarsMovable( FALSE ); 33 setToolBarsMovable( FALSE );
31 34
35 /* tool bar for the menu */
32 m_tool = new QToolBar( this ); 36 m_tool = new QToolBar( this );
33 m_tool->setHorizontalStretchable( TRUE ); 37 m_tool->setHorizontalStretchable( TRUE );
@@ -38,4 +42,8 @@ void MainWindow::initUI() {
38 m_settings = new QPopupMenu( this ); 42 m_settings = new QPopupMenu( this );
39 43
44 /* add a toolbar for icons */
45 m_icons = new QToolBar(this);
46 m_icons->setHorizontalStretchable( TRUE );
47
40 /* 48 /*
41 * new Action for new sessions 49 * new Action for new sessions
@@ -95,4 +103,18 @@ void MainWindow::initUI() {
95 this, SLOT(slotConfigure() ) ); 103 this, SLOT(slotConfigure() ) );
96 104
105 /*
106 * action that open/closes the keyboard
107 */
108 m_openKeys = new QAction ("Keyboard...",
109 Resource::loadPixmap( "down" ),
110 QString::null, 0, this, 0);
111
112 m_openKeys->setToggleAction(true);
113
114 connect (m_openKeys, SIGNAL(toggled(bool)),
115 this, SLOT(slotOpenKeb(bool)));
116 m_openKeys->addTo(m_icons);
117
118
97 /* insert the submenu */ 119 /* insert the submenu */
98 m_console->insertItem(tr("New from Profile"), m_sessionsPop, 120 m_console->insertItem(tr("New from Profile"), m_sessionsPop,
@@ -105,4 +127,12 @@ void MainWindow::initUI() {
105 m_bar->insertItem( tr("Settings"), m_settings ); 127 m_bar->insertItem( tr("Settings"), m_settings );
106 128
129 /* and the keyboard */
130 m_keyBar = new QToolBar(this);
131 addToolBar( m_keyBar, "Keyboard", QMainWindow::Top, TRUE );
132 m_keyBar->setHorizontalStretchable( TRUE );
133 m_keyBar->hide();
134
135 m_kb = new FunctionKeyboard(m_keyBar);
136
107 /* 137 /*
108 * connect to the menu activation 138 * connect to the menu activation
@@ -234,2 +264,9 @@ void MainWindow::slotTransfer()
234} 264}
235 265
266
267void MainWindow::slotOpenKeb(bool state) {
268
269 if (state) m_keyBar->show();
270 else m_keyBar->hide();
271
272}