BibleTime
cbiblereadwindow.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 "cdisplaywindow.h"
16 
17 #include <QAction>
18 #include "../cexportmanager.h"
19 #include "btactioncollection.h"
20 
21 
22 class CSwordKey;
23 class CSwordVerseKey;
24 class QAction;
25 class QEvent;
26 class QMenu;
27 class QObject;
28 
30 
31  Q_OBJECT
32 
33 public: // methods:
34 
36  CMDIArea * parent)
37  : CDisplayWindow(modules, true, parent)
38  { init(); }
39 
41  { return CSwordModuleInfo::Bible; }
42 
43  void storeProfileSettings(BtConfigCore & windowConf) const override;
44  void applyProfileSettings(BtConfigCore const & windowConf) override;
45  static void insertKeyboardActions( BtActionCollection* const a );
46 
47 protected: // methods:
48 
49  void initActions() override;
50  QMenu * newDisplayWidgetPopupMenu() override;
51 
52  struct {
55 
57  struct {
64  }
66 
68  struct {
72  }
74 
76  struct {
79  }
81  }
83 
84 
85 public Q_SLOTS:
86 
87  void nextBook();
88  void previousBook();
89  void nextChapter();
90  void previousChapter();
91  void nextVerse();
92  void previousVerse();
93 
94  void reload() override;
95 
96 protected Q_SLOTS:
97 
98  /**
99  * Copies the current chapter into the clipboard.
100  */
101  void copyDisplayedText() override;
102  /**
103  * Saves the chapter as valid HTML page.
104  */
105  void saveChapterHTML();
106  /**
107  * Saves the chapter as valid HTML page.
108  */
109  void saveChapterPlain();
110  void lookupSwordKey(CSwordKey * newKey) override;
111  void syncWindows();
112 
113 private: // methods:
114 
115  /**
116  * Wrapper around key() to return the right type of key.
117  */
119 
120  void saveChapter(CExportManager::Format const format);
121 
122 };
void saveChapter(CExportManager::Format const format)
QAction * chapterAsHTML
QAction * referenceOnly
struct CBibleReadWindow::@1::@3 save
void applyProfileSettings(BtConfigCore const &windowConf) override
Loads the settings of this window from configuration.
void lookupSwordKey(CSwordKey *newKey) override
QAction * byReferences
CBibleReadWindow(QList< CSwordModuleInfo * > const &modules, CMDIArea *parent)
static void insertKeyboardActions(BtActionCollection *const a)
void initActions() override
QAction * referenceTextOnly
struct CBibleReadWindow::@1::@4 print
void copyDisplayedText() override
QAction * referenceAndText
struct CBibleReadWindow::@1::@2 copy
void storeProfileSettings(BtConfigCore &windowConf) const override
Stores the settings of this window to configuration.
CSwordModuleInfo::ModuleType moduleType() const override
CSwordVerseKey * verseKey()
void reload() override
struct CBibleReadWindow::@1 m_actions
QAction * chapterAsPlain
QAction * selectedText
QMenu * newDisplayWidgetPopupMenu() override
The base class for all display windows of BibleTime.
BtModuleList const & modules() const noexcept
CSwordKey implementation for Sword's VerseKey.