Read@CVL
PageViewport.h
Go to the documentation of this file.
1 /*******************************************************************************************************
2  ReadFramework is the basis for modules developed at CVL/TU Wien for the EU project READ.
3 
4  Copyright (C) 2016 Markus Diem <diem@caa.tuwien.ac.at>
5  Copyright (C) 2016 Stefan Fiel <fiel@caa.tuwien.ac.at>
6  Copyright (C) 2016 Florian Kleber <kleber@caa.tuwien.ac.at>
7 
8  This file is part of ReadFramework.
9 
10  ReadFramework is free software: you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  ReadFramework is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program. If not, see <http://www.gnu.org/licenses/>.
22 
23  The READ project has received funding from the European Union’s Horizon 2020
24  research and innovation programme under grant agreement No 674943
25 
26  related links:
27  [1] http://www.caa.tuwien.ac.at/cvl/
28  [2] https://transkribus.eu/Transkribus/
29  [3] https://github.com/TUWien/
30  [4] http://nomacs.org
31  *******************************************************************************************************/
32 
33 #pragma once
34 
35 #include "DkPluginInterface.h"
36 
37 #include "Elements.h"
38 
39 #pragma warning(push, 0) // no warnings from includes
40 // Qt Includes
41 #pragma warning(pop)
42 
43 // Qt defines
44 class QPaintEvent;
45 class QSettings;
46 
47 namespace rdm {
48 
49 // read defines
50 class PageDock;
51 class PageData;
52 
53 class PageViewport : public nmc::DkPluginViewPort {
54  Q_OBJECT
55 
56 public:
57  PageViewport(QWidget* parent = 0);
58  ~PageViewport();
59 
60  void updateImageContainer(QSharedPointer<nmc::DkImageContainerT> imgC) override;
61  PageDock* dock() const;
62 
63 signals:
64  void selectRegionsSignal(const QVector<QSharedPointer<rdf::Region> >& regions) const;
65 
66 public slots:
67  void parseXml();
68 
69 private:
70  void init();
71  void loadSettings(QSettings& settings);
72  void saveSettings(QSettings& settings) const;
73 
74  void mousePressEvent(QMouseEvent* event) override;
75  void mouseReleaseEvent(QMouseEvent* event) override;
76  void paintEvent(QPaintEvent* event) override;
77 
78  PageDock* mPageDock = 0;
79  PageData* mPageData = 0;
80  QSharedPointer<nmc::DkImageContainerT> mImg;
81 
82 };
83 
84 };
Definition: PageData.h:46
Definition: PageDock.h:270
void parseXml()
Definition: PageViewport.cpp:135
~PageViewport()
Definition: PageViewport.cpp:60
PageViewport(QWidget *parent=0)
Definition: PageViewport.cpp:53
PageDock * dock() const
Definition: PageViewport.cpp:156
Definition: PageViewport.h:53
void updateImageContainer(QSharedPointer< nmc::DkImageContainerT > imgC) override
Definition: PageViewport.cpp:122
Definition: BatchTest.cpp:45
void selectRegionsSignal(const QVector< QSharedPointer< rdf::Region > > &regions) const