17#include <QMdiSubWindow>
21#include "../../backend/drivers/cswordbiblemoduleinfo.h"
22#include "../../backend/keys/cswordversekey.h"
23#include "../../backend/managers/cswordbackend.h"
24#include "../../util/btassert.h"
25#include "../../util/btconnect.h"
26#include "../../util/cresmgr.h"
27#include "../cexportmanager.h"
28#include "../cmdiarea.h"
29#include "../display/btmodelviewreaddisplay.h"
30#include "../keychooser/ckeychooser.h"
38 qaction =
new QAction(tr(
"Next book"),
this);
40 addAction(QStringLiteral(
"nextBook"), qaction);
42 qaction =
new QAction(tr(
"Previous book"),
this);
44 addAction(QStringLiteral(
"previousBook"), qaction);
46 qaction =
new QAction(tr(
"Next chapter"),
this);
48 addAction(QStringLiteral(
"nextChapter"), qaction);
50 qaction =
new QAction(tr(
"Previous chapter"),
this);
52 addAction(QStringLiteral(
"previousChapter"), qaction);
54 qaction =
new QAction(tr(
"Next verse"),
this);
56 addAction(QStringLiteral(
"nextVerse"), qaction);
58 qaction =
new QAction(tr(
"Previous verse"),
this);
60 addAction(QStringLiteral(
"previousVerse"), qaction);
63 qaction =
new QAction(tr(
"Copy chapter"),
this);
64 addAction(QStringLiteral(
"copyChapter"), qaction);
66 qaction =
new QAction(tr(
"Save chapter as plain text"),
this);
67 addAction(QStringLiteral(
"saveChapterAsPlainText"), qaction);
69 qaction =
new QAction(tr(
"Save chapter as HTML"),
this);
70 addAction(QStringLiteral(
"saveChapterAsHTML"), qaction);
72 qaction =
new QAction(tr(
"Print chapter"),
this);
73 qaction->setShortcut(QKeySequence::Print);
74 addAction(QStringLiteral(
"printChapter"), qaction);
76 qaction =
new QAction(tr(
"Text of reference"),
this);
77 addAction(QStringLiteral(
"copyTextOfReference"), qaction);
79 qaction =
new QAction(tr(
"Reference with text"),
this);
80 addAction(QStringLiteral(
"copyReferenceWithText"), qaction);
82 qaction =
new QAction(tr(
"Reference with text"),
this);
83 addAction(QStringLiteral(
"printReferenceWithText"), qaction);
85 qaction =
new QAction(tr(
"Reference with text"),
this);
86 addAction(QStringLiteral(
"saveReferenceWithText"), qaction);
136 m_actions.findText = &ac->action(QStringLiteral(
"findText"));
139 &ac->action(QStringLiteral(
"copyReferenceOnly"));
157 &ac->action(QStringLiteral(
"copySelectedText"));
160 &ac->action(QStringLiteral(
"copyByReferences"));
189 [
this](QString
const & newActiveAnchor) {
190 bool const hasActiveAnchor = !newActiveAnchor.isEmpty();
191 m_actions.copy.referenceTextOnly->setEnabled(
193 m_actions.copy.referenceAndText->setEnabled(
199 ac->readShortcuts(QStringLiteral(
"Bible shortcuts"));
203 auto *
const popupMenu =
new QMenu(
this);
204 popupMenu->addAction(
m_actions.findText);
205 popupMenu->addAction(
m_actions.findStrongs);
206 popupMenu->addSeparator();
334 mgr.
saveKey(&vk, format,
true, constMods);
359 for (
auto *
const subWindow :
mdi()->subWindowList()) {
void readShortcuts(QString const &group)
Read shortcuts from config.
void addAction(QString const &name, QAction *const action)
static void storeFilterOptionsToGroup(FilterOptions const &options, BtConfigCore &group)
Saves the current filter options.
static FilterOptions loadFilterOptionsFromGroup(BtConfigCore const &group)
static DisplayOptions loadDisplayOptionsFromGroup(BtConfigCore const &group)
static void storeDisplayOptionsToGroup(DisplayOptions const &options, BtConfigCore &group)
Saves the current display options.
void saveAnchorWithText()
void activeAnchorChanged(QString newActiveAnchor)
void copyAnchorTextOnly()
void save(TextPart const part)
Saves the given text with the specified format into the applications clipboard.
void copyAnchorWithText()
ActionCollection(QObject *parent=nullptr)
void saveChapter(CExportManager::Format const format)
void applyProfileSettings(BtConfigCore const &windowConf) override
Loads the settings of this window from configuration.
void lookupSwordKey(CSwordKey *newKey) override
void initActions() override
void copyDisplayedText() override
void storeProfileSettings(BtConfigCore &windowConf) const override
Stores the settings of this window to configuration.
struct CBibleReadWindow::@9 m_actions
CSwordVerseKey * verseKey()
QMenu * newDisplayWidgetPopupMenu() override
The base class for all display windows of BibleTime.
virtual bool syncAllowed() const noexcept
QAction & initAddAction(Args &&... args)
void sigDisplayOptionsChanged(const DisplayOptions &displayOptions)
void printAnchorWithText()
virtual void storeProfileSettings(BtConfigCore &windowConf) const
Stores the settings of this window to configuration.
FilterOptions const & filterOptions() const noexcept
void setDisplayOptions(DisplayOptions const &v)
CKeyChooser * keyChooser() const noexcept
void sigFilterOptionsChanged(const FilterOptions &filterOptions)
BtModelViewReadDisplay * displayWidget() const noexcept
virtual void lookupSwordKey(CSwordKey *)
void lookupKey(QString const &key)
CSwordModuleInfo const * firstModule() const noexcept
DisplayOptions const & displayOptions() const noexcept
void setFilterOptions(FilterOptions const &v)
BtConstModuleList constModules() const
CSwordKey * swordKey() const noexcept
virtual void applyProfileSettings(BtConfigCore const &windowConf)
Loads the settings of this window from configuration.
ActionCollection * actionCollection() const noexcept
BtModuleList const & modules() const noexcept
CSwordKey * getMouseClickedKey() const
friend class CBibleReadWindow
bool saveKey(CSwordKey const *const key, Format const format, bool const addText, const BtConstModuleList &modules)
bool copyKey(CSwordKey const *const key, Format const format, bool const addText)
virtual void setKey(CSwordKey *key)=0
virtual void refreshContent()=0
static CSwordBackend & instance() noexcept
Implementation for Sword Bibles.
virtual QString key() const =0
CSwordKey implementation for Sword's VerseKey.
void setLowerBound(CSwordVerseKey const &bound)
void setLocale(char const *const locale)
void setUpperBound(CSwordVerseKey const &bound)