Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / konqueror / settings / konqhtml / javaopts.h
blob34ad36507431acdc2feeed54ed84b52684d67426
1 /*
2 * Copyright (c) Martin R. Jones 1996
3 * HTML Options
4 * Copyright (c) Torben Weis 1998
5 * Port to KControl
6 * Copyright (c) Daniel Molkentin 2000
7 * Redesign and cleanup
9 */
11 #ifndef JAVAOPTS_H
12 #define JAVAOPTS_H
14 #include <kcmodule.h>
16 #include "domainlistview.h"
17 #include "policies.h"
19 class KUrlRequester;
20 class KIntNumInput;
22 class QCheckBox;
23 class QLineEdit;
25 class KJavaOptions;
27 /** policies with java-specific constructor
29 class JavaPolicies : public Policies {
30 public:
31 /**
32 * constructor
33 * @param config configuration to initialize this instance from
34 * @param group config group to use if this instance contains the global
35 * policies (global == true)
36 * @param global true if this instance contains the global policy settings,
37 * false if this instance contains policies specific for a domain.
38 * @param domain name of the domain this instance is used to configure the
39 * policies for (case insensitive, ignored if global == true)
41 JavaPolicies(KSharedConfig::Ptr config, const QString &group, bool global,
42 const QString &domain = QString());
44 /** empty constructur to make QMap happy
45 * don't use for constructing a policies instance.
46 * @internal
48 //JavaPolicies();
50 virtual ~JavaPolicies();
53 /** Java-specific enhancements to the domain list view
55 class JavaDomainListView : public DomainListView {
56 Q_OBJECT
57 public:
58 JavaDomainListView(KSharedConfig::Ptr config,const QString &group,KJavaOptions *opt,
59 QWidget *parent);
60 virtual ~JavaDomainListView();
62 /** remnant for importing pre KDE 3.2 settings
64 void updateDomainListLegacy(const QStringList &domainConfig);
66 protected:
67 virtual JavaPolicies *createPolicies();
68 virtual JavaPolicies *copyPolicies(Policies *pol);
69 virtual void setupPolicyDlg(PushButton trigger,PolicyDialog &pDlg,
70 Policies *copy);
72 private:
73 QString group;
74 KJavaOptions *options;
77 class KJavaOptions : public KCModule
79 Q_OBJECT
81 public:
82 KJavaOptions( KSharedConfig::Ptr config, const QString &group, const KComponentData &componentData, QWidget* parent );
84 virtual void load();
85 virtual void save();
86 virtual void defaults();
88 bool _removeJavaScriptDomainAdvice;
90 private Q_SLOTS:
91 void slotChanged();
92 void toggleJavaControls();
94 private:
96 KSharedConfig::Ptr m_pConfig;
97 QString m_groupname;
98 JavaPolicies java_global_policies;
100 QCheckBox* enableJavaGloballyCB;
101 QCheckBox* javaSecurityManagerCB;
102 QCheckBox* useKioCB;
103 QCheckBox* enableShutdownCB;
104 KIntNumInput* serverTimeoutSB;
105 QLineEdit* addArgED;
106 KUrlRequester* pathED;
107 bool _removeJavaDomainSettings;
109 JavaDomainListView *domainSpecific;
111 friend class JavaDomainListView;
114 #endif // HTML_OPTIONS_H