It models the concept of color scheme. More...
#include <ColorScheme.h>
Public Member Functions | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| ColorScheme (const std::string &name) | |
| It initializes a new ColorScheme and adds it to the parent group of schemes. More... | |
| ~ColorScheme () | |
| Destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
| const std::string & | getName () const |
| It returns the color schema name. More... | |
| void | setName (const std::string &name) |
| It sets the color schema name and adjust its entry in the scheme group if needed. More... | |
| void | push_back (std::vector< RGBAColor > *colors) |
| It adds a new list of colors to the color scheme. More... | |
| const std::vector< std::vector < RGBAColor > * > & | getColors () const |
| It returns all color lists. More... | |
| std::vector< RGBAColor > * | getColors (size_t size) const |
| It returns a color list having the specified number of elements or NULL if none is found. More... | |
| ColorSchemeGroup * | getParent () const |
| It returns the parent scheme group or NULL if it doesn't belong to a group. More... | |
Private Member Functions | |
Copy Constructor and Assignment Operator | |
Copy constructor and assignment operator not allowed. | |
| ColorScheme (const ColorScheme &rhs) | |
| Copy constructor not allowed. More... | |
| ColorScheme & | operator= (const ColorScheme &rhs) |
| Assignment operator not allowed. More... | |
Auxiliary Methods | |
Auxiliary methods. | |
| void | setParent (ColorSchemeGroup *parent) |
| It sets the parent color scheme group for this scheme. More... | |
Private Attributes | |
| std::vector< std::vector < RGBAColor > * > | m_colorSet |
| A set of color list. More... | |
| std::string | m_name |
| Color scheme name. More... | |
| ColorSchemeGroup * | m_parent |
| A pointer to the parent group. More... | |
Friends | |
| class | ColorSchemeGroup |
It models the concept of color scheme.
It is used to construct color scheme catalogs, that helps the user to decide the right colors to use in a map. A color scheme has a name and a set of list colors. Each list can have a certain number of colors.
Definition at line 58 of file ColorScheme.h.
| te::color::ColorScheme::ColorScheme | ( | const std::string & | name | ) |
It initializes a new ColorScheme and adds it to the parent group of schemes.
| name | Color schema name. |
Definition at line 31 of file ColorScheme.cpp.
| te::color::ColorScheme::~ColorScheme | ( | ) |
|
private |
Copy constructor not allowed.
| rhs | The right-hand-side copy that would be used to copy from. |
| const std::vector< std::vector< te::color::RGBAColor > * > & te::color::ColorScheme::getColors | ( | ) | const |
| std::vector< te::color::RGBAColor > * te::color::ColorScheme::getColors | ( | size_t | size | ) | const |
It returns a color list having the specified number of elements or NULL if none is found.
This method will look up a list of color in the scheme that has the choosen number of colors. If it can not find one, it will return NULL.
| size | The number of elements needed for the color scheme. |
Definition at line 73 of file ColorScheme.cpp.
| const std::string & te::color::ColorScheme::getName | ( | ) | const |
It returns the color schema name.
Definition at line 42 of file ColorScheme.cpp.
| te::color::ColorSchemeGroup * te::color::ColorScheme::getParent | ( | ) | const |
It returns the parent scheme group or NULL if it doesn't belong to a group.
Definition at line 84 of file ColorScheme.cpp.
Referenced by te::color::ColorSchemeGroup::push_back().
|
private |
Assignment operator not allowed.
| rhs | The right-hand-side copy that would be used to copy from. |
| void te::color::ColorScheme::push_back | ( | std::vector< RGBAColor > * | colors | ) |
It adds a new list of colors to the color scheme.
| colors | The new list of colors to be added to the scheme. |
Definition at line 62 of file ColorScheme.cpp.
| void te::color::ColorScheme::setName | ( | const std::string & | name | ) |
It sets the color schema name and adjust its entry in the scheme group if needed.
| name | The new color schema name. |
Definition at line 47 of file ColorScheme.cpp.
|
private |
It sets the parent color scheme group for this scheme.
| parent | The parent color scheme group. |
Definition at line 89 of file ColorScheme.cpp.
Referenced by te::color::ColorSchemeGroup::push_back().
|
friend |
Definition at line 186 of file ColorScheme.h.
|
private |
A set of color list.
Definition at line 184 of file ColorScheme.h.
|
private |
Color scheme name.
Definition at line 183 of file ColorScheme.h.
|
private |
A pointer to the parent group.
Definition at line 182 of file ColorScheme.h.