Diffstat (limited to 'noncore/apps/opie-console/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/mainwindow.cpp | 36 |
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 @@ -30,2 +30,3 @@ #include "script.h" +#include "quick_button.h" @@ -174,2 +175,16 @@ void MainWindow::initUI() { + /* + * action that open/closes the keyboard + */ + m_openButtons = new QAction ( tr( "Open Buttons..." ), + Resource::loadPixmap( "down" ), + QString::null, 0, this, 0 ); + + m_openButtons->setToggleAction( true ); + + connect ( m_openButtons, SIGNAL( toggled( bool ) ), + this, SLOT( slotOpenButtons( bool ) ) ); + m_openButtons->addTo( m_icons ); + + /* insert the submenu */ @@ -197,2 +212,10 @@ void MainWindow::initUI() { + m_buttonBar = new QToolBar( this ); + addToolBar( m_buttonBar, "Buttons", QMainWindow::Top, TRUE ); + m_buttonBar->setHorizontalStretchable( TRUE ); + m_buttonBar->hide(); + + m_qb = new QuickButton( m_buttonBar ); + connect( m_qb, SIGNAL( keyPressed( ushort, ushort, bool, bool, bool) ), + this, SLOT( slotKeyReceived( ushort, ushort, bool, bool, bool) ) ); @@ -433,2 +456,15 @@ void MainWindow::slotOpenKeb(bool state) { } + + +void MainWindow::slotOpenButtons( bool state ) { + + if ( state ) { + m_buttonBar->show(); + } else { + m_buttonBar->hide(); + } +} + + + void MainWindow::slotSessionChanged( Session* ses ) { |