forked from KDE/okular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
annotwindow.h
74 lines (57 loc) · 1.63 KB
/
annotwindow.h
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
SPDX-FileCopyrightText: 2006 Chu Xiaodong <[email protected]>
SPDX-FileCopyrightText: 2006 Pino Toscano <[email protected]>
Work sponsored by the LiMux project of the city of Munich:
SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB a KDAB Group company <[email protected]>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef _ANNOTWINDOW_H_
#define _ANNOTWINDOW_H_
#include <QColor>
#include <QFrame>
namespace Okular
{
class Annotation;
class Document;
}
namespace GuiUtils
{
class LatexRenderer;
}
class KTextEdit;
class MovableTitle;
class QMenu;
class AnnotWindow : public QFrame
{
Q_OBJECT
public:
AnnotWindow(QWidget *parent, Okular::Annotation *annot, Okular::Document *document, int page);
~AnnotWindow() override;
void reloadInfo();
Okular::Annotation *annotation() const;
int pageNumber() const;
void updateAnnotation(Okular::Annotation *a);
private:
MovableTitle *m_title;
KTextEdit *textEdit;
QColor m_color;
GuiUtils::LatexRenderer *m_latexRenderer;
Okular::Annotation *m_annot;
Okular::Document *m_document;
int m_page;
int m_prevCursorPos;
int m_prevAnchorPos;
public Q_SLOTS:
void renderLatex(bool render);
protected:
void showEvent(QShowEvent *event) override;
bool eventFilter(QObject *obj, QEvent *event) override;
private Q_SLOTS:
void slotUpdateUndoAndRedoInContextMenu(QMenu *menu);
void slotOptionBtn();
void slotsaveWindowText();
void slotHandleContentsChangedByUndoRedo(Okular::Annotation *annot, const QString &contents, int cursorPos, int anchorPos);
Q_SIGNALS:
void containsLatex(bool);
};
#endif