aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/unitymenuaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libqmenumodel/src/unitymenuaction.cpp')
-rw-r--r--libqmenumodel/src/unitymenuaction.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/libqmenumodel/src/unitymenuaction.cpp b/libqmenumodel/src/unitymenuaction.cpp
index b41fd3e..46edf16 100644
--- a/libqmenumodel/src/unitymenuaction.cpp
+++ b/libqmenumodel/src/unitymenuaction.cpp
@@ -26,7 +26,8 @@ UnityMenuAction::UnityMenuAction(QObject* parent)
: QObject(parent),
m_valid(false),
m_enabled(false),
- m_model(NULL)
+ m_model(NULL),
+ m_index(-1)
{
}
@@ -106,6 +107,19 @@ void UnityMenuAction::setValid(bool valid)
}
}
+int UnityMenuAction::index() const
+{
+ return m_index;
+}
+
+void UnityMenuAction::setIndex(int i)
+{
+ if (i != m_index) {
+ m_index = i;
+ Q_EMIT indexChanged(m_index);
+ }
+}
+
void UnityMenuAction::registerAction()
{
if (m_model) {