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();
 
  130 TLP_QT_SCOPE 
void disableQtUserInput();
 
  132 TLP_QT_SCOPE 
void enableQtUserInput();
 
  159 #define qtWhatsThisCursor Qt::PointingHandCursor 
  163 void tlpFixCBRBs(QWidget *parent);
 
  165 #define tlpFixCBRBs(arg) 
  171 inline QDebug operator<<(QDebug dbg, 
const std::string &s) {
 
  172   dbg.nospace() << s.c_str();
 
  178 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc)                                                  \ 
  179   a->setToolTip(QString(tt) + tlpStringToQString(" [⌘+") + sc + "]")
 
  181 #define SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc) a->setToolTip(QString(tt) + " [Ctrl+" + sc + "]")
 
  184 #define SET_TIPS_WITH_CTRL_SHORTCUT(a, tt, sc)                                                     \ 
  185   SET_TOOLTIP_WITH_CTRL_SHORTCUT(a, tt, sc);                                                       \ 
  186   a->setStatusTip(a->toolTip()) 
  189 #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)
Sets up environment when creating an executable using Tulip libraries This method performs basic oper...
 
bool checkInternetAccess(unsigned int time=1000)
check for possible internet access waiting for time ms
 
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.