diff options
author | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-05-26 12:40:36 (GMT) |
---|---|---|
committer | Markku Luukkainen <markku.luukkainen@digia.com> | 2009-05-26 12:40:36 (GMT) |
commit | ba552dae4daab3db8596e20f8491393e4479e7b0 (patch) | |
tree | c0b28b785fc553f1332f80192ce4f6dbc6c0082b /src/gui/widgets | |
parent | 62743959699d78a63057e98b43fe3c79ace87234 (diff) | |
download | Qt-ba552dae4daab3db8596e20f8491393e4479e7b0.zip Qt-ba552dae4daab3db8596e20f8491393e4479e7b0.tar.gz Qt-ba552dae4daab3db8596e20f8491393e4479e7b0.tar.bz2 |
Added method isEmpty() to interface. This can be used to query
if stack actually has any items in it
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qsoftkeystack.cpp | 11 | ||||
-rw-r--r-- | src/gui/widgets/qsoftkeystack.h | 1 | ||||
-rw-r--r-- | src/gui/widgets/qsoftkeystack_p.h | 1 |
3 files changed, 13 insertions, 0 deletions
diff --git a/src/gui/widgets/qsoftkeystack.cpp b/src/gui/widgets/qsoftkeystack.cpp index a7fa3f1..0054c6b 100644 --- a/src/gui/widgets/qsoftkeystack.cpp +++ b/src/gui/widgets/qsoftkeystack.cpp @@ -115,6 +115,11 @@ const QSoftkeySet& QSoftKeyStackPrivate::top() return softKeyStack.top(); } +bool QSoftKeyStackPrivate::isEmpty() +{ + return softKeyStack.isEmpty(); +} + QSoftKeyStack::QSoftKeyStack(QWidget *parent) : QObject(*new QSoftKeyStackPrivate, parent) { @@ -161,6 +166,12 @@ const QSoftkeySet& QSoftKeyStack::top() return d->top(); } +bool QSoftKeyStack::isEmpty() +{ + Q_D(QSoftKeyStack); + return d->isEmpty(); +} + void QSoftKeyStack::handleFocusChanged(QWidget *old, QWidget *now) { if (!now) diff --git a/src/gui/widgets/qsoftkeystack.h b/src/gui/widgets/qsoftkeystack.h index 10d9153..2606bd1 100644 --- a/src/gui/widgets/qsoftkeystack.h +++ b/src/gui/widgets/qsoftkeystack.h @@ -69,6 +69,7 @@ public: void popandPush(QSoftKeyAction *softKey); void popandPush(const QList<QSoftKeyAction*> &softkeys); const QSoftkeySet& top(); + bool isEmpty(); void handleSoftKeyPress(int command); diff --git a/src/gui/widgets/qsoftkeystack_p.h b/src/gui/widgets/qsoftkeystack_p.h index 57475bd..b698178 100644 --- a/src/gui/widgets/qsoftkeystack_p.h +++ b/src/gui/widgets/qsoftkeystack_p.h @@ -80,6 +80,7 @@ public: void popandPush(QSoftKeyAction *softKey); void popandPush(const QList<QSoftKeyAction*> &softkeys); const QSoftkeySet& top(); + bool isEmpty(); void handleSoftKeyPress(int command); private: |