summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <aportale@trolltech.com>2009-05-13 17:27:24 (GMT)
committerAlessandro Portale <aportale@trolltech.com>2009-05-13 17:27:24 (GMT)
commit062e913e56a104f7d794cd4a7cecebbd33ead5a9 (patch)
tree3d8a49e2f867802df3764de6308753ea51b07804
parent913c002c32c62418537e19e491b25d20ac558d49 (diff)
downloadQt-062e913e56a104f7d794cd4a7cecebbd33ead5a9.zip
Qt-062e913e56a104f7d794cd4a7cecebbd33ead5a9.tar.gz
Qt-062e913e56a104f7d794cd4a7cecebbd33ead5a9.tar.bz2
QSoftKeyStack::handleSoftKeyPress(int command) will be called whenever
a softkey is pressed.
-rw-r--r--src/gui/widgets/qsoftkeystack.h2
-rw-r--r--src/gui/widgets/qsoftkeystack_p.h5
-rw-r--r--src/gui/widgets/qsoftkeystack_s60.cpp9
3 files changed, 12 insertions, 4 deletions
diff --git a/src/gui/widgets/qsoftkeystack.h b/src/gui/widgets/qsoftkeystack.h
index 66edab0..ca06072 100644
--- a/src/gui/widgets/qsoftkeystack.h
+++ b/src/gui/widgets/qsoftkeystack.h
@@ -65,6 +65,8 @@ public:
void push(const QList<QSoftKeyAction*> &softkeys);
void pop();
+ void handleSoftKeyPress(int command);
+
private:
Q_DECLARE_PRIVATE(QSoftKeyStack)
Q_DISABLE_COPY(QSoftKeyStack)
diff --git a/src/gui/widgets/qsoftkeystack_p.h b/src/gui/widgets/qsoftkeystack_p.h
index 1e8d0d1..77ae553 100644
--- a/src/gui/widgets/qsoftkeystack_p.h
+++ b/src/gui/widgets/qsoftkeystack_p.h
@@ -58,9 +58,14 @@
#include <QtCore/private/qobject_p.h>
#include "qsoftkeyaction.h"
+#include "qsoftkeystack.h"
QT_BEGIN_NAMESPACE
+// The following 2 defines may only be needed for s60. To be seen.
+#define SOFTKEYSTART 5000
+#define SOFTKEYEND (5000 + Qt::Key_Context4)
+
#define QSoftkeySet QList <QSoftKeyAction*>
class QSoftKeyStackPrivate : public QObjectPrivate
diff --git a/src/gui/widgets/qsoftkeystack_s60.cpp b/src/gui/widgets/qsoftkeystack_s60.cpp
index 35835f6..9e90fdf 100644
--- a/src/gui/widgets/qsoftkeystack_s60.cpp
+++ b/src/gui/widgets/qsoftkeystack_s60.cpp
@@ -49,9 +49,6 @@
#include "qsoftkeystack_p.h"
-#define SOFTKEYSTART 5000
-#define SOFTKEYEND (5000 + Qt::Key_Context4)
-
void QSoftKeyStackPrivate::mapSoftKeys(const QSoftkeySet &top)
{
if (top.count() == 1) {
@@ -100,4 +97,8 @@ void QSoftKeyStackPrivate::setNativeSoftKeys()
}
}
-
+void QSoftKeyStack::handleSoftKeyPress(int command)
+{
+ // Do the magic, here.
+ // Map the command back to actual softkey on the top of the stack and handle it
+}