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) (side-by-side diff)
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 @@
#include "function_keyboard.h"
#include "emulation_handler.h"
#include "script.h"
+#include "quick_button.h"
@@ -172,6 +173,20 @@ void MainWindow::initUI() {
m_openKeys->addTo(m_icons);
+ /*
+ * 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,
-1, 0);
@@ -195,6 +210,14 @@ void MainWindow::initUI() {
connect(m_kb, SIGNAL(keyPressed(ushort, ushort, bool, bool, bool)),
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) ) );
m_connect->setEnabled( false );
@@ -431,6 +454,19 @@ void MainWindow::slotOpenKeb(bool state) {
else m_keyBar->hide();
}
+
+
+void MainWindow::slotOpenButtons( bool state ) {
+
+ if ( state ) {
+ m_buttonBar->show();
+ } else {
+ m_buttonBar->hide();
+ }
+}
+
+
+
void MainWindow::slotSessionChanged( Session* ses ) {
qWarning("changed!");
if ( ses ) {