aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-24 12:22:28 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-06-24 12:22:28 -0400
commitf59e06eaf20e69ee5ab3c7b5cc2734463b37dae4 (patch)
treedae6182ab3a51800109576985e13058e7609a89c /libqmenumodel
parenta74628a3db43bdf8c0f350ebcee28c99bd494a91 (diff)
downloadqmenumodel-f59e06eaf20e69ee5ab3c7b5cc2734463b37dae4.tar.gz
qmenumodel-f59e06eaf20e69ee5ab3c7b5cc2734463b37dae4.tar.bz2
qmenumodel-f59e06eaf20e69ee5ab3c7b5cc2734463b37dae4.zip
unitymenumodel: move role enum into .cpp
No need for that to be public.
Diffstat (limited to 'libqmenumodel')
-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();