QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsUserColorScheme Class Reference

A color scheme which stores its colors in a gpl palette file within the "palettes" subfolder off the user's QGIS settings folder. More...

#include <qgscolorscheme.h>

Inheritance diagram for QgsUserColorScheme:
Inheritance graph
[legend]

Public Member Functions

 QgsUserColorScheme (const QString filename)
 Constructs a new user color scheme, using a specified gpl palette file.
virtual ~QgsUserColorScheme ()
virtual QString schemeName () const
 Gets the name for the color scheme.
virtual QgsColorSchemeclone () const
 Clones a color scheme.
virtual bool isEditable () const
 Returns whether the color scheme is editable.
void setName (const QString name)
 Sets the name for the scheme.
bool erase ()
 Erases the associated gpl palette file from the users "palettes" folder.
- Public Member Functions inherited from QgsGplColorScheme
 QgsGplColorScheme ()
virtual ~QgsGplColorScheme ()
virtual QgsNamedColorList fetchColors (const QString context=QString(), const QColor baseColor=QColor())
 Gets a list of colors from the scheme.
virtual bool setColors (const QgsNamedColorList colors, const QString context=QString(), const QColor baseColor=QColor())
 Sets the colors for the scheme.
- Public Member Functions inherited from QgsColorScheme
 QgsColorScheme ()
virtual ~QgsColorScheme ()
virtual SchemeFlags flags () const
 Returns the current flags for the color scheme.

Protected Member Functions

virtual QString gplFilePath ()
 Returns the file path for the associated gpl palette file.

Protected Attributes

QString mName
QString mFilename

Additional Inherited Members

- Public Types inherited from QgsColorScheme
enum  SchemeFlag { ShowInColorDialog = 0x01, ShowInColorButtonMenu = 0x02, ShowInAllContexts = ShowInColorDialog | ShowInColorButtonMenu }
 Flags for controlling behaviour of color scheme. More...

Detailed Description

A color scheme which stores its colors in a gpl palette file within the "palettes" subfolder off the user's QGIS settings folder.

Note
Added in version 2.5

Constructor & Destructor Documentation

QgsUserColorScheme::QgsUserColorScheme ( const QString  filename)

Constructs a new user color scheme, using a specified gpl palette file.

Parameters
filenamefilename of gpl palette file stored in the users "palettes" folder
QgsUserColorScheme::~QgsUserColorScheme ( )
virtual

Member Function Documentation

QgsColorScheme * QgsUserColorScheme::clone ( ) const
virtual

Clones a color scheme.

Returns
copy of color scheme

Implements QgsColorScheme.

bool QgsUserColorScheme::erase ( )

Erases the associated gpl palette file from the users "palettes" folder.

Returns
true if erase was successful
QString QgsUserColorScheme::gplFilePath ( )
protectedvirtual

Returns the file path for the associated gpl palette file.

Returns
gpl file path

Implements QgsGplColorScheme.

virtual bool QgsUserColorScheme::isEditable ( ) const
inlinevirtual

Returns whether the color scheme is editable.

Returns
true if scheme is editable
See Also
setColors

Reimplemented from QgsColorScheme.

QString QgsUserColorScheme::schemeName ( ) const
virtual

Gets the name for the color scheme.

Returns
color scheme name

Implements QgsColorScheme.

void QgsUserColorScheme::setName ( const QString  name)
inline

Sets the name for the scheme.

Parameters
namenew name

Member Data Documentation

QString QgsUserColorScheme::mFilename
protected
QString QgsUserColorScheme::mName
protected

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