iRoCS Toolbox  1.1.0
PluginInterface.hh
Go to the documentation of this file.
1 /**************************************************************************
2  *
3  * This file belongs to the iRoCS Toolbox.
4  *
5  * Copyright (C) 2015 Thorsten Falk
6  *
7  * Image Analysis Lab, University of Freiburg, Germany
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  **************************************************************************/
24 
25 /*======================================================================*/
30 /*======================================================================*/
31 
32 #ifndef PLUGININTERFACE_HH
33 #define PLUGININTERFACE_HH
34 
35 #ifdef HAVE_CONFIG_H
36 #include <config.hh>
37 #endif
38 
39 #include <map>
40 #include <string>
41 
42 #include <QtCore/QtPlugin>
43 #include <QtCore/QString>
44 
46 
47 /*======================================================================*/
52 /*======================================================================*/
54 {
55 
56 public:
57 
58 /*======================================================================*/
64 /*======================================================================*/
65  virtual ~PluginInterface()
66  {}
67 
68 /*======================================================================*/
75 /*======================================================================*/
76  virtual QString name() const = 0;
77 
78 /*======================================================================*/
85 /*======================================================================*/
86  virtual void setLabellingMainWidget(LabellingMainWidget* parent) = 0;
87 
88 /*======================================================================*/
101 /*======================================================================*/
102  virtual void setParameters(
103  const std::map<std::string,std::string>& parameters) = 0;
104 
105 /*======================================================================*/
133 /*======================================================================*/
134  virtual void run() = 0;
135 
136 
137 /*======================================================================*/
150 /*======================================================================*/
151  virtual void abort() = 0;
152 
153 };
154 
155 Q_DECLARE_INTERFACE(PluginInterface,
156  "lmbsoft.labelling_qt4.PluginInterface/1.0")
157 
158 #endif
virtual QString name() const =0
Get the plugin name.
virtual void setLabellingMainWidget(LabellingMainWidget *parent)=0
Set the LabellingMainWidget this plugin will act on.
virtual void abort()=0
Abort the plugin.
virtual void run()=0
Run the plugin.
virtual ~PluginInterface()
Plugin destructor.
virtual void setParameters(const std::map< std::string, std::string > &parameters)=0
Set plugin-specific parameters.
The abstract plugin interface all plugins must inherit from.