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)
54 : absolutePath(absolutePath), type(fileType), mustExist(existing) {}
55 TulipFileDescriptor(
const TulipFileDescriptor &d) {
56 absolutePath = d.absolutePath;
58 mustExist = d.mustExist;
64 QString fileFilterPattern;
70 TextureFile(
const QString &texturePath) : texturePath(texturePath) {}
73 struct TulipFontIcon {
77 TulipFontIcon(
const QString &iconName) : iconName(iconName) {}
87 Q_DECLARE_METATYPE(std::vector<double>)
89 Q_DECLARE_METATYPE(tlp::Color)
92 Q_DECLARE_METATYPE(std::vector<tlp::Color>)
94 Q_DECLARE_METATYPE(tlp::Size)
97 Q_DECLARE_METATYPE(std::vector<tlp::Size>)
99 Q_DECLARE_METATYPE(std::string)
102 Q_DECLARE_METATYPE(std::vector<std::string>)
114 Q_DECLARE_METATYPE(std::vector<int>)
119 Q_DECLARE_METATYPE(QVector<bool>)
123 Q_DECLARE_METATYPE(std::set<tlp::edge>)
131 Q_DECLARE_METATYPE(tlp::StringCollection)
133 Q_DECLARE_METATYPE(TextureFile)
134 Q_DECLARE_METATYPE(TulipFileDescriptor)
135 Q_DECLARE_METATYPE(TulipFontIcon)
137 Q_DECLARE_METATYPE(tlp::NodeShape::NodeShapes)
138 Q_DECLARE_METATYPE(tlp::EdgeShape::EdgeShapes)
139 Q_DECLARE_METATYPE(tlp::EdgeExtremityShape::EdgeExtremityShapes)
141 Q_DECLARE_METATYPE(tlp::LabelPosition::LabelPositions)
142 Q_DECLARE_METATYPE(tlp::TulipFont)
144 Q_DECLARE_METATYPE(QStringList)
147 class TLP_QT_SCOPE TulipMetaTypes {
150 template <
typename T>
155 result = *(
static_cast<T *
>(dm->
value));
157 return QVariant::fromValue<T>(result);
162 static QVariant dataTypeToQvariant(
tlp::DataType *,
const std::string ¶mName);
165 class TLP_QT_SCOPE QStringListType :
public TypeInterface<QStringList> {
167 static void write(std::ostream &,
const RealType &);
168 static bool read(std::istream &, RealType &);
169 FORWARD_STRING_METHODS(QStringListType)
172 class TLP_QT_SCOPE QStringType :
public TypeInterface<QString> {
174 static void write(std::ostream &,
const RealType &);
175 static bool read(std::istream &, RealType &);
176 static std::string toString(
const RealType &);
177 static bool fromString(RealType &,
const std::string &);
180 extern void initQTypeSerializers();
183 #endif // TULIPMETATYPES_H A graph property that maps a std::vector<tlp::Color> value to graph elements.
A graph property that maps a std::vector<tlp::Coord> value to graph elements.
A graph property that maps a boolean value to graph elements.
PropertyInterface describes the interface of a graph property.
Describes a value of any type.
A container that can store data from any type.
A graph property that maps a std::vector<std::string> value to graph elements.
This class represents a color scale to perform color mapping. The color scale can be either a gradien...
The edge struct represents an edge in a Graph object.
The node struct represents a node in a Graph object.
A graph property that maps a std::string value to graph elements.
A graph property that maps a std::vector<int> value to graph elements.
A graph property that maps a tlp::Graph* value to graph elements.
A graph property that maps a tlp::Size value to graph elements.
A graph property that maps a double value to graph elements.
Interface all numerical properties. Property values are always returned as double.
void * value
The actual pointer to the element's data.
A graph property that maps a std::vector<bool> value to graph elements.
A graph property that maps a std::vector<tlp::Size> value to graph elements.
A graph property that maps a std::vector<double> value to graph elements.
A graph property that maps a tlp::Color value to graph elements.
A graph property that maps an integer value to graph elements.
A graph property that maps a tlp::Coord value to graph nodes and std::vector<tlp::Coord> for edges...