Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / runtime / kurifilter-plugins / ikws / ikwsopts.h
blob5172183aae2992cd9ff3e6316249a72a4744fe1a
1 /*
2 * Copyright (c) 2000 Yves Arrouye <yves@realnames.com>
3 * Copyright (c) 2002, 2003 Dawit Alemayehu <adawit@kde.org>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef __IKWSOPTS_H___
21 #define __IKWSOPTS_H___
23 #include <QLayout>
24 #include <QTabWidget>
26 #include <kcmodule.h>
27 #include <kservice.h>
28 #include "ui_ikwsopts_ui.h"
30 class SearchProvider;
31 class SearchProviderItem;
33 class FilterOptionsUI : public QWidget, public Ui::FilterOptionsUI
35 public:
36 FilterOptionsUI( QWidget *parent ) : QWidget( parent ) {
37 setupUi( this );
42 class FilterOptions : public KCModule
44 Q_OBJECT
46 public:
47 explicit FilterOptions(const KComponentData &componentData, QWidget *parent = 0);
49 void load();
50 void save();
51 void defaults();
52 QString quickHelp() const;
54 protected Q_SLOTS:
55 void configChanged();
56 void checkFavoritesChanged();
58 void setWebShortcutState();
60 void addSearchProvider();
61 void changeSearchProvider();
62 void deleteSearchProvider();
63 void updateSearchProvider();
65 private:
66 SearchProviderItem *displaySearchProvider(SearchProvider *p, bool fallback = false);
68 void setDelimiter (char);
69 char delimiter ();
71 // The names of the providers that the user deleted,
72 // these are marked as deleted in the user's homedirectory
73 // on save if a global service file exists for it.
74 QStringList m_deletedProviders;
75 QMap <QString, QString> m_defaultEngineMap;
76 QStringList m_favoriteEngines;
78 FilterOptionsUI* m_dlg;
81 #endif