Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konqueror / settings / konqhtml / jsopts.h
blob3a975d400f0555d62ecf2b969e2719bf740bda88
1 //-----------------------------------------------------------------------------
2 //
3 // HTML Options
4 //
5 // (c) Martin R. Jones 1996
6 //
7 // Port to KControl
8 // (c) Torben Weis 1998
10 #ifndef JSOPTS_H
11 #define JSOPTS_H
13 #include <kcmodule.h>
15 #include "domainlistview.h"
16 #include "jspolicies.h"
18 class QCheckBox;
20 class PolicyDialog;
22 class KJavaScriptOptions;
24 /** JavaScript-specific enhancements to the domain list view
26 class JSDomainListView : public DomainListView {
27 Q_OBJECT
28 public:
29 JSDomainListView(KSharedConfig::Ptr config,const QString &group,KJavaScriptOptions *opt,
30 QWidget *parent);
31 virtual ~JSDomainListView();
33 /** remnant for importing pre KDE 3.2 settings
35 void updateDomainListLegacy(const QStringList &domainConfig);
37 protected:
38 virtual JSPolicies *createPolicies();
39 virtual JSPolicies *copyPolicies(Policies *pol);
40 virtual void setupPolicyDlg(PushButton trigger,PolicyDialog &pDlg,
41 Policies *copy);
43 private:
44 QString group;
45 KJavaScriptOptions *options;
48 class KJavaScriptOptions : public KCModule
50 Q_OBJECT
51 public:
52 KJavaScriptOptions( KSharedConfig::Ptr config, const QString &group, const KComponentData &componentData, QWidget* parent );
54 virtual void load();
55 virtual void save();
56 virtual void defaults();
58 bool _removeJavaScriptDomainAdvice;
60 private Q_SLOTS:
61 void slotChangeJSEnabled();
63 private:
65 KSharedConfig::Ptr m_pConfig;
66 QString m_groupname;
67 JSPolicies js_global_policies;
68 QCheckBox *enableJavaScriptGloballyCB;
69 QCheckBox *reportErrorsCB;
70 QCheckBox *jsDebugWindow;
71 JSPoliciesFrame *js_policies_frame;
72 bool _removeECMADomainSettings;
74 JSDomainListView* domainSpecific;
76 friend class JSDomainListView;
79 #endif // JSOPTS_H