itom  3.0.0
itomWidgetsFactory.h
1 /* ********************************************************************
2  itom measurement system
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.
8 
9  itom is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  itom is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with itom. If not, see <http://www.gnu.org/licenses/>.
21 *********************************************************************** */
22 
23 #ifndef ITOMWIDGETSFACTORY_H
24 #define ITOMWIDGETSFACTORY_H
25 
26 #include "qglobal.h"
27 #if QT_VERSION < 0x050500 //hex-code must be used since Qt4 moc process does not understand QT_VERSION_CHECK(5,5,0)
28  #include <QtDesigner/QDesignerCustomWidgetCollectionInterface>
29 #else
30  #include <QtUiPlugin/QDesignerCustomWidgetCollectionInterface>
31 #endif
32 
33 class ItomWidgetsFactory : public QObject, public QDesignerCustomWidgetCollectionInterface
34 {
35  Q_OBJECT
36 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0)
37  Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface" )
38 #endif
39  Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
40 
41 public:
42  ItomWidgetsFactory(QObject *parent = 0);
43 
44  virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const;
45 
46  private:
47  QList<QDesignerCustomWidgetInterface*> widgets;
48 };
49 
50 #endif // ITOMWIDGETSFACTORY_H
Definition: itomWidgetsFactory.h:33