This class represents a group of color schemes. More...
#include <ColorSchemeGroup.h>
Public Member Functions | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
ColorSchemeGroup (const std::string &name) | |
It initializes a new ColorSchemeGroup and adds it to the parent catalog. More... | |
~ColorSchemeGroup () | |
Destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
const std::string & | getName () const |
It returns the group name. More... | |
void | setName (const std::string &name) |
It sets the group name and adjust its entry in its the catalog if needed. More... | |
const std::string & | getDescription () const |
It returns the group description. More... | |
void | setDescription (const std::string &d) |
It sets the group description. More... | |
void | push_back (ColorScheme *colorScheme) |
It adds a new color scheme to the group and sets its relationship. More... | |
void | disconnect (ColorScheme *colorScheme) |
It just remove the reference to the informed color scheme. More... | |
const std::vector< ColorScheme * > & | getColorSchemes () const |
It returns a reference to the list of color schemes belonging to this group. More... | |
ColorSchemeCatalog * | getParent () const |
It returns the parent catalog or NULL if it doesn't belong to a catalog. More... | |
Private Member Functions | |
Copy Constructor and Assignment Operator | |
Copy constructor and assignment operator not allowed. | |
ColorSchemeGroup (const ColorSchemeGroup &rhs) | |
Copy constructor not allowed. More... | |
ColorSchemeGroup & | operator= (const ColorSchemeGroup &rhs) |
Assignment operator not allowed. More... | |
Auxiliary Methods | |
Auxiliary methods. | |
void | setParent (ColorSchemeCatalog *parent) |
It sets the parent color catalog for this group. More... | |
Private Attributes | |
std::vector< ColorScheme * > | m_colorSchemes |
The group of color schemes. More... | |
std::string | m_description |
A brief description about the color scheme, that can helps someone to decide to use it or not (when its use can be best applied). More... | |
std::string | m_name |
Color scheme name. More... | |
ColorSchemeCatalog * | m_parent |
The parent catalog. More... | |
Friends | |
class | ColorSchemeCatalog |
This class represents a group of color schemes.
It is used to group color schemes.
Definition at line 55 of file ColorSchemeGroup.h.
te::color::ColorSchemeGroup::ColorSchemeGroup | ( | const std::string & | name | ) |
It initializes a new ColorSchemeGroup and adds it to the parent catalog.
name | Color scheme group name. |
Definition at line 36 of file ColorSchemeGroup.cpp.
te::color::ColorSchemeGroup::~ColorSchemeGroup | ( | ) |
Destructor.
Definition at line 42 of file ColorSchemeGroup.cpp.
References te::common::FreeContents().
|
private |
Copy constructor not allowed.
rhs | The right-hand-side copy that would be used to copy from. |
void te::color::ColorSchemeGroup::disconnect | ( | ColorScheme * | colorScheme | ) |
It just remove the reference to the informed color scheme.
colorScheme | The color scheme to be disconnected from this group. |
Definition at line 84 of file ColorSchemeGroup.cpp.
const std::vector< te::color::ColorScheme * > & te::color::ColorSchemeGroup::getColorSchemes | ( | ) | const |
It returns a reference to the list of color schemes belonging to this group.
Definition at line 92 of file ColorSchemeGroup.cpp.
Referenced by te::sa::GetColorBar(), te::qt::widgets::ColorCatalogWidget::onGroupComboBoxActivated(), and te::qt::widgets::ColorCatalogWidget::onSchemaComboBoxActivated().
const std::string & te::color::ColorSchemeGroup::getDescription | ( | ) | const |
It returns the group description.
Definition at line 67 of file ColorSchemeGroup.cpp.
const std::string & te::color::ColorSchemeGroup::getName | ( | ) | const |
It returns the group name.
Definition at line 47 of file ColorSchemeGroup.cpp.
Referenced by te::sa::GetColorBar(), te::qt::widgets::ColorCatalogWidget::onCatalogComboBoxActivated(), te::qt::widgets::ColorCatalogWidget::onGroupComboBoxActivated(), and te::qt::widgets::ColorCatalogWidget::onSchemaComboBoxActivated().
te::color::ColorSchemeCatalog * te::color::ColorSchemeGroup::getParent | ( | ) | const |
It returns the parent catalog or NULL if it doesn't belong to a catalog.
Definition at line 97 of file ColorSchemeGroup.cpp.
|
private |
Assignment operator not allowed.
rhs | The right-hand-side copy that would be used to copy from. |
void te::color::ColorSchemeGroup::push_back | ( | ColorScheme * | colorScheme | ) |
It adds a new color scheme to the group and sets its relationship.
colorScheme | The color scheme that will take part of the group. |
Definition at line 77 of file ColorSchemeGroup.cpp.
References te::color::ColorScheme::getParent(), and te::color::ColorScheme::setParent().
void te::color::ColorSchemeGroup::setDescription | ( | const std::string & | d | ) |
It sets the group description.
d | The group description. |
Definition at line 72 of file ColorSchemeGroup.cpp.
void te::color::ColorSchemeGroup::setName | ( | const std::string & | name | ) |
It sets the group name and adjust its entry in its the catalog if needed.
name | The group name. |
Definition at line 52 of file ColorSchemeGroup.cpp.
|
private |
It sets the parent color catalog for this group.
parent | The parent catalog. |
Definition at line 102 of file ColorSchemeGroup.cpp.
Referenced by te::color::ColorSchemeCatalog::push_back().
|
friend |
Definition at line 193 of file ColorSchemeGroup.h.
|
private |
The group of color schemes.
Definition at line 191 of file ColorSchemeGroup.h.
|
private |
A brief description about the color scheme, that can helps someone to decide to use it or not (when its use can be best applied).
Definition at line 190 of file ColorSchemeGroup.h.
|
private |
Color scheme name.
Definition at line 189 of file ColorSchemeGroup.h.
|
private |
The parent catalog.
Definition at line 188 of file ColorSchemeGroup.h.