File indexing completed on 2024-05-12 11:54:36
0001 /* 0002 SPDX-FileCopyrightText: 2000 Yves Arrouye <yves@realnames.com> 0003 SPDX-FileCopyrightText: 2002, 2003 Dawit Alemayehu <adawit@kde.org> 0004 SPDX-FileCopyrightText: 2009 Nick Shaforostoff <shaforostoff@kde.ru> 0005 0006 SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef IKWSOPTS_H 0010 #define IKWSOPTS_H 0011 0012 #include <QLayout> 0013 #include <QTabWidget> 0014 0015 #include <KCModule> 0016 0017 #include "searchproviderregistry.h" 0018 #include "ui_ikwsopts_ui.h" 0019 0020 class SearchProvider; 0021 class ProvidersModel; 0022 0023 class FilterOptions : public KCModule 0024 { 0025 Q_OBJECT 0026 0027 public: 0028 explicit FilterOptions(QWidget *parent = nullptr, const QVariantList &args = {}); 0029 0030 void load() override; 0031 void save() override; 0032 void defaults() override; 0033 QString quickHelp() const override; 0034 0035 private Q_SLOTS: 0036 void updateSearchProviderEditingButons(); 0037 void addSearchProvider(); 0038 void changeSearchProvider(); 0039 void deleteSearchProvider(); 0040 0041 private: 0042 void setDelimiter(char); 0043 char delimiter(); 0044 void setDefaultEngine(int); 0045 0046 // The names of the providers that the user deleted, 0047 // these are marked as deleted in the user's homedirectory 0048 // on save if a global service file exists for it. 0049 QStringList m_deletedProviders; 0050 ProvidersModel *m_providersModel; 0051 SearchProviderRegistry m_registry; 0052 0053 Ui::FilterOptionsUI m_dlg; 0054 }; 0055 0056 #endif