blob: 40dd244ed6e3247cc41bd90424d0201e1502fdcc (
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
39
40
41
42
43
|
#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);
void keyPressEvent(QKeyEvent *event) override;
void keyReleaseEvent(QKeyEvent *event) override;
void betterCopy();
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
|