BibleTime
btglobal.h
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
13 #pragma once
14 
15 #include <QMetaType>
16 
17 
18 class QDataStream;
19 
20 
21 /**
22  Filter options to control the text display of modules. Uses int and not bool
23  because not all options have just two toggle values.
24 */
25 struct FilterOptions {
26  int footnotes; /**< 0 for disabled, 1 for enabled */
27  int strongNumbers; /**< 0 for disabled, 1 for enabled */
28  int headings; /**< 0 for disabled, 1 for enabled */
29  int morphTags; /**< 0 for disabled, 1 for enabled */
30  int lemmas; /**< 0 for disabled, 1 for enabled */
31  int hebrewPoints; /**< 0 for disabled, 1 for enabled */
32  int hebrewCantillation; /**< 0 for disabled, 1 for enabled */
33  int greekAccents; /**< 0 for disabled, 1 for enabled */
34  int textualVariants; /**< Number n to enabled the n-th variant */
35  int redLetterWords; /**< 0 for disabled, 1 for enabled */
36  int scriptureReferences; /**< 0 for disabled, 1 for enabled */
37  int morphSegmentation; /**< 0 for disabled, 1 for enabled */
38  FilterOptions();
39  bool filterOptionsAreEqual(FilterOptions const & opts) const noexcept;
40 };
41 Q_DECLARE_METATYPE(FilterOptions)
42 
43 /**
44  Controls the display of a text.
45 */
49  bool displayOptionsAreEqual(DisplayOptions const & opts) const noexcept;
50 
51 /**
52  Work around for Windows compiler bug in Visual Studio 2008 & 2010. The Crash
53  occurs at the return statement of the not anymore existing
54  CBTConfig::getDisplayOptionDefaults and is caused by a bad calling sequence
55  when called from CDisplayWindow::init. The bug might still occur but now
56  caused by BtConfig::getDisplayOptions.
57  \todo Properly identify this bug and remove the #ifdef when fix is available.
58 */
59 #ifdef Q_OS_WIN
60  int notUsed;
61 #endif
62 
63 };
64 Q_DECLARE_METATYPE(DisplayOptions)
65 
66 /*!
67  * Enumeration indicating the alignment mode
68  * used for child windows.
69  */
70 enum alignmentMode { /* Values provided for serialization */
73  autoTile = 2,
76  manual = 5
77 };
78 QDataStream &operator<<(QDataStream &out, const alignmentMode &mode);
79 QDataStream &operator>>(QDataStream &in, alignmentMode &mode);
80 Q_DECLARE_METATYPE(alignmentMode)
QDataStream & operator>>(QDataStream &in, alignmentMode &mode)
Definition: btglobal.cpp:24
QDataStream & operator<<(QDataStream &out, const alignmentMode &mode)
Definition: btglobal.cpp:19
alignmentMode
Definition: btglobal.h:70
@ autoTabbed
Definition: btglobal.h:74
@ autoTileHorizontal
Definition: btglobal.h:72
@ autoCascade
Definition: btglobal.h:75
@ autoTile
Definition: btglobal.h:73
@ autoTileVertical
Definition: btglobal.h:71
@ manual
Definition: btglobal.h:76
int lineBreaks
Definition: btglobal.h:47
int verseNumbers
Definition: btglobal.h:48
int morphSegmentation
Definition: btglobal.h:37
int hebrewCantillation
Definition: btglobal.h:32
int morphTags
Definition: btglobal.h:29
int textualVariants
Definition: btglobal.h:34
int hebrewPoints
Definition: btglobal.h:31
int footnotes
Definition: btglobal.h:26
int scriptureReferences
Definition: btglobal.h:36
int greekAccents
Definition: btglobal.h:33
int headings
Definition: btglobal.h:28
int redLetterWords
Definition: btglobal.h:35
bool filterOptionsAreEqual(FilterOptions const &opts) const noexcept
Definition: btglobal.cpp:38
int strongNumbers
Definition: btglobal.h:27