itom  3.0.0
AbstractItomDesignerPlugin.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2016, Institut fuer Technische Optik (ITO),
5  Universitaet Stuttgart, Germany
6 
7  This file is part of itom and its software development toolkit (SDK).
8 
9  itom is free software; you can redistribute it and/or modify it
10  under the terms of the GNU Library General Public Licence as published by
11  the Free Software Foundation; either version 2 of the Licence, or (at
12  your option) any later version.
13 
14  In addition, as a special exception, the Institut fuer Technische
15  Optik (ITO) gives you certain additional rights.
16  These rights are described in the ITO LGPL Exception version 1.0,
17  which can be found in the file LGPL_EXCEPTION.txt in this package.
18 
19  itom is distributed in the hope that it will be useful, but
20  WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
22  General Public Licence for more details.
23 
24  You should have received a copy of the GNU Library General Public License
25  along with itom. If not, see <http://www.gnu.org/licenses/>.
26 *********************************************************************** */
27 
28 #ifndef ABSTRACTITOMDESIGNERPLUGIN_H
29 #define ABSTRACTITOMDESIGNERPLUGIN_H
30 
31 #include "plotCommon.h"
32 #include "../common/sharedStructuresGraphics.h"
33 #include "AbstractFigure.h"
34 
35 #if QT_VERSION < 0x050500 //hex-code must be used since Qt4 moc process does not understand QT_VERSION_CHECK(5,5,0)
36 #include <QtDesigner/QDesignerCustomWidgetInterface>
37 #else
38 #include <QtUiPlugin/QDesignerCustomWidgetInterface>
39 #endif
40 
41 #if !defined(Q_MOC_RUN) || defined(ITOMCOMMONPLOT_MOC) //only moc this file in itomCommonQtLib but not in other libraries or executables linking against this itomCommonQtLib
42 
43 namespace ito {
44 
45  class ITOMCOMMONPLOT_EXPORT AbstractItomDesignerPlugin : public QObject, public QDesignerCustomWidgetInterface
46  {
47  Q_OBJECT
48 // Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface")
49  Q_INTERFACES(QDesignerCustomWidgetInterface)
50 
51 
52  // increment this number if you changed something in this interface or other abstract classes of the
53  // plot designerPlugin system.
54  Q_CLASSINFO("ito.AbstractItomDesignerPlugin", "1.3.0")
55 
56  public:
57  AbstractItomDesignerPlugin(QObject *parent) :
58  QObject(parent),
59  QDesignerCustomWidgetInterface(),
60  m_plotFeatures(ito::Static),
61  m_version(0),
62  m_author(""),
63  m_description(""),
64  m_detaildescription(""),
65  m_aboutThis(""),
66  m_license("LGPL with ITO itom-exception") {}
67 
68  virtual ~AbstractItomDesignerPlugin() {}
69 
70  inline ito::PlotDataTypes getPlotDataTypes(void) const { return m_plotDataTypes; }
71  inline ito::PlotDataFormats getPlotDataFormats(void) const { return m_plotDataFormats; }
72  inline ito::PlotFeatures getPlotFeatures(void) const { return m_plotFeatures; }
73 
75  inline int getVersion(void) const { return m_version; }
77  const QString getAuthor(void) const { return m_author; }
79  const QString getDescription(void) const { return m_description; }
81  const QString getDetailDescription(void) const { return m_detaildescription; }
83  const QString getLicenseInfo(void) const { return m_license; }
85  const QString getAboutInfo(void) const { return m_aboutThis; }
86 
88  int getCompilerFeatures(void) const
89  {
90  int retval = AbstractFigure::tOpenCV;
91  #if defined USEPCL || ITOM_POINTCLOUDLIBRARY
92  retval |= AbstractFigure::tPointCloudLib;
93  #endif
94  return retval;
95  }
96 
97  inline void setItomSettingsFile(const QString &settingsFile) { m_itomSettingsFile = settingsFile; }
98 
99  virtual QWidget *createWidgetWithMode(AbstractFigure::WindowMode winMode, QWidget *parent) = 0;
100 
101  protected:
102  ito::PlotDataTypes m_plotDataTypes;
103  ito::PlotDataFormats m_plotDataFormats;
104  ito::PlotFeatures m_plotFeatures;
105 
106  int m_version;
107  QString m_author;
108  QString m_description;
110  QString m_license;
111  QString m_aboutThis;
112  QString m_itomSettingsFile;
113  };
114 } // namepsace ito
115 
116 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC)
117 
118 #endif // ABSTRACTITOMDESIGNERPLUGIN_H
QString m_aboutThis
a short string with compile informations
Definition: AbstractItomDesignerPlugin.h:111
const QString getAboutInfo(void) const
returns a detailed description of the plugin compile informations
Definition: AbstractItomDesignerPlugin.h:85
AbstractItomDesignerPlugin(QObject *parent)
the classinfo ito.AbstractItomDesignerPlugin is the interface number of AbstractItomDesignerPlugin.
Definition: AbstractItomDesignerPlugin.h:57
Definition: AbstractItomDesignerPlugin.h:45
Definition: apiFunctionsGraph.cpp:39
const QString getAuthor(void) const
returns plugin author
Definition: AbstractItomDesignerPlugin.h:77
int m_version
plugin version
Definition: AbstractItomDesignerPlugin.h:106
const QString getDetailDescription(void) const
returns a detailed description of the plugin
Definition: AbstractItomDesignerPlugin.h:81
int getVersion(void) const
returns addIn version
Definition: AbstractItomDesignerPlugin.h:75
QString m_detaildescription
a detail descrition of the plugin
Definition: AbstractItomDesignerPlugin.h:109
const QString getLicenseInfo(void) const
returns a detailed description of the plugin license
Definition: AbstractItomDesignerPlugin.h:83
const QString getDescription(void) const
returns a brief description of the plugin
Definition: AbstractItomDesignerPlugin.h:79
QString m_description
a brief descrition of the plugin
Definition: AbstractItomDesignerPlugin.h:108
QString m_author
the plugin author
Definition: AbstractItomDesignerPlugin.h:107
int getCompilerFeatures(void) const
returns information about the compiler settings for PCL, OpenCV, ... during build ...
Definition: AbstractItomDesignerPlugin.h:88
QString m_license
a short license string for the plugin, default value is "LGPL with ITO itom-exception" ...
Definition: AbstractItomDesignerPlugin.h:110