itom  3.0.0
qpropertyHelper.h
1 /* ********************************************************************
2  itom software
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 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 
34 #if ITOM_POINTCLOUDLIBRARY > 0
35 #include "PointCloud/pclStructures.h"
36 #endif
37 
38 #include <qvariant.h>
39 #include <qmetaobject.h>
40 #include <qpointer.h>
41 #include <qsharedpointer.h>
42 
43 #if ITOM_POINTCLOUDLIBRARY > 0
44 Q_DECLARE_METATYPE(ito::PCLPointCloud)
45 Q_DECLARE_METATYPE(QSharedPointer<ito::PCLPointCloud>)
46 Q_DECLARE_METATYPE(QSharedPointer<ito::PCLPolygonMesh>)
47 Q_DECLARE_METATYPE(ito::PCLPoint)
48 Q_DECLARE_METATYPE(ito::PCLPolygonMesh)
49 #endif
50 
51 Q_DECLARE_METATYPE(QSharedPointer<ito::DataObject>)
52 Q_DECLARE_METATYPE(QPointer<ito::AddInBase>)
53 Q_DECLARE_METATYPE(QPointer<ito::AddInDataIO>)
54 Q_DECLARE_METATYPE(QPointer<ito::AddInActuator>)
55 Q_DECLARE_METATYPE(ito::Shape)
56 Q_DECLARE_METATYPE(QVector<ito::Shape>)
57 
58 
59 namespace ito
60 {
61 
63  {
64  public:
65 
66  static QVariant QVariantCast(const QVariant &item, int QVariantCast, ito::RetVal &retval);
67  static QVariant QVariantToEnumCast(const QVariant &item, const QMetaEnum &enumerator, ito::RetVal &retval);
68  static RetVal readProperty(const QObject *object, const char* propName, QVariant &value);
69  static RetVal writeProperty(QObject *object, const char* propName, const QVariant &value);
70  };
71 
72 } //end namespace ito
73 
74 #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:62