blob: 425c953d77d544c127349a00d0b1497ba84c77f4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#ifndef KRISTALLTEXTBROWSER_HPP
#define KRISTALLTEXTBROWSER_HPP
#include <QTextBrowser>
class KristallTextBrowser : public QTextBrowser
{
Q_OBJECT
public:
KristallTextBrowser(QWidget * parent);
void mouseReleaseEvent(QMouseEvent * event) override;
void mouseMoveEvent(QMouseEvent * event) override;
void focusInEvent(QFocusEvent * event) override;
void setDefaultCursor(QCursor const & shape);
signals:
void anchorClicked(QUrl const &, bool open_in_new_tab);
private: // slots
void on_anchorClicked(QUrl const & url);
private:
void updateCursor();
public:
static const Qt::CursorShape NORMAL_CURSOR;
private:
bool signal_new_tab = false;
QCursor wanted_cursor;
};
#endif // KRISTALLTEXTBROWSER_HPP
|