BibleTime
cscrollerwidgetset.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-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#pragma once
14
15#include <QWidget>
16
17#include <QObject>
18#include <QString>
19
20
21class CScrollButton;
22class QToolButton;
23class QVBoxLayout;
24class QWheelEvent;
25
26/**
27 * This class implements the Scroller Widget-set, which
28 * consists of two normal ref @QToolButton and a enhanced @ref CScrollButton
29 */
31
32 Q_OBJECT
33
34public: // methods:
35
36 CScrollerWidgetSet(QWidget * parent = nullptr);
37
38 /**
39 * Sets the tooltips for the given entries using the parameters as text.
40 */
41 void setToolTips(const QString & nextEntry,
42 const QString & scrollButton,
43 const QString & previousEntry);
44
45Q_SIGNALS:
46
47 /**
48 * Is emitted to proceed to some other entry relative to the
49 * current, indicated by the int value.
50 * \param count offset to change to
51 */
52 void change(int count);
53
55
57
58protected: // methods:
59
60 void wheelEvent(QWheelEvent * e) override;
61
62private: // fields:
63
64 QVBoxLayout * m_layout;
68
69};
CScrollButton * m_scrollButton
QToolButton * m_buttonDown
void setToolTips(const QString &nextEntry, const QString &scrollButton, const QString &previousEntry)
void change(int count)
void wheelEvent(QWheelEvent *e) override