BibleTime
src
frontend
keychooser
versekeychooser
btbiblekeywidget.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 <QWidget>
16
17
#include <QTimer>
18
#include "../../../backend/drivers/cswordbiblemoduleinfo.h"
19
20
21
class
CSwordVerseKey
;
22
class
QLineEdit
;
23
class
QMenu
;
24
25
class
BtBibleKeyWidget
:
public
QWidget
{
26
Q_OBJECT
27
28
public
:
29
BtBibleKeyWidget
(
CSwordBibleModuleInfo
const
* module,
30
CSwordVerseKey
* key,
31
QWidget
* parent =
nullptr
);
32
33
~BtBibleKeyWidget
()
override
;
34
bool
setKey
(
CSwordVerseKey
* key);
35
void
setModule
(
const
CSwordBibleModuleInfo
*m =
nullptr
);
36
bool
eventFilter
(
QObject
*o, QEvent *e)
override
;
37
38
Q_SIGNALS:
39
void
changed
(
CSwordVerseKey
* key);
40
41
protected
:
42
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
43
void
enterEvent
(QEvent * event)
override
;
44
#else
45
void
enterEvent
(QEnterEvent * event)
override
;
46
#endif
47
void
leaveEvent
(QEvent *event)
override
;
48
void
resizeEvent
(QResizeEvent *event)
override
;
49
void
resetDropDownButtons
();
50
51
public
Q_SLOTS:
52
void
updateText
();
53
54
private
:
// methods:
55
56
void
populateBookMenu
(
QMenu
& menu);
57
void
populateChapterMenu
(
QMenu
& menu);
58
void
populateVerseMenu
(
QMenu
& menu);
59
60
private
:
61
62
CSwordVerseKey
*
m_key
;
63
64
QLineEdit
*
m_textbox
;
65
66
QWidget
*
m_dropDownButtons
;
67
QTimer
m_dropDownHoverTimer
;
68
69
bool
updatelock
;
70
QString
oldKey
;
71
const
CSwordBibleModuleInfo
*
m_module
;
72
};
BtBibleKeyWidget
Definition:
btbiblekeywidget.h:25
BtBibleKeyWidget::BtBibleKeyWidget
BtBibleKeyWidget(CSwordBibleModuleInfo const *module, CSwordVerseKey *key, QWidget *parent=nullptr)
Definition:
btbiblekeywidget.cpp:52
BtBibleKeyWidget::resetDropDownButtons
void resetDropDownButtons()
Definition:
btbiblekeywidget.cpp:297
BtBibleKeyWidget::oldKey
QString oldKey
Definition:
btbiblekeywidget.h:70
BtBibleKeyWidget::m_module
const CSwordBibleModuleInfo * m_module
Definition:
btbiblekeywidget.h:71
BtBibleKeyWidget::m_dropDownHoverTimer
QTimer m_dropDownHoverTimer
Definition:
btbiblekeywidget.h:67
BtBibleKeyWidget::enterEvent
void enterEvent(QEnterEvent *event) override
Definition:
btbiblekeywidget.cpp:276
BtBibleKeyWidget::m_key
CSwordVerseKey * m_key
Definition:
btbiblekeywidget.h:62
BtBibleKeyWidget::updateText
void updateText()
Definition:
btbiblekeywidget.cpp:306
BtBibleKeyWidget::~BtBibleKeyWidget
~BtBibleKeyWidget() override
Definition:
btbiblekeywidget.cpp:248
BtBibleKeyWidget::eventFilter
bool eventFilter(QObject *o, QEvent *e) override
Definition:
btbiblekeywidget.cpp:259
BtBibleKeyWidget::resizeEvent
void resizeEvent(QResizeEvent *event) override
Definition:
btbiblekeywidget.cpp:290
BtBibleKeyWidget::populateBookMenu
void populateBookMenu(QMenu &menu)
Definition:
btbiblekeywidget.cpp:324
BtBibleKeyWidget::m_textbox
QLineEdit * m_textbox
Definition:
btbiblekeywidget.h:64
BtBibleKeyWidget::setModule
void setModule(const CSwordBibleModuleInfo *m=nullptr)
Definition:
btbiblekeywidget.cpp:252
BtBibleKeyWidget::leaveEvent
void leaveEvent(QEvent *event) override
Definition:
btbiblekeywidget.cpp:286
BtBibleKeyWidget::populateChapterMenu
void populateChapterMenu(QMenu &menu)
Definition:
btbiblekeywidget.cpp:329
BtBibleKeyWidget::changed
void changed(CSwordVerseKey *key)
BtBibleKeyWidget::updatelock
bool updatelock
Definition:
btbiblekeywidget.h:69
BtBibleKeyWidget::populateVerseMenu
void populateVerseMenu(QMenu &menu)
Definition:
btbiblekeywidget.cpp:335
BtBibleKeyWidget::setKey
bool setKey(CSwordVerseKey *key)
Definition:
btbiblekeywidget.cpp:317
BtBibleKeyWidget::m_dropDownButtons
QWidget * m_dropDownButtons
Definition:
btbiblekeywidget.h:66
CSwordBibleModuleInfo
Implementation for Sword Bibles.
Definition:
cswordbiblemoduleinfo.h:27
CSwordVerseKey
CSwordKey implementation for Sword's VerseKey.
Definition:
cswordversekey.h:62
QLineEdit
QMenu
QObject
QWidget
Generated by
1.9.1