X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d93d198db6eef9186177aa5a918b300a6b749627..2b58f0457e470b1e4f1ed2d947faca32bf982a49:/src/settings/services/servicessettingspage.h diff --git a/src/settings/services/servicessettingspage.h b/src/settings/services/servicessettingspage.h index cb526460f..8f507407b 100644 --- a/src/settings/services/servicessettingspage.h +++ b/src/settings/services/servicessettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2010 by Peter Penz * + * Copyright (C) 2009-2010 by Peter Penz * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -19,14 +19,14 @@ #ifndef SERVICESSETTINGSPAGE_H #define SERVICESSETTINGSPAGE_H -#include +#include "settings/settingspagebase.h" -#include #include -class QCheckBox; -class QGroupBox; -class QListWidget; +class QListView; +class QSortFilterProxyModel; +class ServiceModel; +class QLineEdit; /** * @brief Page for the 'Services' settings of the Dolphin settings dialog. @@ -36,17 +36,17 @@ class ServicesSettingsPage : public SettingsPageBase Q_OBJECT public: - ServicesSettingsPage(QWidget* parent); - virtual ~ServicesSettingsPage(); + explicit ServicesSettingsPage(QWidget* parent); + ~ServicesSettingsPage() override; /** @see SettingsPageBase::applySettings() */ - virtual void applySettings(); + void applySettings() override; /** @see SettingsPageBase::restoreDefaults() */ - virtual void restoreDefaults(); + void restoreDefaults() override; protected: - virtual void showEvent(QShowEvent* event); + void showEvent(QShowEvent* event) override; private slots: /** @@ -54,18 +54,28 @@ private slots: */ void loadServices(); +private: /** * Loads installed version control systems. */ void loadVersionControlSystems(); - bool isInServicesList(const QString& service) const; + bool isInServicesList(const QString &service) const; + + /** + * Adds a row to the model of m_listView. + */ + void addRow(const QString &icon, + const QString &text, + const QString &value, + bool checked); private: bool m_initialized; - QListWidget* m_servicesList; - QGroupBox* m_vcsGroupBox; - QMap m_vcsPluginsMap; + ServiceModel *m_serviceModel; + QSortFilterProxyModel *m_sortModel; + QListView* m_listView; + QLineEdit *m_searchLineEdit; QStringList m_enabledVcsPlugins; };