diff options
author | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-05 15:02:56 (GMT) |
---|---|---|
committer | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-06-05 15:02:56 (GMT) |
commit | dfffbd4d134f9b8adc75b2c33c31a2ee859903e6 (patch) | |
tree | c705b68fc0ff7ac73d18413cc48eb857cc97015c /src/gui/widgets | |
parent | 93ea4a9cd6336de6e2a63b1ca075a7fdb835cfa7 (diff) | |
download | Qt-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.cpp | 11 | ||||
-rw-r--r-- | src/gui/widgets/qsoftkeystack.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qsoftkeystack_s60.cpp | 1 |
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(); |