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());
49 return std::string(toConvert.toUtf8());
55 return QString::fromUtf8(toConvert.c_str());
62 return QString::localeAwareCompare(s1, s2) < 0;
97 TLP_QT_SCOPE QString getPluginStagingDirectory();
99 TLP_QT_SCOPE QString getPluginLocalInstallationDir();
101 TLP_QT_SCOPE QString localPluginsPath();
129 TLP_QT_SCOPE
void disableQtUserInput();
131 TLP_QT_SCOPE
void enableQtUserInput();
136 inline QDebug
operator<<(QDebug dbg,
const std::string& s) {
137 dbg.nospace() << s.c_str();
143 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc) a->setToolTip(QString(tt) + tlpStringToQString(" [⌘+") + sc + "]") 145 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc) a->setToolTip(QString(tt) + " [Ctrl+" + sc + "]") 148 #define SET_TIPS_WITH_CTRL_SHORTCUT(a, tt, sc) SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc);a->setStatusTip(a->toolTip()) void redirectDebugOutputToQDebug()
redirect tlp::debug() to qDebug()
std::ostream & operator<<(std::ostream &os, const Array< Obj, SIZE > &array)
operator << stream operator to easily print an array, or save it to a file.
PropertyInterface describes the interface of a graph property.
void redirectWarningOutputToQWarning()
redirect tlp::warning() to qWarning()
bool QStringCaseCmp(const QString &s1, const QString &s2)
Case insensitive comparison of two QStrings.
void redirectErrorOutputToQCritical()
redirect tlp::error() to qCritical()
std::string QStringToTlpString(const QString &toConvert)
Convert a QString to a Tulip UTF-8 encoded std::string.
std::string propertyTypeLabelToPropertyType(const QString &typeNameLabel)
Convert the label of a property type to it's corresponding property type. The property type label is ...
QString propertyInterfaceToPropertyTypeLabel(const tlp::PropertyInterface *const property)
Get the string to display as property type for the given property. The property type label is the str...
void initTulipSoftware(PluginLoader *loader=NULL, bool removeDiscardedPlugins=false)
Sets up environment when creating an executable using Tulip libraries This method performs basic oper...
QString tlpStringToQString(const std::string &toConvert)
Convert a Tulip UTF-8 encoded std::string to a QString.
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").
QString propertyTypeToPropertyTypeLabel(const std::string &typeName)
Convert the property type string to a label to display in the GUI. The property type label is the str...
A callback class when loading plugins into Tulip.
QString getPluginPackageName(const QString &pluginName)
Gets the name of the package to retrieve for this version of tulip. The package name uses the Tulip r...