aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/unitymenuaction.h
diff options
context:
space:
mode:
authorNick Dedekind <nicholas.dedekind@gmail.com>2013-08-05 14:29:26 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-08-05 14:29:26 +0200
commit248ae8dd5cd8320c82b4f85d0d7a3aba43a207c1 (patch)
treebcc04f481df7fc018c7b415272e89cbc23145eb1 /libqmenumodel/src/unitymenuaction.h
parentd1c96de04570d8365c2ab2fde597ccd21c7a3dc2 (diff)
parent27e7c3bf6ee276c5956331f292a72a5dde5869ed (diff)
downloadqmenumodel-248ae8dd5cd8320c82b4f85d0d7a3aba43a207c1.tar.gz
qmenumodel-248ae8dd5cd8320c82b4f85d0d7a3aba43a207c1.tar.bz2
qmenumodel-248ae8dd5cd8320c82b4f85d0d7a3aba43a207c1.zip
Allow changing action state
Diffstat (limited to 'libqmenumodel/src/unitymenuaction.h')
-rw-r--r--libqmenumodel/src/unitymenuaction.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/libqmenumodel/src/unitymenuaction.h b/libqmenumodel/src/unitymenuaction.h
index 26be02b..ef844fd 100644
--- a/libqmenumodel/src/unitymenuaction.h
+++ b/libqmenumodel/src/unitymenuaction.h
@@ -29,7 +29,8 @@ class UnityMenuModel;
class UnityMenuAction : public QObject
{
Q_OBJECT
- Q_PROPERTY(QVariant state READ state WRITE updateState NOTIFY stateChanged)
+ Q_PROPERTY(QVariant name READ name NOTIFY nameChanged)
+ Q_PROPERTY(QVariant state READ state WRITE changeState NOTIFY stateChanged)
Q_PROPERTY(int index READ index WRITE setIndex NOTIFY indexChanged)
Q_PROPERTY(UnityMenuModel* model READ model WRITE setModel NOTIFY modelChanged)
public:
@@ -41,10 +42,16 @@ public:
UnityMenuModel* model() const;
void setModel(UnityMenuModel* model);
+ virtual QString name() const = 0;
+
virtual QVariant state() const = 0;
- Q_INVOKABLE virtual void updateState(const QVariant& = QVariant()) = 0;
+
+ Q_INVOKABLE virtual void activate() = 0;
+
+ Q_INVOKABLE virtual void changeState(const QVariant& vvalue) = 0;
Q_SIGNALS:
+ void nameChanged();
void stateChanged();
void indexChanged(int index);
void modelChanged(UnityMenuModel* model);