3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
5
* Copyright 1999-2006 by the BibleTime developers.
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
12
#ifndef COPTIONSDIALOG_H
13
#define COPTIONSDIALOG_H
15
#include "cprofilemgr.h"
16
#include "cbtconfig.h"
17
#include "util/cpointers.h"
22
#include <qguardedptr.h>
30
#include <kdialogbase.h>
31
#include <kfontdialog.h>
33
#include <kcolorbutton.h>
47
class KActionCollection;
50
* The optionsdialog of BibleTime
51
* @author The BibleTime Team
53
class COptionsDialog : public KDialogBase, public CPointers {
57
COptionsDialog(QWidget *parent, const char *name, KActionCollection* actionCollection);
58
virtual ~COptionsDialog();
68
/** Opens the page which contaisn the given part ID. */
69
const bool showPart( COptionsDialog::Parts ID );
73
struct StartupSettings {
79
struct SwordSettings {
80
QComboBox* standardBible;
81
QComboBox* standardCommentary;
82
QComboBox* standardLexicon;
83
QComboBox* standardDailyDevotional;
84
QComboBox* standardHebrewStrong;
85
QComboBox* standardGreekStrong;
86
QComboBox* standardHebrewMorph;
87
QComboBox* standardGreekMorph;
88
QCheckBox* lineBreaks;
89
QCheckBox* verseNumbers;
91
QCheckBox* hebrewPoints;
92
QCheckBox* hebrewCantillation;
93
QCheckBox* morphSegmentation;
94
QCheckBox* greekAccents;
95
QCheckBox* textualVariants;
96
QCheckBox* scriptureReferences;
98
swords; // not: sword instead of sword -> namespace error
101
QComboBox* typeChooser;
102
QWidgetStack* keyChooserStack;
105
QGuardedPtr<KKeyChooser> keyChooser;
106
KActionCollection* actionCollection;
111
actionCollection = 0;
113
WindowType(const QString& newTitle) {
117
actionCollection = 0;
121
WindowType application;
124
WindowType commentary;
130
struct DisplayStyleSettings {
131
QComboBox* styleChooser;
132
KHTMLPart* stylePreview;
136
struct FontSettings {
137
QComboBox* swordLocaleCombo;
138
KFontChooser* fontChooser;
140
QCheckBox* useOwnFontBox;
141
//the pair os to check whether the standard font (bool == false) or whether an own font should be used (true)
142
QMap<QString,CBTConfig::FontSettingsPair> fontMap;
148
protected slots: // Protected slots
150
* Called when a new font in the fonts page was selected.
152
void newDisplayWindowFontSelected(const QFont &);
154
* Called when the combobox contents is changed
156
void newDisplayWindowFontAreaSelected(const QString&);
158
* Called if the OK button was clicked
162
* Called if the Apply button was clicked
163
* commented out for the time being. ck
167
* This slot is called when the "Use own font for language" bo was clicked.
169
void useOwnFontClicked(bool);
171
* Update the style preview widget
173
void updateStylePreview();
175
* The type of the keyaccel area changed
177
void slotKeyChooserTypeChanged(const QString&);
179
protected: // Protected methods
181
* Initializes the startup section of the OD.
185
* Init Sword section.
189
* Init accel key section.
191
void initAccelerators();
193
* Init fonts section.
195
void initLanguages();
197
/** Save the display settings.
200
/** Save the key accel settings.
202
void saveAccelerators();
203
/** Save the font settings.
205
void saveLanguages();
206
/** Save the Sword specific settings.
211
void signalSettingsChanged();