BibleTime
clexiconreadwindow.cpp
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#include "clexiconreadwindow.h"
14
15#include <QAction>
16#include <QString>
17#include "../../backend/keys/cswordkey.h"
18#include "../../backend/keys/cswordldkey.h"
19#include "../../util/cresmgr.h"
20#include "../keychooser/ckeychooser.h"
21#include "btactioncollection.h"
22
23
26{
27 auto * actn = new QAction(tr("Next entry"), this);
29 addAction(QStringLiteral("nextEntry"), actn);
30
31 actn = new QAction(tr("Previous entry"), this);
33 addAction(QStringLiteral("previousEntry"), actn);
34}
35
37 QList<CSwordModuleInfo *> const & modules,
38 QString const & key,
39 CMDIArea * parent)
40 : CDisplayWindow(modules, key, true, new ActionCollection(), parent)
41{ init(); }
42
44 initAddAction(QStringLiteral("nextEntry"),
45 this,
47 initAddAction(QStringLiteral("previousEntry"),
48 this,
50 m_actionCollection->readShortcuts(QStringLiteral("Lexicon shortcuts"));
51}
52
55 actionCollection()->readShortcuts(QStringLiteral("Lexicon shortcuts"));
56}
57
59{ keyChooser()->setKey(ldKey()->NextEntry()); }
60
62{ keyChooser()->setKey(ldKey()->PreviousEntry()); }
63
65{ return dynamic_cast<CSwordLDKey*>(m_swordKey.get()); }
void readShortcuts(QString const &group)
Read shortcuts from config.
void addAction(QString const &name, QAction *const action)
The base class for all display windows of BibleTime.
QAction & initAddAction(Args &&... args)
virtual void reload()
CKeyChooser * keyChooser() const noexcept
ActionCollection *const m_actionCollection
std::unique_ptr< CSwordKey > const m_swordKey
friend class CLexiconReadWindow
ActionCollection * actionCollection() const noexcept
BtModuleList const & modules() const noexcept
virtual void setKey(CSwordKey *key)=0
void initActions() override