itom  4.1.0
qpropertyHelper.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.
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  itom is distributed in the hope that it will be useful, but
15  WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
17  General Public Licence for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with itom. If not, see <http://www.gnu.org/licenses/>.
21 *********************************************************************** */
22 
23 #ifndef QPROPERTYHELPER
24 #define QPROPERTYHELPER
25 
26 #include "../global.h"
27 #include "../common/retVal.h"
28 #include "../common/addInInterface.h"
29 #include "../common/interval.h"
30 #include "../common/shape.h"
31 #include "../DataObject/dataobj.h"
32 #include "../common/qtMetaTypeDeclarations.h"
33 #include "common/itomPlotHandle.h"
34 
35 #if ITOM_POINTCLOUDLIBRARY > 0
36  #include "PointCloud/pclStructures.h"
37 #endif
38 
39 #include <qvariant.h>
40 #include <qmetaobject.h>
41 #include <qpointer.h>
42 #include <qsharedpointer.h>
43 
44 #if ITOM_POINTCLOUDLIBRARY > 0
45  Q_DECLARE_METATYPE(ito::PCLPointCloud)
46  Q_DECLARE_METATYPE(QSharedPointer<ito::PCLPointCloud>)
47  Q_DECLARE_METATYPE(QSharedPointer<ito::PCLPolygonMesh>)
48  Q_DECLARE_METATYPE(ito::PCLPoint)
49  Q_DECLARE_METATYPE(ito::PCLPolygonMesh)
50 #endif
51 
52 Q_DECLARE_METATYPE(QSharedPointer<ito::DataObject>)
53 Q_DECLARE_METATYPE(QPointer<ito::AddInBase>)
54 Q_DECLARE_METATYPE(QPointer<ito::AddInDataIO>)
55 Q_DECLARE_METATYPE(QPointer<ito::AddInActuator>)
56 Q_DECLARE_METATYPE(ito::Shape)
57 Q_DECLARE_METATYPE(QVector<ito::Shape>)
58 Q_DECLARE_METATYPE(ito::ItomPlotHandle)
59 
60 namespace ito
61 {
62 
64  {
65  public:
66 
67  static QVariant QVariantCast(const QVariant &item, int QVariantCast, ito::RetVal &retval);
68  static QVariant QVariantToEnumCast(const QVariant &item, const QMetaEnum &enumerator, ito::RetVal &retval);
69  static RetVal readProperty(const QObject *object, const char* propName, QVariant &value);
70  static RetVal writeProperty(QObject *object, const char* propName, const QVariant &value);
71  };
72 
73 } //end namespace ito
74 
75 #endif //QPROPERTYHELPER
generic class that covers one single point cloud of different possible types provided by the Point Cl...
Definition: pclStructures.h:292
Class for managing status values (like errors or warning)
Definition: retVal.h:54
Definition: apiFunctionsGraph.cpp:39
Definition: qpropertyHelper.h:63