-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 37 | ||||
-rw-r--r-- | noncore/apps/opie-console/mainwindow.h | 7 |
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 @@ | |||
6 | #include <qtoolbar.h> | 6 | #include <qtoolbar.h> |
7 | #include <qpe/resource.h> | ||
8 | |||
7 | 9 | ||
@@ -16,2 +18,3 @@ | |||
16 | #include "transferdialog.h" | 18 | #include "transferdialog.h" |
19 | #include "function_keyboard.h" | ||
17 | 20 | ||
@@ -31,2 +34,3 @@ void MainWindow::initUI() { | |||
31 | 34 | ||
35 | /* tool bar for the menu */ | ||
32 | m_tool = new QToolBar( this ); | 36 | m_tool = new QToolBar( this ); |
@@ -39,2 +43,6 @@ void MainWindow::initUI() { | |||
39 | 43 | ||
44 | /* add a toolbar for icons */ | ||
45 | m_icons = new QToolBar(this); | ||
46 | m_icons->setHorizontalStretchable( TRUE ); | ||
47 | |||
40 | /* | 48 | /* |
@@ -96,2 +104,16 @@ void MainWindow::initUI() { | |||
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 */ |
@@ -106,2 +128,10 @@ void MainWindow::initUI() { | |||
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 | /* |
@@ -235 +265,8 @@ void MainWindow::slotTransfer() | |||
235 | 265 | ||
266 | |||
267 | void MainWindow::slotOpenKeb(bool state) { | ||
268 | |||
269 | if (state) m_keyBar->show(); | ||
270 | else m_keyBar->hide(); | ||
271 | |||
272 | } | ||
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 @@ | |||
14 | class QToolBar; | 14 | class QToolBar; |
15 | class QToolButton; | ||
15 | class QMenuBar; | 16 | class QMenuBar; |
@@ -20,2 +21,3 @@ class ProfileManager; | |||
20 | class Profile; | 21 | class Profile; |
22 | class FunctionKeyboard; | ||
21 | class MainWindow : public QMainWindow { | 23 | class MainWindow : public QMainWindow { |
@@ -58,2 +60,3 @@ private slots: | |||
58 | void slotTransfer(); | 60 | void slotTransfer(); |
61 | void slotOpenKeb(bool); | ||
59 | 62 | ||
@@ -81,2 +84,4 @@ private: | |||
81 | QToolBar* m_tool; | 84 | QToolBar* m_tool; |
85 | QToolBar* m_icons; | ||
86 | QToolBar* m_keyBar; | ||
82 | QMenuBar* m_bar; | 87 | QMenuBar* m_bar; |
@@ -90,3 +95,5 @@ private: | |||
90 | QAction* m_setProfiles; | 95 | QAction* m_setProfiles; |
96 | QAction* m_openKeys; | ||
91 | 97 | ||
98 | FunctionKeyboard *m_kb; | ||
92 | }; | 99 | }; |