Tulip  5.2.1
Large graphs analysis and drawing
tlp::ColorScalesManager Class Reference

#include <ColorScalesManager.h>

Static Public Member Functions

static tlp::ColorScale getColorScale (const std::string &colorScaleName)
static std::list< std::string > getColorScalesList ()
static ColorScale getLatestColorScale ()
static void registerColorScale (const std::string &colorScaleName, const tlp::ColorScale &colorScale)
static void removeColorScale (const std::string &colorScaleName)
static void setLatestColorScale (ColorScale &cs)

Detailed Description

Helper class for handling Tulip color scales.

Tulip 4.10

That static class aims to facilitate working with Tulip color scales. It allows to easily retrieve Tulip predefined ones but also to register new ones in a persistent database for further reuse.

Definition at line 20 of file ColorScalesManager.h.

Member Function Documentation

◆ getColorScale()

static tlp::ColorScale tlp::ColorScalesManager::getColorScale ( const std::string &  colorScaleName)

Returns the color scale registered with the provided name.

If there is no such colorscale, the returned one will be empty.

◆ getColorScalesList()

static std::list<std::string> tlp::ColorScalesManager::getColorScalesList ( )

Returns a list of the registered color scales names.

◆ registerColorScale()

static void tlp::ColorScalesManager::registerColorScale ( const std::string &  colorScaleName,
const tlp::ColorScale colorScale 

Registers a color scale in the persistent database for further reuse.

If there is already a color scale registered with such a name, it will not be overwritten.

◆ removeColorScale()

static void tlp::ColorScalesManager::removeColorScale ( const std::string &  colorScaleName)

Removes the color scale registered with the provided name from the persistent database.