27 #include <tulip/Color.h>
28 #include <tulip/tulipconf.h>
29 #include <tulip/PropertyInterface.h>
38 TLP_QT_SCOPE
bool getColorDialog(
const QColor &color, QWidget *parent,
const QString &title,
41 inline QColor colorToQColor(
const Color &color) {
42 return QColor(color.getR(), color.getG(), color.getB(), color.getA());
44 inline Color QColorToColor(
const QColor &color) {
45 return Color(color.red(), color.green(), color.blue(), color.alpha());
51 return std::string(toConvert.toUtf8());
57 return QString::fromUtf8(toConvert.c_str());
64 return QString::localeAwareCompare(s1, s2) < 0;
99 TLP_QT_SCOPE QString getPluginStagingDirectory();
101 TLP_QT_SCOPE QString getPluginLocalInstallationDir();
103 TLP_QT_SCOPE QString localPluginsPath();
115 bool removeDiscardedPlugins =
false);
132 TLP_QT_SCOPE
void disableQtUserInput();
134 TLP_QT_SCOPE
void enableQtUserInput();
159 TLP_QT_SCOPE
const QCursor &QtWhatsThisCursor();
160 #define qtWhatsThisCursor QtWhatsThisCursor()
162 #define qtWhatsThisCursor Qt::WhatsThisCursor
168 inline QDebug operator<<(QDebug dbg,
const std::string &s) {
169 dbg.nospace() << s.c_str();
174 #if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
177 #define QT_ENDL Qt::endl
182 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc) \
183 a->setToolTip(QString(tt) + tlpStringToQString(" [⌘+") + sc + "]")
185 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc) a->setToolTip(QString(tt) + " [Ctrl+" + sc + "]")
188 #define SET_TIPS_WITH_CTRL_SHORTCUT(a, tt, sc) \
189 SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc); \
190 a->setStatusTip(a->toolTip())
193 #define HTML_LINK_COLOR "#0d71f1"
PropertyInterface describes the interface of a graph property.
virtual const std::string & getTypename() const =0
Gets a string describing the type of the property value (e.g. "graph", "double", "layout",...
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 redirectWarningOutputToQWarning()
redirect tlp::warning() to qWarning()
std::string QStringToTlpString(const QString &toConvert)
Convert a QString to a Tulip UTF-8 encoded std::string.
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 registerTextureFile(QString name, QString textureFilePath)
associate a texture file path to a name
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...
void initTulipSoftware(PluginLoader *loader=nullptr, bool removeDiscardedPlugins=false)
Sets up environment when creating an executable using Tulip libraries This method performs basic oper...
void convertLikeFilter(QString &filter)
convert sql like filter into an acceptable regexp
void redirectErrorOutputToQCritical()
redirect tlp::error() to qCritical()
void redirectDebugOutputToQDebug()
redirect tlp::debug() to qDebug()
std::string propertyTypeLabelToPropertyType(const QString &typeNameLabel)
Convert the label of a property type to it's corresponding property type. The property type label is ...
bool QStringCaseCmp(const QString &s1, const QString &s2)
Case insensitive comparison of two QStrings.
QString tlpStringToQString(const std::string &toConvert)
Convert a Tulip UTF-8 encoded std::string to a QString.
QString getRegisteredTextureFile(QString name)
return the texture file path associated to a name
void clearRegisteredTextureFiles()
forget all registered texture files
A callback class when loading plugins into Tulip.