Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konqueror / settings / kio / useragentdlg.h
blob555b928ea9c913c7f488782aced207e8fdf73226
1 /*
2 Original Authors:
3 Copyright (c) Kalle Dalheimer <kalle@kde.org> 1997
4 Copyright (c) David Faure <faure@kde.org> 1998
5 Copyright (c) Dirk Mueller <mueller@kde.org> 2000
7 Completely re-written by:
8 Copyright (C) 2000- Dawit Alemayehu <adawit@kde.org>
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU General Public License (GPL)
12 version 2 as published by the Free Software Foundation.
14 This library is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Library General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this library; see the file COPYING.LIB. If not, write to
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 Boston, MA 02110-1301, USA.
25 #ifndef _USERAGENTDLG_H
26 #define _USERAGENTDLG_H
28 #include <kcmodule.h>
29 #include "ui_useragentdlg.h"
31 class KConfig;
32 class UserAgentInfo;
33 class QTreeWidgetItem;
35 class UserAgentDlg : public KCModule
37 Q_OBJECT
39 public:
40 UserAgentDlg(QWidget *parent, const QVariantList &args);
41 ~UserAgentDlg();
43 virtual void load();
44 virtual void save();
45 virtual void defaults();
46 QString quickHelp() const;
48 private Q_SLOTS:
49 void updateButtons();
51 void on_newButton_clicked();
52 void on_changeButton_clicked();
53 void on_deleteButton_clicked();
54 void on_deleteAllButton_clicked();
56 void on_sendUACheckBox_clicked();
57 void on_osNameCheckBox_clicked();
58 void on_osVersionCheckBox_clicked();
59 void on_platformCheckBox_clicked();
60 void on_processorTypeCheckBox_clicked();
61 void on_languageCheckBox_clicked();
62 void on_sitePolicyTreeWidget_itemSelectionChanged();
63 void on_sitePolicyTreeWidget_itemDoubleClicked(QTreeWidgetItem*, int);
65 private:
66 void changeDefaultUAModifiers();
67 void configChanged(bool enable = true);
68 bool handleDuplicate( const QString&, const QString&, const QString& );
70 enum
72 SHOW_OS = 0,
73 SHOW_OS_VERSION,
74 SHOW_PLATFORM,
75 SHOW_MACHINE,
76 SHOW_LANGUAGE
79 // Useragent modifiers...
80 QString m_ua_keys;
82 // Fake user-agent modifiers...
83 UserAgentInfo* m_userAgentInfo;
84 KConfig *m_config;
86 // Interface...
87 Ui::UserAgentUI ui;
90 #endif