itom 2.2.1
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2016, Institut fuer Technische Optik (ITO), 00005 Universitaet Stuttgart, Germany 00006 00007 This file is part of itom and its software development toolkit (SDK). 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 In addition, as a special exception, the Institut fuer Technische 00015 Optik (ITO) gives you certain additional rights. 00016 These rights are described in the ITO LGPL Exception version 1.0, 00017 which can be found in the file LGPL_EXCEPTION.txt in this package. 00018 00019 itom is distributed in the hope that it will be useful, but 00020 WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00022 General Public Licence for more details. 00023 00024 You should have received a copy of the GNU Library General Public License 00025 along with itom. If not, see <http://www.gnu.org/licenses/>. 00026 *********************************************************************** */ 00027 00028 #ifndef ABSTRACTITOMDESIGNERPLUGIN_H 00029 #define ABSTRACTITOMDESIGNERPLUGIN_H 00030 00031 #include "plotCommon.h" 00032 #include "../common/sharedStructuresGraphics.h" 00033 #include "AbstractFigure.h" 00034 00035 #if QT_VERSION < 0x050500 //hex-code must be used since Qt4 moc process does not understand QT_VERSION_CHECK(5,5,0) 00036 #include <QtDesigner/QDesignerCustomWidgetInterface> 00037 #else 00038 #include <QtUiPlugin/QDesignerCustomWidgetInterface> 00039 #endif 00040 00041 #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 00042 00043 namespace ito { 00044 00045 class ITOMCOMMONPLOT_EXPORT AbstractItomDesignerPlugin : public QObject, public QDesignerCustomWidgetInterface 00046 { 00047 Q_OBJECT 00048 // Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface") 00049 Q_INTERFACES(QDesignerCustomWidgetInterface) 00050 00051 00052 // increment this number if you changed something in this interface or other abstract classes of the 00053 // plot designerPlugin system. 00054 Q_CLASSINFO("ito.AbstractItomDesignerPlugin", "1.3.0") 00055 00056 public: 00057 AbstractItomDesignerPlugin(QObject *parent) : 00058 QObject(parent), 00059 QDesignerCustomWidgetInterface(), 00060 m_plotFeatures(ito::Static), 00061 m_version(0), 00062 m_author(""), 00063 m_description(""), 00064 m_detaildescription(""), 00065 m_aboutThis(""), 00066 m_license("LGPL with ITO itom-exception") {} 00067 00068 virtual ~AbstractItomDesignerPlugin() {} 00069 00070 inline ito::PlotDataTypes getPlotDataTypes(void) const { return m_plotDataTypes; } 00071 inline ito::PlotDataFormats getPlotDataFormats(void) const { return m_plotDataFormats; } 00072 inline ito::PlotFeatures getPlotFeatures(void) const { return m_plotFeatures; } 00073 00075 inline int getVersion(void) const { return m_version; } 00077 const QString getAuthor(void) const { return m_author; } 00079 const QString getDescription(void) const { return m_description; } 00081 const QString getDetailDescription(void) const { return m_detaildescription; } 00083 const QString getLicenseInfo(void) const { return m_license; } 00085 const QString getAboutInfo(void) const { return m_aboutThis; } 00086 00088 int getCompilerFeatures(void) const 00089 { 00090 int retval = AbstractFigure::tOpenCV; 00091 #if defined USEPCL || ITOM_POINTCLOUDLIBRARY 00092 retval |= AbstractFigure::tPointCloudLib; 00093 #endif 00094 return retval; 00095 } 00096 00097 inline void setItomSettingsFile(const QString &settingsFile) { m_itomSettingsFile = settingsFile; } 00098 00099 virtual QWidget *createWidgetWithMode(AbstractFigure::WindowMode winMode, QWidget *parent) = 0; 00100 00101 protected: 00102 ito::PlotDataTypes m_plotDataTypes; 00103 ito::PlotDataFormats m_plotDataFormats; 00104 ito::PlotFeatures m_plotFeatures; 00105 00106 int m_version; 00107 QString m_author; 00108 QString m_description; 00109 QString m_detaildescription; 00110 QString m_license; 00111 QString m_aboutThis; 00112 QString m_itomSettingsFile; 00113 }; 00114 } // namepsace ito 00115 00116 #endif //#if !defined(Q_MOC_RUN) || defined(ITOMCOMMONQT_MOC) 00117 00118 #endif // ABSTRACTITOMDESIGNERPLUGIN_H