Read@CVL
FocusPlugin.h
Go to the documentation of this file.
1 /*******************************************************************************************************
2 ReadModules are plugins for nomacs 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 ReadModules.
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 #include "DkBatchInfo.h"
37 
38 // opencv defines
39 namespace cv {
40  class Mat;
41 }
42 
43 class QSettings;
44 
45 
46 namespace rdm {
47 
48 class FocusInfo : public nmc::DkBatchInfo {
49 
50 public:
51  FocusInfo(const QString& id = QString(), const QString& filePath = QString());
52 
53  void setProperty(const QString& p);
54  QString property() const;
55 
56 private:
57  QString mProp;
58 
59 };
60 
61 class FocusPlugin : public QObject, nmc::DkBatchPluginInterface {
62  Q_OBJECT
63  Q_INTERFACES(nmc::DkBatchPluginInterface)
64  Q_PLUGIN_METADATA(IID "com.nomacs.ImageLounge.FocusPlugin/3.1" FILE "FocusPlugin.json")
65 
66 public:
67  FocusPlugin(QObject* parent = 0);
68  ~FocusPlugin();
69 
70  QString id() const override;
71  QImage image() const override;
72 
73  QList<QAction*> createActions(QWidget* parent) override;
74  QList<QAction*> pluginActions() const override;
75  QSharedPointer<nmc::DkImageContainer> runPlugin(
76  const QString &runID,
77  QSharedPointer<nmc::DkImageContainer> imgC,
78  const nmc::DkSaveInfo& saveInfo,
79  QSharedPointer<nmc::DkBatchInfo>& info) const override;
80 
81  void preLoadPlugin() const override;
82  void postLoadPlugin(const QVector<QSharedPointer<nmc::DkBatchInfo> >& batchInfo) const override;
83 
84  enum {
90  // add actions here
91 
92  id_end
93  };
94 
95 protected:
96  QList<QAction*> mActions;
97  QStringList mRunIDs;
98  QStringList mMenuNames;
99  QStringList mMenuStatusTips;
100 };
101 };
Definition: FocusPlugin.h:88
Definition: FocusPlugin.h:48
Definition: FocusPlugin.h:61
Definition: Drawer.h:53
Definition: FocusPlugin.h:85
Definition: FocusPlugin.h:87
QStringList mMenuNames
Definition: FocusPlugin.h:98
QStringList mRunIDs
Definition: FocusPlugin.h:97
Definition: FocusPlugin.h:86
Definition: FocusPlugin.h:89
Definition: BatchTest.cpp:45
QStringList mMenuStatusTips
Definition: FocusPlugin.h:99
QList< QAction * > mActions
Definition: FocusPlugin.h:96