diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-06-24 12:22:28 -0400 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2013-06-24 12:22:28 -0400 |
commit | f59e06eaf20e69ee5ab3c7b5cc2734463b37dae4 (patch) | |
tree | dae6182ab3a51800109576985e13058e7609a89c | |
parent | a74628a3db43bdf8c0f350ebcee28c99bd494a91 (diff) | |
download | qmenumodel-f59e06eaf20e69ee5ab3c7b5cc2734463b37dae4.tar.gz qmenumodel-f59e06eaf20e69ee5ab3c7b5cc2734463b37dae4.tar.bz2 qmenumodel-f59e06eaf20e69ee5ab3c7b5cc2734463b37dae4.zip |
unitymenumodel: move role enum into .cpp
No need for that to be public.
-rw-r--r-- | libqmenumodel/src/unitymenumodel.cpp | 13 | ||||
-rw-r--r-- | libqmenumodel/src/unitymenumodel.h | 8 |
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(); |