]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/services/servicessettingspage.h
Use a faster way to determine kio-stash isn't installed
[dolphin.git] / src / settings / services / servicessettingspage.h
1 /*
2 * SPDX-FileCopyrightText: 2009-2010 Peter Penz <peter.penz19@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 #ifndef SERVICESSETTINGSPAGE_H
7 #define SERVICESSETTINGSPAGE_H
8
9 #include "settings/settingspagebase.h"
10
11 #include <QString>
12
13 class QListView;
14 class QSortFilterProxyModel;
15 class ServiceModel;
16 class QLineEdit;
17
18 /**
19 * @brief Page for the 'Services' settings of the Dolphin settings dialog.
20 */
21 class ServicesSettingsPage : public SettingsPageBase
22 {
23 Q_OBJECT
24
25 public:
26 explicit ServicesSettingsPage(QWidget* parent);
27 ~ServicesSettingsPage() override;
28
29 /** @see SettingsPageBase::applySettings() */
30 void applySettings() override;
31
32 /** @see SettingsPageBase::restoreDefaults() */
33 void restoreDefaults() override;
34
35 protected:
36 void showEvent(QShowEvent* event) override;
37
38 private slots:
39 /**
40 * Loads locally installed services.
41 */
42 void loadServices();
43
44 private:
45 /**
46 * Loads installed version control systems.
47 */
48 void loadVersionControlSystems();
49
50 bool isInServicesList(const QString &service) const;
51
52 /**
53 * Adds a row to the model of m_listView.
54 */
55 void addRow(const QString &icon,
56 const QString &text,
57 const QString &value,
58 bool checked);
59
60 private:
61 bool m_initialized;
62 ServiceModel *m_serviceModel;
63 QSortFilterProxyModel *m_sortModel;
64 QListView* m_listView;
65 QLineEdit *m_searchLineEdit;
66 QStringList m_enabledVcsPlugins;
67 };
68
69 #endif