aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libqmenumodel/src/unitymenumodel.cpp13
-rw-r--r--libqmenumodel/src/unitymenumodel.h8
2 files changed, 10 insertions, 11 deletions
diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp
index 2f20a8b..f370832 100644
--- a/libqmenumodel/src/unitymenumodel.cpp
+++ b/libqmenumodel/src/unitymenumodel.cpp
@@ -26,6 +26,13 @@ extern "C" {
G_DEFINE_QUARK (UNITY_MENU_MODEL, unity_menu_model)
G_DEFINE_QUARK (UNITY_SUBMENU_MODEL, unity_submenu_model)
+enum MenuRoles {
+ ActionRole = Qt::DisplayRole + 1,
+ LabelRole,
+ SensitiveRole,
+ IsSeparatorRole
+};
+
class UnityMenuModelPrivate
{
public:
@@ -310,13 +317,13 @@ QVariant UnityMenuModel::data(const QModelIndex &index, int role) const
item = (GtkMenuTrackerItem *) g_sequence_get (g_sequence_get_iter_at_pos (priv->items, index.row()));
switch (role) {
- case UnityMenuModel::LabelRole:
+ case LabelRole:
return gtk_menu_tracker_item_get_label (item);
- case UnityMenuModel::SensitiveRole:
+ case SensitiveRole:
return gtk_menu_tracker_item_get_sensitive (item);
- case UnityMenuModel::IsSeparatorRole:
+ case IsSeparatorRole:
return gtk_menu_tracker_item_get_is_separator (item);
default:
diff --git a/libqmenumodel/src/unitymenumodel.h b/libqmenumodel/src/unitymenumodel.h
index cdfceac..27a9fff 100644
--- a/libqmenumodel/src/unitymenumodel.h
+++ b/libqmenumodel/src/unitymenumodel.h
@@ -29,14 +29,6 @@ class UnityMenuModel: public QAbstractListModel
Q_PROPERTY(QByteArray menuObjectPath READ menuObjectPath WRITE setMenuObjectPath NOTIFY menuObjectPathChanged)
public:
- enum MenuRoles {
- ActionRole = Qt::DisplayRole + 1,
- LabelRole,
- SensitiveRole,
- IsSeparatorRole
- };
-
-public:
UnityMenuModel(QObject *parent = NULL);
virtual ~UnityMenuModel();