itom  4.1.0
AbstractItomDesignerPlugin.h
1 /* ********************************************************************
2  itom software
3  URL: http://www.uni-stuttgart.de/ito
4  Copyright (C) 2020, 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 #include "designerPluginInterfaceVersion.h"
35 
36 #include <QtUiPlugin/QDesignerCustomWidgetInterface>
37 
38 #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
39 
40 namespace ito {
41 
42  class ITOMCOMMONPLOT_EXPORT AbstractItomDesignerPlugin : public QObject, public QDesignerCustomWidgetInterface
43  {
44  Q_OBJECT
45 
46  Q_INTERFACES(QDesignerCustomWidgetInterface)
47 
48  public:
49  AbstractItomDesignerPlugin(QObject *parent) :
50  QObject(parent),
51  QDesignerCustomWidgetInterface(),
52  m_plotFeatures(ito::Static),
53  m_version(0),
54  m_author(""),
55  m_description(""),
56  m_detaildescription(""),
57  m_aboutThis(""),
58  m_license("LGPL with ITO itom-exception") {}
59 
60  virtual ~AbstractItomDesignerPlugin() {}
61 
62  inline ito::PlotDataTypes getPlotDataTypes(void) const { return m_plotDataTypes; }
63  inline ito::PlotDataFormats getPlotDataFormats(void) const { return m_plotDataFormats; }
64  inline ito::PlotFeatures getPlotFeatures(void) const { return m_plotFeatures; }
65 
67  inline int getVersion(void) const { return m_version; }
69  const QString getAuthor(void) const { return m_author; }
71  const QString getDescription(void) const { return m_description; }
73  const QString getDetailDescription(void) const { return m_detaildescription; }
75  const QString getLicenseInfo(void) const { return m_license; }
77  const QString getAboutInfo(void) const { return m_aboutThis; }
78 
79  inline void setItomSettingsFile(const QString &settingsFile) { m_itomSettingsFile = settingsFile; }
80 
81  virtual QWidget *createWidgetWithMode(AbstractFigure::WindowMode winMode, QWidget *parent) = 0;
82 
83  protected:
84  ito::PlotDataTypes m_plotDataTypes;
85  ito::PlotDataFormats m_plotDataFormats;
86  ito::PlotFeatures m_plotFeatures;
87 
88  int m_version;
89  QString m_author;
90  QString m_description;
92  QString m_license;
93  QString m_aboutThis;
94  QString m_itomSettingsFile;
95  };
96 } // namepsace ito
97 
98 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC)
99 
100 #endif // ABSTRACTITOMDESIGNERPLUGIN_H
QString m_aboutThis
a short string with compile informations
Definition: AbstractItomDesignerPlugin.h:93
const QString getAboutInfo(void) const
returns a detailed description of the plugin compile informations
Definition: AbstractItomDesignerPlugin.h:77
Definition: AbstractItomDesignerPlugin.h:42
Definition: apiFunctionsGraph.cpp:39
const QString getAuthor(void) const
returns plugin author
Definition: AbstractItomDesignerPlugin.h:69
int m_version
plugin version
Definition: AbstractItomDesignerPlugin.h:88
const QString getDetailDescription(void) const
returns a detailed description of the plugin
Definition: AbstractItomDesignerPlugin.h:73
int getVersion(void) const
returns addIn version
Definition: AbstractItomDesignerPlugin.h:67
QString m_detaildescription
a detail descrition of the plugin
Definition: AbstractItomDesignerPlugin.h:91
const QString getLicenseInfo(void) const
returns a detailed description of the plugin license
Definition: AbstractItomDesignerPlugin.h:75
const QString getDescription(void) const
returns a brief description of the plugin
Definition: AbstractItomDesignerPlugin.h:71
QString m_description
a brief descrition of the plugin
Definition: AbstractItomDesignerPlugin.h:90
QString m_author
the plugin author
Definition: AbstractItomDesignerPlugin.h:89
QString m_license
a short license string for the plugin, default value is "LGPL with ITO itom-exception" ...
Definition: AbstractItomDesignerPlugin.h:92