21 #ifndef TULIPMETATYPES_H
22 #define TULIPMETATYPES_H
25 #include <QStringList>
28 #include <tulip/DataSet.h>
29 #include <tulip/Graph.h>
30 #include <tulip/Color.h>
31 #include <tulip/Coord.h>
32 #include <tulip/Size.h>
33 #include <tulip/BooleanProperty.h>
34 #include <tulip/DoubleProperty.h>
35 #include <tulip/ColorProperty.h>
36 #include <tulip/SizeProperty.h>
37 #include <tulip/StringProperty.h>
38 #include <tulip/LayoutProperty.h>
39 #include <tulip/GraphProperty.h>
40 #include <tulip/IntegerProperty.h>
41 #include <tulip/ColorScale.h>
42 #include <tulip/GlGraphStaticData.h>
43 #include <tulip/GlLabel.h>
44 #include <tulip/TulipFont.h>
45 #include <tulip/StringCollection.h>
46 #include <tulip/TulipViewSettings.h>
49 struct TulipFileDescriptor {
50 enum FileType {File,Directory};
52 TulipFileDescriptor() {}
53 TulipFileDescriptor(
const QString& absolutePath,FileType fileType,
bool existing =
true):absolutePath(absolutePath),type(fileType),mustExist(existing) {}
54 TulipFileDescriptor(
const TulipFileDescriptor& d) {
55 absolutePath = d.absolutePath;
57 mustExist = d.mustExist;
63 QString fileFilterPattern;
69 TextureFile(
const QString &texturePath) : texturePath(texturePath) {}
72 struct TulipFontAwesomeIcon {
74 TulipFontAwesomeIcon() {}
76 TulipFontAwesomeIcon(
const QString &iconName) : iconName(iconName) {}
85 Q_DECLARE_METATYPE(tlp::DoubleProperty*)
86 Q_DECLARE_METATYPE(tlp::DoubleVectorProperty*)
87 Q_DECLARE_METATYPE(std::vector<
double>)
89 Q_DECLARE_METATYPE(tlp::Color)
90 Q_DECLARE_METATYPE(tlp::ColorProperty*)
91 Q_DECLARE_METATYPE(tlp::ColorVectorProperty*)
92 Q_DECLARE_METATYPE(std::vector<tlp::Color>)
94 Q_DECLARE_METATYPE(tlp::Size)
95 Q_DECLARE_METATYPE(tlp::SizeProperty*)
96 Q_DECLARE_METATYPE(tlp::SizeVectorProperty*)
97 Q_DECLARE_METATYPE(std::vector<tlp::Size>)
99 Q_DECLARE_METATYPE(std::
string)
100 Q_DECLARE_METATYPE(tlp::StringProperty*)
101 Q_DECLARE_METATYPE(tlp::StringVectorProperty*)
102 Q_DECLARE_METATYPE(std::vector<std::
string>)
105 Q_DECLARE_METATYPE(tlp::LayoutProperty*)
106 Q_DECLARE_METATYPE(tlp::CoordVectorProperty*)
109 Q_DECLARE_METATYPE(tlp::Graph*)
110 Q_DECLARE_METATYPE(tlp::GraphProperty*)
112 Q_DECLARE_METATYPE(tlp::IntegerProperty*)
113 Q_DECLARE_METATYPE(tlp::IntegerVectorProperty*)
114 Q_DECLARE_METATYPE(std::vector<
int>)
116 Q_DECLARE_METATYPE(tlp::BooleanProperty*)
117 Q_DECLARE_METATYPE(tlp::BooleanVectorProperty*)
119 Q_DECLARE_METATYPE(QVector<
bool>)
121 Q_DECLARE_METATYPE(std::set<tlp::edge>)
123 Q_DECLARE_METATYPE(tlp::NumericProperty*)
125 Q_DECLARE_METATYPE(tlp::PropertyInterface*)
127 Q_DECLARE_METATYPE(tlp::ColorScale)
129 Q_DECLARE_METATYPE(tlp::StringCollection)
131 Q_DECLARE_METATYPE(TextureFile)
132 Q_DECLARE_METATYPE(TulipFileDescriptor)
133 Q_DECLARE_METATYPE(TulipFontAwesomeIcon)
135 Q_DECLARE_METATYPE(tlp::NodeShape::NodeShapes)
136 Q_DECLARE_METATYPE(tlp::EdgeShape::EdgeShapes)
137 Q_DECLARE_METATYPE(tlp::EdgeExtremityShape::EdgeExtremityShapes)
139 Q_DECLARE_METATYPE(tlp::LabelPosition::LabelPositions)
140 Q_DECLARE_METATYPE(tlp::TulipFont)
142 Q_DECLARE_METATYPE(QStringList)
145 class TLP_QT_SCOPE TulipMetaTypes {
153 result = *((T*)dm->
value);
155 return QVariant::fromValue<T>(result);
160 static QVariant dataTypeToQvariant(
tlp::DataType *,
const std::string& paramName);
163 class TLP_QT_SCOPE QStringListType:
public TypeInterface<QStringList> {
165 static void write(std::ostream&,
const RealType&);
166 static bool read(std::istream&, RealType&);
167 FORWARD_STRING_METHODS(QStringListType)
170 class TLP_QT_SCOPE QStringType:
public TypeInterface<QString> {
172 static void write(std::ostream&,
const RealType&);
173 static bool read(std::istream&, RealType&);
174 static std::string toString(
const RealType &);
175 static bool fromString(RealType &,
const std::string &);
178 extern void initQTypeSerializers();
182 #endif // TULIPMETATYPES_H
Describes a value of any type.
A container that can store data from any type.
void * value
The actual pointer to the element's data.