From c0e517977eefb579628c66716fa6bfcf5058f6b1 Mon Sep 17 00:00:00 2001 From: Markku Luukkainen Date: Fri, 15 May 2009 12:05:37 +0200 Subject: Added method to return top of the stack --- src/gui/widgets/qsoftkeystack.cpp | 11 +++++++++++ src/gui/widgets/qsoftkeystack.h | 1 + src/gui/widgets/qsoftkeystack_p.h | 3 ++- 3 files changed, 14 insertions(+), 1 deletion(-) 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 &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 &softKeys); void pop(); - + const QSoftkeySet& top(); + private: void mapSoftKeys(const QSoftkeySet &top); void setNativeSoftKeys(); -- cgit v0.12