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
,
29 const KActionCollection
* actions
,
30 const QStringList
& actionIds
);
31 ~ContextMenuSettingsPage() override
;
33 /** @see SettingsPageBase::applySettings() */
34 void applySettings() override
;
36 /** @see SettingsPageBase::restoreDefaults() */
37 void restoreDefaults() override
;
40 void showEvent(QShowEvent
* event
) override
;
44 * Loads locally installed services.
50 * Loads installed version control systems.
52 void loadVersionControlSystems();
54 bool isInServicesList(const QString
&service
) const;
57 * Adds a row to the model of m_listView.
59 void addRow(const QString
&icon
,
63 bool entryVisible(const QString
& id
);
64 void setEntryVisible(const QString
& id
, bool visible
);
68 ServiceModel
*m_serviceModel
;
69 QSortFilterProxyModel
*m_sortModel
;
70 QListView
* m_listView
;
71 QLineEdit
*m_searchLineEdit
;
72 QStringList m_enabledVcsPlugins
;
73 const KActionCollection
* m_actions
;
74 const QStringList m_actionIds
;