~adamreichold/qpdfview/trunk

399 by Adam Reichold
further spread out the source and add missing preambles
1
/*
2
883 by Adam Reichold
updated preambels
3
Copyright 2012-2013 Adam Reichold
399 by Adam Reichold
further spread out the source and add missing preambles
4
5
This file is part of qpdfview.
6
7
qpdfview is free software: you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation, either version 2 of the License, or
10
(at your option) any later version.
11
12
qpdfview is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License
18
along with qpdfview.  If not, see <http://www.gnu.org/licenses/>.
19
20
*/
21
396 by Adam Reichold
refractor annotation handling and fix locking
22
#ifndef ANNOTATIONDIALOG_H
23
#define ANNOTATIONDIALOG_H
24
809 by Adam Reichold
begin to make header more humble
25
#include <QDialog>
26
27
class QMutex;
28
class QPlainTextEdit;
29
30
namespace Poppler
31
{
32
class Annotation;
33
}
396 by Adam Reichold
refractor annotation handling and fix locking
34
35
class AnnotationDialog : public QDialog
36
{
37
    Q_OBJECT
38
39
public:
399 by Adam Reichold
further spread out the source and add missing preambles
40
    AnnotationDialog(QMutex* mutex, Poppler::Annotation* annotation, QWidget* parent = 0);
396 by Adam Reichold
refractor annotation handling and fix locking
41
42
protected:
43
    void showEvent(QShowEvent* event);
411 by Adam Reichold
simplify annotation dialog and remove duplicate keyboard shortcut to close pop-up
44
    void hideEvent(QHideEvent* event);
396 by Adam Reichold
refractor annotation handling and fix locking
45
    
46
private:
47
    QMutex* m_mutex;
48
    Poppler::Annotation* m_annotation;
49
636 by Adam Reichold
switch to simple QPlainTextEdit for the annotation dialog and reduce its contents margins
50
    QPlainTextEdit* m_plainTextEdit;
396 by Adam Reichold
refractor annotation handling and fix locking
51
    
52
};
53
54
#endif // ANNOTATIONDIALOG_H