summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-26 12:40:36 (GMT)
committerMarkku Luukkainen <markku.luukkainen@digia.com>2009-05-26 12:40:36 (GMT)
commitba552dae4daab3db8596e20f8491393e4479e7b0 (patch)
treec0b28b785fc553f1332f80192ce4f6dbc6c0082b /src/gui/widgets
parent62743959699d78a63057e98b43fe3c79ace87234 (diff)
downloadQt-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.cpp11
-rw-r--r--src/gui/widgets/qsoftkeystack.h1
-rw-r--r--src/gui/widgets/qsoftkeystack_p.h1
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: