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
, const KActionCollection
*actions
, const 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
, const QString
&text
, const QString
&value
, bool checked
);
58 bool entryVisible(const QString
&id
);
59 void setEntryVisible(const QString
&id
, bool visible
);
63 ServiceModel
*m_serviceModel
;
64 QSortFilterProxyModel
*m_sortModel
;
65 QListView
*m_listView
;
66 QLineEdit
*m_searchLineEdit
;
67 QStringList m_enabledVcsPlugins
;
68 const KActionCollection
*m_actions
;
69 const QStringList m_actionIds
;