All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::color::ColorSchemeGroup Class Reference

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...
 
ColorSchemeCataloggetParent () 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...
 
ColorSchemeGroupoperator= (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...
 
ColorSchemeCatalogm_parent
 The parent catalog. More...
 

Friends

class ColorSchemeCatalog
 

Detailed Description

This class represents a group of color schemes.

It is used to group color schemes.

See also
ColorScheme, ColorSchemeCatalog, ColorSchemeCatalogManager

Definition at line 55 of file ColorSchemeGroup.h.

Constructor & Destructor Documentation

te::color::ColorSchemeGroup::ColorSchemeGroup ( const std::string &  name)

It initializes a new ColorSchemeGroup and adds it to the parent catalog.

Parameters
nameColor 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().

te::color::ColorSchemeGroup::ColorSchemeGroup ( const ColorSchemeGroup rhs)
private

Copy constructor not allowed.

Parameters
rhsThe right-hand-side copy that would be used to copy from.

Member Function Documentation

void te::color::ColorSchemeGroup::disconnect ( ColorScheme colorScheme)

It just remove the reference to the informed color scheme.

Parameters
colorSchemeThe color scheme to be disconnected from this group.
Note
The caller of this method will take the ownership of the color scheme.

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.

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.

Returns
The group description.

Definition at line 67 of file ColorSchemeGroup.cpp.

const std::string & te::color::ColorSchemeGroup::getName ( ) const
te::color::ColorSchemeCatalog * te::color::ColorSchemeGroup::getParent ( ) const

It returns the parent catalog or NULL if it doesn't belong to a catalog.

Returns
The parent catalog or NULL if it doesn't belong to a catalog.

Definition at line 97 of file ColorSchemeGroup.cpp.

ColorSchemeGroup& te::color::ColorSchemeGroup::operator= ( const ColorSchemeGroup rhs)
private

Assignment operator not allowed.

Parameters
rhsThe right-hand-side copy that would be used to copy from.
Returns
A reference to this object.
void te::color::ColorSchemeGroup::push_back ( ColorScheme colorScheme)

It adds a new color scheme to the group and sets its relationship.

Parameters
colorSchemeThe color scheme that will take part of the group.
Note
The color group will take the ownership of the color scheme.
Don't inform a NULL pointer.

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.

Parameters
dThe 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.

Parameters
nameThe group name.

Definition at line 52 of file ColorSchemeGroup.cpp.

void te::color::ColorSchemeGroup::setParent ( ColorSchemeCatalog parent)
private

It sets the parent color catalog for this group.

Parameters
parentThe parent catalog.
Note
This method is intended to be used by a ColorSchemeCatalog object.

Definition at line 102 of file ColorSchemeGroup.cpp.

Referenced by te::color::ColorSchemeCatalog::push_back().

Friends And Related Function Documentation

friend class ColorSchemeCatalog
friend

Definition at line 193 of file ColorSchemeGroup.h.

Member Data Documentation

std::vector<ColorScheme*> te::color::ColorSchemeGroup::m_colorSchemes
private

The group of color schemes.

Definition at line 191 of file ColorSchemeGroup.h.

std::string te::color::ColorSchemeGroup::m_description
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.

std::string te::color::ColorSchemeGroup::m_name
private

Color scheme name.

Definition at line 189 of file ColorSchemeGroup.h.

ColorSchemeCatalog* te::color::ColorSchemeGroup::m_parent
private

The parent catalog.

Definition at line 188 of file ColorSchemeGroup.h.


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