diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-09-02 18:35:00 +0200 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-09-02 18:35:00 +0200 |
commit | 2641328dca5a7db154e5dbca7d9904d3c321974e (patch) | |
tree | 3f92b3b800ad4d3779da1d3048cb9f45feccc7ec /libqmenumodel/src/unitymenumodel.h | |
parent | f58b7c76605623a171d2e6eba82cdbf7a788657d (diff) | |
download | qmenumodel-2641328dca5a7db154e5dbca7d9904d3c321974e.tar.gz qmenumodel-2641328dca5a7db154e5dbca7d9904d3c321974e.tar.bz2 qmenumodel-2641328dca5a7db154e5dbca7d9904d3c321974e.zip |
Add UnityMenuModel::getAction
A method that returns a UnityMenuAction for a menu item. It must be used if the
action name came from an attribute on the menu item so that the menu item's
namespace can be prepended to the action name.
Diffstat (limited to 'libqmenumodel/src/unitymenumodel.h')
-rw-r--r-- | libqmenumodel/src/unitymenumodel.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libqmenumodel/src/unitymenumodel.h b/libqmenumodel/src/unitymenumodel.h index a229f09..1391b27 100644 --- a/libqmenumodel/src/unitymenumodel.h +++ b/libqmenumodel/src/unitymenumodel.h @@ -58,6 +58,7 @@ public: Q_INVOKABLE QObject * submenu(int position, QQmlComponent* actionStateParser = NULL); Q_INVOKABLE bool loadExtendedAttributes(int position, const QVariantMap &schema); Q_INVOKABLE QVariant get(int row, const QByteArray &role); + Q_INVOKABLE UnityMenuAction * getAction(int row, const QByteArray &name); Q_INVOKABLE void activate(int index, const QVariant& parameter = QVariant()); Q_INVOKABLE void changeState(int index, const QVariant& parameter); |