QGIS API Documentation  master-6227475
QgsColorRampComboBox Class Reference

#include <qgscolorrampcombobox.h>

+ Collaboration diagram for QgsColorRampComboBox:

List of all members.

Public Slots

void colorRampChanged (int index)

Public Member Functions

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

Static Public Attributes

static QSize rampIconSize

Protected Attributes

QgsVectorColorRampV2mSourceColorRamp
QgsStyleV2mStyle

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.


Member Function Documentation

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

Definition at line 58 of file qgscolorrampcombobox.cpp.

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

initialize the combo box with color ramps from the style

Definition at line 34 of file qgscolorrampcombobox.cpp.

References QgsStyleV2::colorRamp(), colorRampChanged(), QgsStyleV2::colorRampNames(), QgsSymbolLayerV2Utils::colorRampPreviewIcon(), icon(), mStyle, rampIconSize, and tr.

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

Definition at line 67 of file qgscolorrampcombobox.cpp.

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


Member Data Documentation

Definition at line 40 of file qgscolorrampcombobox.h.

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


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines