QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Slots | Public Member Functions | Static Public Attributes | Protected Attributes | Private Attributes | List of all members
QgsColorRampComboBox Class Reference

#include <qgscolorrampcombobox.h>

Inheritance diagram for QgsColorRampComboBox:
Inheritance graph
[legend]
Collaboration diagram for QgsColorRampComboBox:
Collaboration graph
[legend]

Public Slots

void colorRampChanged (int index)
 

Public Member Functions

 QgsColorRampComboBox (QWidget *parent=0)
 
 ~QgsColorRampComboBox ()
 
void populate (QgsStyleV2 *style)
 initialize the combo box with color ramps from the style More...
 
void setSourceColorRamp (QgsVectorColorRampV2 *sourceRamp)
 add/select color ramp which was used previously by the renderer More...
 
QgsVectorColorRampV2currentColorRamp ()
 return new instance of the current color ramp or NULL if there is no active color ramp More...
 
void setShowGradientOnly (bool gradientOnly)
 
bool showGradientOnly () const
 

Static Public Attributes

static QSize rampIconSize
 

Protected Attributes

QgsStyleV2mStyle
 
QgsVectorColorRampV2mSourceColorRamp
 

Private Attributes

bool mShowGradientOnly
 

Detailed Description

Definition at line 23 of file qgscolorrampcombobox.h.

Constructor & Destructor Documentation

QgsColorRampComboBox::QgsColorRampComboBox ( QWidget *  parent = 0)
explicit

Definition at line 24 of file qgscolorrampcombobox.cpp.

QgsColorRampComboBox::~QgsColorRampComboBox ( )

Definition at line 29 of file qgscolorrampcombobox.cpp.

References mSourceColorRamp.

Member Function Documentation

void QgsColorRampComboBox::colorRampChanged ( int  index)
slot
QgsVectorColorRampV2 * QgsColorRampComboBox::currentColorRamp ( )

return new instance of the current color ramp or NULL if there is no active color ramp

Definition at line 63 of file qgscolorrampcombobox.cpp.

References QgsVectorColorRampV2::clone(), QgsStyleV2::colorRamp(), mSourceColorRamp, mStyle, and tr.

void QgsColorRampComboBox::populate ( QgsStyleV2 style)
void QgsColorRampComboBox::setShowGradientOnly ( bool  gradientOnly)
inline
Note
added in 2.2

Definition at line 44 of file qgscolorrampcombobox.h.

void QgsColorRampComboBox::setSourceColorRamp ( QgsVectorColorRampV2 sourceRamp)

add/select color ramp which was used previously by the renderer

Definition at line 77 of file qgscolorrampcombobox.cpp.

References QgsVectorColorRampV2::clone(), QgsSymbolLayerV2Utils::colorRampPreviewIcon(), icon(), mSourceColorRamp, and rampIconSize.

bool QgsColorRampComboBox::showGradientOnly ( ) const
inline
Note
added in 2.2

Definition at line 46 of file qgscolorrampcombobox.h.

Member Data Documentation

bool QgsColorRampComboBox::mShowGradientOnly
private

Definition at line 56 of file qgscolorrampcombobox.h.

Referenced by colorRampChanged(), and populate().

QgsVectorColorRampV2* QgsColorRampComboBox::mSourceColorRamp
protected
QgsStyleV2* QgsColorRampComboBox::mStyle
protected

Definition at line 52 of file qgscolorrampcombobox.h.

Referenced by colorRampChanged(), currentColorRamp(), and populate().

QSize QgsColorRampComboBox::rampIconSize
static
Note
not available in python bindings

Definition at line 41 of file qgscolorrampcombobox.h.

Referenced by colorRampChanged(), populate(), and setSourceColorRamp().


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