author | harlekin <harlekin> | 2002-10-17 22:49:55 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2002-10-17 22:49:55 (UTC) |
commit | 51dbf76486cb81a7cb34c07483b344c8ea7a8a24 (patch) (side-by-side diff) | |
tree | 422713323f2631e6432cfe3e07e735206446e7fc /noncore/apps/opie-console/mainwindow.cpp | |
parent | 943c09096f11827470b9cd3e311329ac422aaf20 (diff) | |
download | opie-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.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 @@ -29,4 +29,5 @@ #include "emulation_handler.h" #include "script.h" +#include "quick_button.h" @@ -173,4 +174,18 @@ 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 */ m_console->insertItem(tr("New from Profile"), m_sessionsPop, @@ -196,4 +211,12 @@ void MainWindow::initUI() { this, SLOT(slotKeyReceived(ushort, ushort, bool, bool, bool))); + 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) ) ); @@ -432,4 +455,17 @@ void MainWindow::slotOpenKeb(bool state) { } + + +void MainWindow::slotOpenButtons( bool state ) { + + if ( state ) { + m_buttonBar->show(); + } else { + m_buttonBar->hide(); + } +} + + + void MainWindow::slotSessionChanged( Session* ses ) { qWarning("changed!"); |