26 #include <tulip/Color.h>
27 #include <tulip/tulipconf.h>
28 #include <tulip/PropertyInterface.h>
37 TLP_QT_SCOPE
bool getColorDialog(
const QColor &color,QWidget *parent,
const QString &title,QColor &result);
39 inline QColor colorToQColor(
const Color& color) {
40 return QColor(color.getR(), color.getG(), color.getB(), color.getA());
42 inline Color QColorToColor(
const QColor& color) {
43 return Color(color.red(), color.green(), color.blue(), color.alpha());
48 inline std::string QStringToTlpString(
const QString& toConvert) {
49 return std::string(toConvert.toUtf8());
54 inline QString tlpStringToQString(
const std::string& toConvert) {
55 return QString::fromUtf8(toConvert.c_str());
61 inline bool QStringCaseCmp(
const QString& s1,
const QString& s2) {
62 return QString::localeAwareCompare(s1, s2) < 0;
71 TLP_QT_SCOPE QString propertyTypeToPropertyTypeLabel(
const std::string& typeName);
79 return propertyTypeToPropertyTypeLabel(property->
getTypename());
87 TLP_QT_SCOPE std::string propertyTypeLabelToPropertyType(
const QString& typeNameLabel);
95 TLP_QT_SCOPE QString getPluginPackageName(
const QString& pluginName);
97 TLP_QT_SCOPE QString getPluginStagingDirectory();
99 TLP_QT_SCOPE QString getPluginLocalInstallationDir();
101 TLP_QT_SCOPE QString localPluginsPath();
112 extern TLP_QT_SCOPE
void initTulipSoftware(PluginLoader *loader = NULL,
bool removeDiscardedPlugins=
false);
117 TLP_QT_SCOPE
void redirectDebugOutputToQDebug();
122 TLP_QT_SCOPE
void redirectWarningOutputToQWarning();
127 TLP_QT_SCOPE
void redirectErrorOutputToQCritical();
130 TLP_QT_SCOPE
bool inGuiTestingMode();
132 TLP_QT_SCOPE
void setGuiTestingMode(
bool);
134 TLP_QT_SCOPE
void disableQtUserInput();
136 TLP_QT_SCOPE
void enableQtUserInput();
141 inline QDebug operator<<(QDebug dbg,
const std::string& s) {
142 dbg.nospace() << s.c_str();
PropertyInterface describes the interface of a graph property.
virtual const std::string & getTypename() const =0
Gets a string describing the type of the property (e.g. "graph", "double", "layout", "string", "integer", "color", "size").