1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
/***************************************************************************
File: swordoptions.h
Project: Kio-Sword -- An ioslave for SWORD and KDE
Copyright: Copyright (C) 2004-2005 Luke Plant
***************************************************************************/
/***************************************************************************
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef SWORDOPTIONS_H
#define SWORDOPTIONS_H
// Internal
#include "option.h"
// KDE
#include <kglobal.h>
// TQt
#include <ntqstring.h>
// Std C/C++
#include <vector>
#include <stdlib.h>
using std::vector;
namespace KioSword {
class SwordOptions {
// There are 3 lists of options:
// - Here
// - 2* in SwordOptions::init()
// Also, they usually need to be added to the settings form
public:
// Need to duplicate
Option<bool> propagate; // Allow options set in one 'get' command to persist to later 'get' commands
Option<bool> redWords;
Option<bool> verseNumbers;
Option<bool> verseLineBreaks;
Option<TQString> styleSheet; // FIXME IMPLEMENT
Option<bool> footnotes; // FIXME IMPLEMENT
Option<bool> headings; // FIXME IMPLEMENT
Option<bool> strongs;
Option<bool> morph;
Option<bool> cantillation;
Option<bool> hebrewVowelPoints;
Option<bool> greekAccents;
Option<bool> lemmas; // FIXME IMPLEMENT
Option<bool> crossRefs; // FIXME IMPLEMENT
Option<int> variants;
Option<bool> wholeBook; // Allows whole book to be printed - otherwise 'Genesis' will give an index of chapters
Option<bool> doBibleIndex; // Create an index for for Bibles/Commentaries
Option<bool> doFullTreeIndex; // Create a full index for 'tree' books, not just first level
Option<bool> doDictIndex; // Create an index for all items in a Lexicon/Dictionary
Option<bool> doOtherIndex; // Create an index for other books
Option<TQString> defaultBible;
Option<TQString> defaultGreekStrongs;
Option<TQString> defaultHebrewStrongs;
Option<TQString> defaultGreekMorph;
Option<TQString> defaultHebrewMorph;
Option<TQString> locale;
SwordOptions();
SwordOptions(const SwordOptions& copyFrom);
virtual ~SwordOptions();
void readFromConfig(const KConfig* config);
void saveToConfig(KConfig* config);
TQMap<TQString, TQString> getQueryStringParams() const;
void readFromQueryString(TQMap<TQString, TQString> params);
private:
/** options that are read/saved in the config or propagated */
vector<OptionBase*> m_optionList;
void init();
};
}
#endif
|