2006-08-11 23:53:48 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2006 by Chu Xiaodong <xiaodongchu@gmail.com> *
|
2006-09-17 16:09:10 +00:00
|
|
|
* Copyright (C) 2006 by Pino Toscano <pino@kde.org> *
|
2006-08-11 23:53:48 +00:00
|
|
|
* *
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
* (at your option) any later version. *
|
|
|
|
***************************************************************************/
|
2006-09-16 17:06:56 +00:00
|
|
|
|
2006-08-11 23:53:48 +00:00
|
|
|
#ifndef _ANNOTWINDOW_H_
|
|
|
|
#define _ANNOTWINDOW_H_
|
|
|
|
|
2008-03-24 00:08:08 +00:00
|
|
|
#include <qcolor.h>
|
2006-09-17 16:09:10 +00:00
|
|
|
#include <qframe.h>
|
2006-08-11 23:53:48 +00:00
|
|
|
|
2006-09-21 08:45:36 +00:00
|
|
|
namespace Okular {
|
2006-09-16 17:06:56 +00:00
|
|
|
class Annotation;
|
2012-01-17 22:46:37 +00:00
|
|
|
class Document;
|
2006-09-21 08:45:36 +00:00
|
|
|
}
|
|
|
|
|
2011-09-22 17:22:15 +00:00
|
|
|
namespace GuiUtils {
|
|
|
|
class LatexRenderer;
|
|
|
|
}
|
|
|
|
|
2013-04-05 22:22:48 +00:00
|
|
|
class KTextEdit;
|
2006-09-17 16:09:10 +00:00
|
|
|
class MovableTitle;
|
2013-04-05 22:22:48 +00:00
|
|
|
class QMenu;
|
2006-09-16 17:06:56 +00:00
|
|
|
|
2006-09-17 16:09:10 +00:00
|
|
|
class AnnotWindow : public QFrame
|
2006-08-11 23:53:48 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2012-01-17 22:46:37 +00:00
|
|
|
AnnotWindow( QWidget * parent, Okular::Annotation * annot, Okular::Document * document, int page );
|
2011-09-22 17:22:15 +00:00
|
|
|
~AnnotWindow();
|
2008-03-24 00:08:08 +00:00
|
|
|
|
|
|
|
void reloadInfo();
|
2013-04-05 22:22:48 +00:00
|
|
|
|
2006-08-11 23:53:48 +00:00
|
|
|
private:
|
2006-09-17 16:09:10 +00:00
|
|
|
MovableTitle * m_title;
|
2013-04-05 22:22:48 +00:00
|
|
|
KTextEdit *textEdit;
|
2008-03-24 00:08:08 +00:00
|
|
|
QColor m_color;
|
2011-09-22 17:22:15 +00:00
|
|
|
GuiUtils::LatexRenderer *m_latexRenderer;
|
2006-09-21 08:45:36 +00:00
|
|
|
Okular::Annotation* m_annot;
|
2012-01-17 22:46:37 +00:00
|
|
|
Okular::Document* m_document;
|
|
|
|
int m_page;
|
2013-04-05 22:22:48 +00:00
|
|
|
int m_prevCursorPos;
|
|
|
|
int m_prevAnchorPos;
|
2006-09-17 16:09:10 +00:00
|
|
|
|
2009-03-04 14:30:42 +00:00
|
|
|
protected:
|
|
|
|
virtual void showEvent( QShowEvent * event );
|
2010-12-01 22:46:30 +00:00
|
|
|
virtual bool eventFilter( QObject * obj, QEvent * event );
|
2009-03-04 14:30:42 +00:00
|
|
|
|
2006-08-11 23:53:48 +00:00
|
|
|
private slots:
|
2013-04-05 22:22:48 +00:00
|
|
|
void slotUpdateUndoAndRedoInContextMenu(QMenu *menu);
|
2006-09-17 16:09:10 +00:00
|
|
|
void slotOptionBtn();
|
2006-08-11 23:53:48 +00:00
|
|
|
void slotsaveWindowText();
|
2011-09-22 17:22:15 +00:00
|
|
|
void renderLatex( bool render );
|
2013-04-05 22:22:48 +00:00
|
|
|
void slotHandleContentsChangedByUndoRedo( Okular::Annotation* annot, QString contents, int cursorPos, int anchorPos);
|
2011-09-22 17:22:15 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void containsLatex( bool );
|
2006-08-11 23:53:48 +00:00
|
|
|
};
|
2006-09-21 08:45:36 +00:00
|
|
|
|
|
|
|
|
2006-08-11 23:53:48 +00:00
|
|
|
#endif
|