DISPLACE  1.0
A spatial model of fisheries to help sustainable fishing and maritime spatial planning
PaletteManager Class Reference

#include <palettemanager.h>

Public Member Functions

 PaletteManager ()
 
 ~PaletteManager ()
 
const Palettepalette (PaletteRole) const
 
std::shared_ptr< Palettepalette (const QString &n) const
 
void setPalette (PaletteRole n, const Palette &palette)
 
int paletteCount () const
 
bool isPalettePresent (const QString &name) const
 
void removePalette (const QString &name)
 
void removePalette (const Palette &view)
 

Static Public Member Functions

static PaletteManagerinstance ()
 

Protected Types

typedef QMap< QString, std::shared_ptr< Palette > > PaletteMapContainer
 
typedef QList< std::shared_ptr< Palette > > PaletteListContainer
 

Protected Attributes

PaletteMapContainer m_map
 
PaletteListContainer m_list
 

Static Protected Attributes

static PaletteManagermInstance = 0
 
static const QString defaultPaletteFileNames []
 

Member Typedef Documentation

◆ PaletteListContainer

typedef QList<std::shared_ptr<Palette> > PaletteManager::PaletteListContainer
protected

◆ PaletteMapContainer

typedef QMap<QString, std::shared_ptr<Palette> > PaletteManager::PaletteMapContainer
protected

Constructor & Destructor Documentation

◆ PaletteManager()

PaletteManager::PaletteManager ( )

◆ ~PaletteManager()

PaletteManager::~PaletteManager ( )

Member Function Documentation

◆ instance()

static PaletteManager* PaletteManager::instance ( )
inlinestatic

◆ isPalettePresent()

bool PaletteManager::isPalettePresent ( const QString &  name) const

◆ palette() [1/2]

const Palette & PaletteManager::palette ( PaletteRole  n) const

◆ palette() [2/2]

std::shared_ptr< Palette > PaletteManager::palette ( const QString &  n) const

◆ paletteCount()

int PaletteManager::paletteCount ( ) const

◆ removePalette() [1/2]

void PaletteManager::removePalette ( const QString &  name)

◆ removePalette() [2/2]

void PaletteManager::removePalette ( const Palette view)

◆ setPalette()

void PaletteManager::setPalette ( PaletteRole  n,
const Palette palette 
)

Member Data Documentation

◆ defaultPaletteFileNames

const QString PaletteManager::defaultPaletteFileNames
staticprotected
Initial value:
= {
":/palettes/heat_colors_12.p2c",
":/palettes/heat_colors_12_0_to_1.p2c",
":/palettes/pop_colors.p2c",
":/palettes/tariffs_colors.p2c",
":/palettes/benthos_colors.p2c",
":/palettes/fishfarms_colors.p2c",
":/palettes/bathy_colors.p2c",
":/palettes/salinity_colors.p2c",
":/palettes/sst_colors.p2c",
":/palettes/wind_colors.p2c",
":/palettes/nitrogen_colors.p2c",
":/palettes/phosphorus_colors.p2c",
":/palettes/oxygen_colors.p2c",
":/palettes/dissolvedcarbon_colors.p2c",
":/palettes/shippingdensity_colors.p2c",
":/palettes/siltfraction_colors.p2c"
}

◆ m_list

PaletteListContainer PaletteManager::m_list
protected

◆ m_map

PaletteMapContainer PaletteManager::m_map
protected

◆ mInstance

PaletteManager * PaletteManager::mInstance = 0
staticprotected

The documentation for this class was generated from the following files: