2 * SPDX-FileCopyrightText: 2009-2010 Peter Penz <peter.penz19@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
6 #ifndef CONTEXTMENUSETTINGSPAGE_H
7 #define CONTEXTMENUSETTINGSPAGE_H
9 #include "settings/settingspagebase.h"
11 #include <KActionCollection>
16 class QSortFilterProxyModel
;
21 * @brief Configurations for services in the context menu.
23 class ContextMenuSettingsPage
: public SettingsPageBase
28 explicit ContextMenuSettingsPage(QWidget
* parent
, KActionCollection
* actions
, QStringList actionIds
);
29 ~ContextMenuSettingsPage() override
;
31 /** @see SettingsPageBase::applySettings() */
32 void applySettings() override
;
34 /** @see SettingsPageBase::restoreDefaults() */
35 void restoreDefaults() override
;
38 void showEvent(QShowEvent
* event
) override
;
42 * Loads locally installed services.
48 * Loads installed version control systems.
50 void loadVersionControlSystems();
52 bool isInServicesList(const QString
&service
) const;
55 * Adds a row to the model of m_listView.
57 void addRow(const QString
&icon
,
61 bool entryVisible(const QString
& id
);
62 void setEntryVisible(const QString
& id
, bool visible
);
66 ServiceModel
*m_serviceModel
;
67 QSortFilterProxyModel
*m_sortModel
;
68 QListView
* m_listView
;
69 QLineEdit
*m_searchLineEdit
;
70 QStringList m_enabledVcsPlugins
;
71 KActionCollection
* m_actions
;
72 QStringList m_actionIds
;