summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-15 10:05:37 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-15 10:05:37 (GMT)
commitc0e517977eefb579628c66716fa6bfcf5058f6b1 (patch)
treec42eeae05d94a0df4c99ea59d352b1988883742c /src/gui/widgets
parentef3d483a3893d936375d86229462c33132f5f118 (diff)
downloadQt-c0e517977eefb579628c66716fa6bfcf5058f6b1.zip
Qt-c0e517977eefb579628c66716fa6bfcf5058f6b1.tar.gz
Qt-c0e517977eefb579628c66716fa6bfcf5058f6b1.tar.bz2
Added method to return top of the stack
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qsoftkeystack.cpp11
-rw-r--r--src/gui/widgets/qsoftkeystack.h1
-rw-r--r--src/gui/widgets/qsoftkeystack_p.h3
3 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/widgets/qsoftkeystack.cpp b/src/gui/widgets/qsoftkeystack.cpp
index 61f7b64..fc6e107 100644
--- a/src/gui/widgets/qsoftkeystack.cpp
+++ b/src/gui/widgets/qsoftkeystack.cpp
@@ -75,6 +75,11 @@ void QSoftKeyStackPrivate::pop()
setNativeSoftKeys();
}
+const QSoftkeySet& QSoftKeyStackPrivate::top()
+{
+ return softKeyStack.top();
+}
+
QSoftKeyStack::QSoftKeyStack(QWidget *parent)
: QObject(*new QSoftKeyStackPrivate, parent)
{
@@ -103,6 +108,12 @@ void QSoftKeyStack::pop()
d->pop();
}
+const QSoftkeySet& QSoftKeyStack::top()
+{
+ Q_D(QSoftKeyStack);
+ return d->top();
+}
+
void QSoftKeyStack::handleFocusChanged(QWidget *old, QWidget *now)
{
if (!now)
diff --git a/src/gui/widgets/qsoftkeystack.h b/src/gui/widgets/qsoftkeystack.h
index d126b32..c9a05c3 100644
--- a/src/gui/widgets/qsoftkeystack.h
+++ b/src/gui/widgets/qsoftkeystack.h
@@ -65,6 +65,7 @@ public:
void push(QSoftKeyAction *softKey);
void push(const QList<QSoftKeyAction*> &softkeys);
void pop();
+ const QSoftkeySet& top();
void handleSoftKeyPress(int command);
diff --git a/src/gui/widgets/qsoftkeystack_p.h b/src/gui/widgets/qsoftkeystack_p.h
index 77ae553..06e9253 100644
--- a/src/gui/widgets/qsoftkeystack_p.h
+++ b/src/gui/widgets/qsoftkeystack_p.h
@@ -77,7 +77,8 @@ public:
void push(QSoftKeyAction *softKey);
void push(const QList<QSoftKeyAction*> &softKeys);
void pop();
-
+ const QSoftkeySet& top();
+
private:
void mapSoftKeys(const QSoftkeySet &top);
void setNativeSoftKeys();