summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsoftkeymanager_p.h
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2010-02-03 09:37:24 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2010-02-03 09:37:24 (GMT)
commit2a8d20453926082062246fc4cc788f88ea3c59ae (patch)
tree199b6e57afbf3bfb6b97eb5ac043ef658daf8ed6 /src/gui/kernel/qsoftkeymanager_p.h
parent8e87feefc0a92fbbeb1846f2471cdded9ef901ff (diff)
downloadQt-2a8d20453926082062246fc4cc788f88ea3c59ae.zip
Qt-2a8d20453926082062246fc4cc788f88ea3c59ae.tar.gz
Qt-2a8d20453926082062246fc4cc788f88ea3c59ae.tar.bz2
S60 softkey refactoring (support for merging, priorities and menus)
Implemented features: Softkey Merging: Widget can set only one softkey and set flag that rest of the softkeys shall be taken from parent. Priority Handling: If multiple sokftkeys with same role are set, the highest priority action gets displayed. Custom Softkey Menu: By setting QMenu to QAction and assigning a softkey role for that action, the native menubar will be displayed when sofkey is clicked. Softkey Image: Initial code for implementing sofkey image support, the final implementation is still pending legal acceptance to use eiksoftkeyimage.h header file which is under EPL license. Task-number: QTBUG-7315 Review-By: Sami Merila Review-By: Jason Barron
Diffstat (limited to 'src/gui/kernel/qsoftkeymanager_p.h')
-rw-r--r--src/gui/kernel/qsoftkeymanager_p.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/gui/kernel/qsoftkeymanager_p.h b/src/gui/kernel/qsoftkeymanager_p.h
index c901a29..ce902fe 100644
--- a/src/gui/kernel/qsoftkeymanager_p.h
+++ b/src/gui/kernel/qsoftkeymanager_p.h
@@ -63,6 +63,8 @@ QT_BEGIN_NAMESPACE
class QSoftKeyManagerPrivate;
+const char MENU_ACTION_PROPERTY[] = "_q_menuaction";
+
class Q_AUTOTEST_EXPORT QSoftKeyManager : public QObject
{
Q_OBJECT
@@ -79,26 +81,30 @@ public:
};
static void updateSoftKeys();
- static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
- static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
-
#ifdef Q_WS_S60
static bool handleCommand(int);
#endif
-private:
- QSoftKeyManager();
- static QSoftKeyManager *instance();
- static const char *standardSoftKeyText(StandardSoftKey standardKey);
+ static QAction *createAction(StandardSoftKey standardKey, QWidget *actionWidget);
+ static QAction *createKeyedAction(StandardSoftKey standardKey, Qt::Key key, QWidget *actionWidget);
protected:
bool event(QEvent *e);
- Q_DISABLE_COPY(QSoftKeyManager)
+private:
+ QSoftKeyManager();
+ static QSoftKeyManager *instance();
+ static const char *standardSoftKeyText(StandardSoftKey standardKey);
+ bool appendSoftkeys(const QWidget &source, int level);
+ QWidget *softkeySource(QWidget *previousSource, bool& recursiveMerging);
+ bool handleUpdateSoftKeys();
private Q_SLOTS:
void cleanupHash(QObject* obj);
void sendKeyEvent();
+
+private:
+ Q_DISABLE_COPY(QSoftKeyManager)
};
QT_END_NAMESPACE