BibleTime
bttextbrowser.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, http://www.bibletime.info/
6*
7* Copyright 1999-2020 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 <QTextBrowser>
16
17#include <QPoint>
18
19
20/**
21* \brief A QTextBrowser subclass which adds the ability to start drags for
22 references.
23*/
25
26 Q_OBJECT
27
28public: // methods:
29
30 BtTextBrowser(QWidget * parent = nullptr);
31
32protected: // methods:
33
34 void keyPressEvent(QKeyEvent * event) override;
35 void mousePressEvent(QMouseEvent * event) override;
36 void mouseMoveEvent(QMouseEvent * event) override;
37 void mouseReleaseEvent(QMouseEvent * event) override;
38
39private: // fields:
40
41 QPoint m_startPos;
42 bool m_readyToStartDrag = false;
43
44}; /* class BtTextBrowser */
A QTextBrowser subclass which adds the ability to start drags for references.
bool m_readyToStartDrag
void mouseReleaseEvent(QMouseEvent *event) override
void mouseMoveEvent(QMouseEvent *event) override
void mousePressEvent(QMouseEvent *event) override
void keyPressEvent(QKeyEvent *event) override