QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Signals | Public Member Functions | List of all members
QgsColorSwatchGridAction Class Reference

#include <qgscolorswatchgrid.h>

Public Slots

void refreshColors ()
 Reload colors from scheme and redraws the widget.

Signals

void colorChanged (const QColor &color)
 Emitted when a color has been selected from the widget.

Public Member Functions

 QgsColorSwatchGridAction (QgsColorScheme *scheme, QMenu *menu=0, QString context=QString(), QWidget *parent=0)
 Construct a new color swatch grid action.
virtual ~QgsColorSwatchGridAction ()
QColor baseColor () const
 Get the base color for the color grid.
QString context () const
 Get the current context for the color grid.
void setBaseColor (const QColor &baseColor)
 Sets the base color for the color grid.
void setContext (const QString &context)
 Sets the current context for the color grid.

Detailed Description

Definition at line 158 of file qgscolorswatchgrid.h.

Constructor & Destructor Documentation

QgsColorSwatchGridAction::QgsColorSwatchGridAction ( QgsColorScheme scheme,
QMenu *  menu = 0,
QString  context = QString(),
QWidget *  parent = 0 
)

Construct a new color swatch grid action.

Parameters
schemeQgsColorScheme for colors to show in grid
menuparent menu
contextcontext string provided to color scheme
parentparent widget

Definition at line 361 of file qgscolorswatchgrid.cpp.

QgsColorSwatchGridAction::~QgsColorSwatchGridAction ( )
virtual

Definition at line 378 of file qgscolorswatchgrid.cpp.

Member Function Documentation

QColor QgsColorSwatchGridAction::baseColor ( ) const

Get the base color for the color grid.

Returns
base color which is passed to scheme for color generation
See Also
setBaseColor

Definition at line 388 of file qgscolorswatchgrid.cpp.

void QgsColorSwatchGridAction::colorChanged ( const QColor &  color)
signal

Emitted when a color has been selected from the widget.

Parameters
colorselected color
QString QgsColorSwatchGridAction::context ( ) const

Get the current context for the color grid.

Returns
context string which is passed to scheme for color generation
See Also
setContext

Definition at line 393 of file qgscolorswatchgrid.cpp.

void QgsColorSwatchGridAction::refreshColors ( )
slot

Reload colors from scheme and redraws the widget.

Definition at line 403 of file qgscolorswatchgrid.cpp.

void QgsColorSwatchGridAction::setBaseColor ( const QColor &  baseColor)

Sets the base color for the color grid.

Parameters
baseColorbase color to pass to scheme for color generation
See Also
baseColor

Definition at line 383 of file qgscolorswatchgrid.cpp.

void QgsColorSwatchGridAction::setContext ( const QString &  context)

Sets the current context for the color grid.

Parameters
contextstring which is passed to scheme for color generation
See Also
context

Definition at line 398 of file qgscolorswatchgrid.cpp.


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