source: terepaima/terepaima-0.4.16/sources/annotationwidgets.h

desarrollostretch
Last change on this file was 1f4adec, checked in by aosorio <aosorio@…>, 8 years ago

Agregado proyecto base, esto luego del dh_make -f

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2
3Copyright 2012-2013 Adam Reichold
4
5This file is part of qpdfview.
6
7qpdfview is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 2 of the License, or
10(at your option) any later version.
11
12qpdfview is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with qpdfview.  If not, see <http://www.gnu.org/licenses/>.
19
20*/
21
22#ifndef ANNOTATIONWIDGETS_H
23#define ANNOTATIONWIDGETS_H
24
25#include <QPlainTextEdit>
26#include <QToolButton>
27
28class QMutex;
29
30namespace Poppler
31{
32class Annotation;
33class FileAttachmentAnnotation;
34}
35
36namespace qpdfview
37{
38
39class AnnotationWidget : public QPlainTextEdit
40{
41    Q_OBJECT
42
43public:
44    AnnotationWidget(QMutex* mutex, Poppler::Annotation* annotation, QWidget* parent = 0);
45
46signals:
47    void wasModified();
48
49protected:
50    void keyPressEvent(QKeyEvent* event);
51
52protected slots:
53    void on_textChanged();
54
55private:
56    Q_DISABLE_COPY(AnnotationWidget)
57
58    QMutex* m_mutex;
59    Poppler::Annotation* m_annotation;
60
61};
62
63
64class FileAttachmentAnnotationWidget : public QToolButton
65{
66    Q_OBJECT
67
68public:
69    FileAttachmentAnnotationWidget(QMutex* mutex, Poppler::FileAttachmentAnnotation* annotation, QWidget* parent = 0);
70
71protected:
72    void keyPressEvent(QKeyEvent* event);
73
74protected slots:
75    void on_aboutToShow();
76    void on_aboutToHide();
77
78    void on_save_triggered();
79    void on_saveAndOpen_triggered();
80
81private:
82    Q_DISABLE_COPY(FileAttachmentAnnotationWidget)
83
84    QMutex* m_mutex;
85    Poppler::FileAttachmentAnnotation* m_annotation;
86
87    void save(bool open = false);
88
89    QMenu* m_menu;
90    QAction* m_saveAction;
91    QAction* m_saveAndOpenAction;
92
93};
94
95} // qpdfview
96
97#endif // ANNOTATIONWIDGETS_H
Note: See TracBrowser for help on using the repository browser.