summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/mainwindow.cpp
authorharlekin <harlekin>2002-10-17 22:49:55 (UTC)
committer harlekin <harlekin>2002-10-17 22:49:55 (UTC)
commit51dbf76486cb81a7cb34c07483b344c8ea7a8a24 (patch) (unidiff)
tree422713323f2631e6432cfe3e07e735206446e7fc /noncore/apps/opie-console/mainwindow.cpp
parent943c09096f11827470b9cd3e311329ac422aaf20 (diff)
downloadopie-51dbf76486cb81a7cb34c07483b344c8ea7a8a24.zip
opie-51dbf76486cb81a7cb34c07483b344c8ea7a8a24.tar.gz
opie-51dbf76486cb81a7cb34c07483b344c8ea7a8a24.tar.bz2
buttonbar added
Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/mainwindow.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/mainwindow.cpp b/noncore/apps/opie-console/mainwindow.cpp
index f0130e1..b813442 100644
--- a/noncore/apps/opie-console/mainwindow.cpp
+++ b/noncore/apps/opie-console/mainwindow.cpp
@@ -28,6 +28,7 @@
28#include "function_keyboard.h" 28#include "function_keyboard.h"
29#include "emulation_handler.h" 29#include "emulation_handler.h"
30#include "script.h" 30#include "script.h"
31#include "quick_button.h"
31 32
32 33
33 34
@@ -172,6 +173,20 @@ void MainWindow::initUI() {
172 m_openKeys->addTo(m_icons); 173 m_openKeys->addTo(m_icons);
173 174
174 175
176 /*
177 * action that open/closes the keyboard
178 */
179 m_openButtons = new QAction ( tr( "Open Buttons..." ),
180 Resource::loadPixmap( "down" ),
181 QString::null, 0, this, 0 );
182
183 m_openButtons->setToggleAction( true );
184
185 connect ( m_openButtons, SIGNAL( toggled( bool ) ),
186 this, SLOT( slotOpenButtons( bool ) ) );
187 m_openButtons->addTo( m_icons );
188
189
175 /* insert the submenu */ 190 /* insert the submenu */
176 m_console->insertItem(tr("New from Profile"), m_sessionsPop, 191 m_console->insertItem(tr("New from Profile"), m_sessionsPop,
177 -1, 0); 192 -1, 0);
@@ -195,6 +210,14 @@ void MainWindow::initUI() {
195 connect(m_kb, SIGNAL(keyPressed(ushort, ushort, bool, bool, bool)), 210 connect(m_kb, SIGNAL(keyPressed(ushort, ushort, bool, bool, bool)),
196 this, SLOT(slotKeyReceived(ushort, ushort, bool, bool, bool))); 211 this, SLOT(slotKeyReceived(ushort, ushort, bool, bool, bool)));
197 212
213 m_buttonBar = new QToolBar( this );
214 addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE );
215 m_buttonBar->setHorizontalStretchable( TRUE );
216 m_buttonBar->hide();
217
218 m_qb = new QuickButton( m_buttonBar );
219 connect( m_qb, SIGNAL( keyPressed( ushort, ushort, bool, bool, bool) ),
220 this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) );
198 221
199 222
200 m_connect->setEnabled( false ); 223 m_connect->setEnabled( false );
@@ -431,6 +454,19 @@ void MainWindow::slotOpenKeb(bool state) {
431 else m_keyBar->hide(); 454 else m_keyBar->hide();
432 455
433} 456}
457
458
459void MainWindow::slotOpenButtons( bool state ) {
460
461 if ( state ) {
462 m_buttonBar->show();
463 } else {
464 m_buttonBar->hide();
465 }
466}
467
468
469
434void MainWindow::slotSessionChanged( Session* ses ) { 470void MainWindow::slotSessionChanged( Session* ses ) {
435 qWarning("changed!"); 471 qWarning("changed!");
436 if ( ses ) { 472 if ( ses ) {