okular/part/annotwindow.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

74 lines
1.6 KiB
C
Raw Normal View History

2021-05-24 07:25:56 +00:00
/*
SPDX-FileCopyrightText: 2006 Chu Xiaodong <xiaodongchu@gmail.com>
SPDX-FileCopyrightText: 2006 Pino Toscano <pino@kde.org>
SPDX-FileCopyrightText: 2017 Klarälvdalens Datakonsult AB a KDAB Group company <info@kdab.com>
Work sponsored by the LiMux project of the city of Munich
2021-05-24 07:25:56 +00:00
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef _ANNOTWINDOW_H_
#define _ANNOTWINDOW_H_
2020-07-08 11:54:37 +00:00
#include <QColor>
#include <QFrame>
namespace Okular
{
class Annotation;
class Document;
}
2011-09-22 17:22:15 +00:00
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;
2011-09-22 17:22:15 +00:00
GuiUtils::LatexRenderer *m_latexRenderer;
Okular::Annotation *m_annot;
Okular::Document *m_document;
int m_page;
int m_prevCursorPos;
int m_prevAnchorPos;
2020-02-20 14:48:08 +00:00
public Q_SLOTS:
void renderLatex(bool render);
protected:
2017-03-02 19:39:24 +00:00
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:
2011-09-22 17:22:15 +00:00
void containsLatex(bool);
};
#endif