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,
40 inline QColor colorToQColor(
const Color &color) {
41 return QColor(color.getR(), color.getG(), color.getB(), color.getA());
43 inline Color QColorToColor(
const QColor &color) {
44 return Color(color.red(), color.green(), color.blue(), color.alpha());
50 return std::string(toConvert.toUtf8());
56 return QString::fromUtf8(toConvert.c_str());
63 return QString::localeAwareCompare(s1, s2) < 0;
98 TLP_QT_SCOPE QString getPluginStagingDirectory();
100 TLP_QT_SCOPE QString getPluginLocalInstallationDir();
102 TLP_QT_SCOPE QString localPluginsPath();
114 bool removeDiscardedPlugins =
false);
131 TLP_QT_SCOPE
void disableQtUserInput();
133 TLP_QT_SCOPE
void enableQtUserInput();
137 inline QDebug
operator<<(QDebug dbg,
const std::string &s) {
138 dbg.nospace() << s.c_str();
144 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc) \ 145 a->setToolTip(QString(tt) + tlpStringToQString(" [⌘+") + sc + "]") 147 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc) a->setToolTip(QString(tt) + " [Ctrl+" + sc + "]") 150 #define SET_TIPS_WITH_CTRL_SHORTCUT(a, tt, sc) \ 151 SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc); \ 152 a->setStatusTip(a->toolTip()) void redirectDebugOutputToQDebug()
redirect tlp::debug() to qDebug()
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...
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...
void initTulipSoftware(PluginLoader *loader=nullptr, bool removeDiscardedPlugins=false)
Sets up environment when creating an executable using Tulip libraries This method performs basic oper...
A callback class when loading plugins into Tulip.
std::ostream & operator<<(std::ostream &os, const Array< T, N > &array)
operator << stream operator to easily print an array, or save it to a file.
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...