summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-05 15:02:56 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-06-05 15:02:56 (GMT)
commitdfffbd4d134f9b8adc75b2c33c31a2ee859903e6 (patch)
treec705b68fc0ff7ac73d18413cc48eb857cc97015c /src/gui/widgets
parent93ea4a9cd6336de6e2a63b1ca075a7fdb835cfa7 (diff)
downloadQt-dfffbd4d134f9b8adc75b2c33c31a2ee859903e6.zip
Qt-dfffbd4d134f9b8adc75b2c33c31a2ee859903e6.tar.gz
Qt-dfffbd4d134f9b8adc75b2c33c31a2ee859903e6.tar.bz2
Initial version of softkey implementation that doesn't use
softkeystack but instead softkeys are stored in QWidgets.
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qmainwindow.cpp11
-rw-r--r--src/gui/widgets/qsoftkeystack.cpp2
-rw-r--r--src/gui/widgets/qsoftkeystack_s60.cpp1
3 files changed, 11 insertions, 3 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 37b1398..20270b4 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -69,6 +69,7 @@ QT_END_NAMESPACE
#ifndef QT_NO_SOFTKEYSTACK
#include <qsoftkeystack.h>
#endif
+#include <qsoftkeyaction.h>
QT_BEGIN_NAMESPACE
@@ -121,9 +122,9 @@ void QMainWindowPrivate::init()
explicitIconSize = false;
q->setAttribute(Qt::WA_Hover);
-#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SOFTKEYSTACK)
- softKeyStack = new QSoftKeyStack(q);
-#endif
+//#if defined(Q_OS_SYMBIAN) && !defined(QT_NO_SOFTKEYSTACK)
+// softKeyStack = new QSoftKeyStack(q);
+//#endif
}
/*
@@ -495,6 +496,10 @@ void QMainWindow::setMenuBar(QMenuBar *menuBar)
oldMenuBar->deleteLater();
}
d->layout->setMenuBar(menuBar);
+ if (menuBar) {
+ QSoftKeyAction* menu = new QSoftKeyAction(QSoftKeyAction::Menu, QString::fromLatin1("Menu"), this);
+ setSoftKeys(menu);
+ }
}
/*!
diff --git a/src/gui/widgets/qsoftkeystack.cpp b/src/gui/widgets/qsoftkeystack.cpp
index 9a5a66c..6c00d35 100644
--- a/src/gui/widgets/qsoftkeystack.cpp
+++ b/src/gui/widgets/qsoftkeystack.cpp
@@ -196,6 +196,7 @@ QList<QSoftKeyAction*> menuActionList(QWidget *widget)
void QSoftKeyStack::handleFocusChanged(QWidget *old, QWidget *now)
{
+ return;
if (!now)
return;
QWidget *w = qApp->activeWindow();
@@ -252,6 +253,7 @@ QToolBar* softKeyToolBar(QMainWindow *mainWindow)
void QSoftKeyStackPrivate::setNativeSoftKeys()
{
+ return;
Q_Q(QSoftKeyStack);
QMainWindow *parent = qobject_cast<QMainWindow*>(q->parent());
if (!parent)
diff --git a/src/gui/widgets/qsoftkeystack_s60.cpp b/src/gui/widgets/qsoftkeystack_s60.cpp
index 8dfd5dd..a315a3b 100644
--- a/src/gui/widgets/qsoftkeystack_s60.cpp
+++ b/src/gui/widgets/qsoftkeystack_s60.cpp
@@ -73,6 +73,7 @@ void QSoftKeyStackPrivate::mapSoftKeys(const QSoftkeySet &top)
void QSoftKeyStackPrivate::setNativeSoftKeys()
{
+ return;
CCoeAppUi* appui = CEikonEnv::Static()->AppUi();
CAknAppUi* aknAppUi = static_cast <CAknAppUi*>(appui);
CEikButtonGroupContainer* nativeContainer = aknAppUi->Cba();