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-2025 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
18class 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*/
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 */
39 bool filterOptionsAreEqual(FilterOptions const & opts) const noexcept;
40};
41Q_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};
64Q_DECLARE_METATYPE(DisplayOptions)
65
66/*!
67 * Enumeration indicating the alignment mode
68 * used for child windows.
69 */
70enum alignmentMode { /* Values provided for serialization */
76 manual = 5
77};
78QDataStream &operator<<(QDataStream &out, const alignmentMode &mode);
79QDataStream &operator>>(QDataStream &in, alignmentMode &mode);
80Q_DECLARE_METATYPE(alignmentMode)
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
QDataStream & operator<<(QDataStream &out, const alignmentMode &mode)
Definition btglobal.cpp:19
QDataStream & operator>>(QDataStream &in, alignmentMode &mode)
Definition btglobal.cpp:24
int morphSegmentation
Definition btglobal.h:37
int hebrewCantillation
Definition btglobal.h:32
int textualVariants
Definition btglobal.h:34
int hebrewPoints
Definition btglobal.h:31
int scriptureReferences
Definition btglobal.h:36
int greekAccents
Definition btglobal.h:33
int redLetterWords
Definition btglobal.h:35
bool filterOptionsAreEqual(FilterOptions const &opts) const noexcept
Definition btglobal.cpp:38
int strongNumbers
Definition btglobal.h:27