itom 2.2.1
K:/git-itom/sources/itom/itomWidgets/itomWidgetsFactory.h
00001 /* ********************************************************************
00002    itom measurement system
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.
00008 
00009    itom is free software: you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation, either version 3 of the License, or
00012    (at your option) any later version.
00013 
00014    itom is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017    GNU General Public License for more details.
00018 
00019    You should have received a copy of the GNU General Public License
00020    along with itom. If not, see <http://www.gnu.org/licenses/>.
00021 *********************************************************************** */
00022 
00023 #ifndef ITOMWIDGETSFACTORY_H
00024 #define ITOMWIDGETSFACTORY_H
00025 
00026 #include "qglobal.h"
00027 #if QT_VERSION < 0x050500 //hex-code must be used since Qt4 moc process does not understand QT_VERSION_CHECK(5,5,0)
00028         #include <QtDesigner/QDesignerCustomWidgetCollectionInterface>
00029 #else
00030         #include <QtUiPlugin/QDesignerCustomWidgetCollectionInterface>
00031 #endif
00032 
00033 class ItomWidgetsFactory : public QObject, public QDesignerCustomWidgetCollectionInterface
00034 {
00035     Q_OBJECT
00036 #if QT_VERSION >=  QT_VERSION_CHECK(5,0,0)
00037     Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface" )
00038 #endif
00039     Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
00040 
00041 public:
00042      ItomWidgetsFactory(QObject *parent = 0);
00043 
00044      virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
00045 
00046  private:
00047      QList<QDesignerCustomWidgetInterface*> widgets;
00048 };
00049 
00050 #endif // ITOMWIDGETSFACTORY_H
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Friends