]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/contextmenu/contextmenusettingspage.h
Move "Show in Groups" toggle action into Sort menu
[dolphin.git] / src / settings / contextmenu / contextmenusettingspage.h
index 3825e6f867d56e242d5d7e5d65ee4dd59a15155a..6bdda1eafa37419ee088febe060d28f25ad5af78 100644 (file)
@@ -8,6 +8,8 @@
 
 #include "settings/settingspagebase.h"
 
+#include <KActionCollection>
+
 #include <QString>
 
 class QListView;
@@ -23,7 +25,7 @@ class ContextMenuSettingsPage : public SettingsPageBase
     Q_OBJECT
 
 public:
-    explicit ContextMenuSettingsPage(QWidget* parent);
+    explicit ContextMenuSettingsPage(QWidget *parent, const KActionCollection *actions, const QStringList &actionIds);
     ~ContextMenuSettingsPage() override;
 
     /** @see SettingsPageBase::applySettings() */
@@ -33,9 +35,9 @@ public:
     void restoreDefaults() override;
 
 protected:
-    void showEvent(QShowEventevent) override;
+    void showEvent(QShowEvent *event) override;
 
-private slots:
+private Q_SLOTS:
     /**
      * Loads locally installed services.
      */
@@ -52,18 +54,19 @@ private:
     /**
      * Adds a row to the model of m_listView.
      */
-    void addRow(const QString &icon,
-                const QString &text,
-                const QString &value,
-                bool checked);
+    void addRow(const QString &icon, const QString &text, const QString &value, bool checked);
+    bool entryVisible(const QString &id);
+    void setEntryVisible(const QString &id, bool visible);
 
 private:
     bool m_initialized;
     ServiceModel *m_serviceModel;
     QSortFilterProxyModel *m_sortModel;
-    QListViewm_listView;
+    QListView *m_listView;
     QLineEdit *m_searchLineEdit;
     QStringList m_enabledVcsPlugins;
+    const KActionCollection *m_actions;
+    const QStringList m_actionIds;
 };
 
 #endif