BibleTime
src
frontend
keychooser
versekeychooser
btdropdownchooserbutton.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 <QToolButton>
16
17
18
class
BtBibleKeyWidget
;
19
20
/**
21
* Base class for book/ch/v dropdown list chooser buttons.
22
*/
23
class
BtDropdownChooserButton
:
public
QToolButton
{
24
Q_OBJECT
25
public
:
26
BtDropdownChooserButton
(
void
(
BtBibleKeyWidget
::*populateMenu)(
QMenu
&),
27
BtBibleKeyWidget
& parent);
28
29
/** The item list is constructed here just before the menu is shown.*/
30
void
mousePressEvent
(QMouseEvent* event)
override
;
31
32
protected
:
// methods:
33
34
void
wheelEvent
(QWheelEvent* event)
override
;
35
36
Q_SIGNALS:
37
38
void
stepItem
(
int
step);
39
40
private
:
// fields:
41
42
void (
BtBibleKeyWidget
::*
m_populateMenu
)(
QMenu
&);
43
BtBibleKeyWidget
&
m_parent
;
44
45
};
BtBibleKeyWidget
Definition:
btbiblekeywidget.h:25
BtDropdownChooserButton
Definition:
btdropdownchooserbutton.h:23
BtDropdownChooserButton::m_parent
BtBibleKeyWidget & m_parent
Definition:
btdropdownchooserbutton.h:43
BtDropdownChooserButton::stepItem
void stepItem(int step)
BtDropdownChooserButton::mousePressEvent
void mousePressEvent(QMouseEvent *event) override
Definition:
btdropdownchooserbutton.cpp:47
BtDropdownChooserButton::m_populateMenu
void(BtBibleKeyWidget::* m_populateMenu)(QMenu &)
Definition:
btdropdownchooserbutton.h:42
BtDropdownChooserButton::wheelEvent
void wheelEvent(QWheelEvent *event) override
Definition:
btdropdownchooserbutton.cpp:55
BtDropdownChooserButton::BtDropdownChooserButton
BtDropdownChooserButton(void(BtBibleKeyWidget::*populateMenu)(QMenu &), BtBibleKeyWidget &parent)
Definition:
btdropdownchooserbutton.cpp:22
QMenu
QToolButton
Generated by
1.9.1