Tulip  5.1.0
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.

Since
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

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

Returns the color scale registered with the provided name.

Warning
If there is no such colorscale, the returned one will be empty.
static std::list<std::string> tlp::ColorScalesManager::getColorScalesList ( )
static

Returns a list of the registered color scales names.

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

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

Warning
If there is already a color scale registered with such a name, it will not be overwritten.
static void tlp::ColorScalesManager::removeColorScale ( const std::string &  colorScaleName)
static

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