21#ifndef TULIPMETATYPES_H
22#define TULIPMETATYPES_H
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/PropertiesCollection.h>
46#include <tulip/StringCollection.h>
47#include <tulip/TulipViewSettings.h>
50struct TulipFileDescriptor {
51 enum FileType { File, Directory };
53 TulipFileDescriptor() {}
54 TulipFileDescriptor(
const QString &absolutePath, FileType fileType,
bool existing =
true)
55 : absolutePath(absolutePath), type(fileType), mustExist(existing) {}
56 TulipFileDescriptor(
const TulipFileDescriptor &d) {
57 absolutePath = d.absolutePath;
59 mustExist = d.mustExist;
61 TulipFileDescriptor &operator=(
const TulipFileDescriptor &) =
default;
66 QString fileFilterPattern;
72 TextureFile(
const QString &texturePath) : texturePath(texturePath) {}
79 TulipFontIcon(
const QString &iconName) : iconName(iconName) {}
89Q_DECLARE_METATYPE(std::vector<double>)
91Q_DECLARE_METATYPE(tlp::Color)
94Q_DECLARE_METATYPE(std::vector<tlp::Color>)
96Q_DECLARE_METATYPE(tlp::Size)
99Q_DECLARE_METATYPE(std::vector<tlp::Size>)
101Q_DECLARE_METATYPE(std::string)
104Q_DECLARE_METATYPE(std::vector<std::string>)
116Q_DECLARE_METATYPE(std::vector<int>)
121Q_DECLARE_METATYPE(QVector<bool>)
125Q_DECLARE_METATYPE(std::set<tlp::edge>)
133Q_DECLARE_METATYPE(tlp::StringCollection)
134Q_DECLARE_METATYPE(tlp::PropertiesCollection)
136Q_DECLARE_METATYPE(TextureFile)
137Q_DECLARE_METATYPE(TulipFileDescriptor)
138Q_DECLARE_METATYPE(TulipFontIcon)
140Q_DECLARE_METATYPE(tlp::NodeShape::NodeShapes)
141Q_DECLARE_METATYPE(tlp::EdgeShape::EdgeShapes)
142Q_DECLARE_METATYPE(tlp::EdgeExtremityShape::EdgeExtremityShapes)
144Q_DECLARE_METATYPE(tlp::LabelPosition::LabelPositions)
145Q_DECLARE_METATYPE(tlp::TulipFont)
147Q_DECLARE_METATYPE(QStringList)
150class TLP_QT_SCOPE TulipMetaTypes {
153 template <
typename T>
158 result = *(
static_cast<T *
>(dm->
value));
160 return QVariant::fromValue<T>(result);
165 static QVariant dataTypeToQvariant(
tlp::DataType *,
const std::string ¶mName);
168class TLP_QT_SCOPE QStringListType :
public TypeInterface<QStringList> {
170 static void write(std::ostream &,
const RealType &);
171 static bool read(std::istream &, RealType &);
172 FORWARD_STRING_METHODS(QStringListType)
175class TLP_QT_SCOPE QStringType :
public TypeInterface<QString> {
177 static void write(std::ostream &,
const RealType &);
178 static bool read(std::istream &, RealType &);
179 static std::string toString(
const RealType &);
180 static bool fromString(RealType &,
const std::string &);
183extern void initQTypeSerializers();
A graph property that maps a Boolean value to graph elements.
A graph property that maps a std::vector<bool> value to graph elements.
A graph property that maps a tlp::Color value to graph elements.
This class represents a color scale to perform color mapping. The color scale can be either a gradien...
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 container that can store data from any type.
A graph property that maps a double value to graph elements.
A graph property that maps a std::vector<double> value to graph elements.
A graph property that maps a tlp::Graph* value to graph elements.
A graph property that maps an integer value to graph elements.
A graph property that maps a std::vector<int> value to graph elements.
A graph property that maps a tlp::Coord value to graph nodes and std::vector<tlp::Coord> for edges.
Interface all numerical properties. Property values are always returned as double.
PropertyInterface describes the interface of a graph property.
A graph property that maps a tlp::Size 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::string value to graph elements.
A graph property that maps a std::vector<std::string> value to graph elements.
Describes a value of any type.
void * value
The actual pointer to the element's data.
The edge struct represents an edge in a Graph object.
The node struct represents a node in a Graph object.