itom
Loading...
Searching...
No Matches
AbstractItomDesignerPlugin.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität 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 für 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
40namespace 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_maxItomVer(0),
55 m_minItomVer(0),
56 m_author(""),
57 m_description(""),
58 m_detaildescription(""),
59 m_aboutThis(""),
60 m_license("LGPL with ITO itom-exception") {}
61
63
64 inline ito::PlotDataTypes getPlotDataTypes(void) const { return m_plotDataTypes; }
65 inline ito::PlotDataFormats getPlotDataFormats(void) const { return m_plotDataFormats; }
66 inline ito::PlotFeatures getPlotFeatures(void) const { return m_plotFeatures; }
67
69 inline int getVersion(void) const { return m_version; }
71 const QString getAuthor(void) const { return m_author; }
73 const QString getDescription(void) const { return m_description; }
75 const QString getDetailDescription(void) const { return m_detaildescription; }
77 const QString getLicenseInfo(void) const { return m_license; }
79 const QString getAboutInfo(void) const { return m_aboutThis; }
80
81 inline void setItomSettingsFile(const QString &settingsFile) { m_itomSettingsFile = settingsFile; }
82
83 virtual QWidget *createWidgetWithMode(AbstractFigure::WindowMode winMode, QWidget *parent) = 0;
84
85 protected:
86 ito::PlotDataTypes m_plotDataTypes;
87 ito::PlotDataFormats m_plotDataFormats;
88 ito::PlotFeatures m_plotFeatures;
89
93 QString m_author;
94 QString m_description;
96 QString m_license;
97 QString m_aboutThis;
98 QString m_itomSettingsFile;
99 };
100} // namespace ito
101
102#endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC)
103
104#endif // ABSTRACTITOMDESIGNERPLUGIN_H
Definition AbstractItomDesignerPlugin.h:43
const QString getAboutInfo(void) const
returns a detailed description of the plugin compile information
Definition AbstractItomDesignerPlugin.h:79
QString m_aboutThis
a short string with compile information
Definition AbstractItomDesignerPlugin.h:97
QString m_description
a brief description of the plugin
Definition AbstractItomDesignerPlugin.h:94
const QString getLicenseInfo(void) const
returns a detailed description of the plugin license
Definition AbstractItomDesignerPlugin.h:77
QString m_author
the plugin author
Definition AbstractItomDesignerPlugin.h:93
QString m_detaildescription
a detail description of the plugin
Definition AbstractItomDesignerPlugin.h:95
const QString getDescription(void) const
returns a brief description of the plugin
Definition AbstractItomDesignerPlugin.h:73
int m_minItomVer
maximum supported version of the main program
Definition AbstractItomDesignerPlugin.h:92
const QString getAuthor(void) const
returns plugin author
Definition AbstractItomDesignerPlugin.h:71
int m_version
plugin version
Definition AbstractItomDesignerPlugin.h:90
int getVersion(void) const
returns addIn version
Definition AbstractItomDesignerPlugin.h:69
QString m_license
a short license string for the plugin, default value is "LGPL with ITO itom-exception"
Definition AbstractItomDesignerPlugin.h:96
const QString getDetailDescription(void) const
returns a detailed description of the plugin
Definition AbstractItomDesignerPlugin.h:75
int m_maxItomVer
minimum required version of the main program
Definition AbstractItomDesignerPlugin.h:91
Definition apiFunctionsGraph.cpp:40