QGIS API Documentation  2.99.0-Master (37c43df)
Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
QgsColorRampComboBox Class Reference

#include <qgscolorrampcombobox.h>

Inheritance diagram for QgsColorRampComboBox:
Inheritance graph
[legend]

Public Slots

void colorRampChanged (int index)
 
void editSourceRamp ()
 Triggers a dialog which allows users to edit the current source ramp for the combo box. More...
 

Signals

void sourceRampEdited ()
 Emitted when the user has edited the current source ramp. More...
 

Public Member Functions

 QgsColorRampComboBox (QWidget *parent=nullptr)
 
 ~QgsColorRampComboBox ()
 
bool createNewColorRampSelected () const
 Returns true if the current selection in the combo box is the option for creating a new color ramp. More...
 
QgsColorRampcurrentColorRamp () const
 Returns a new instance of the current color ramp or NULL if there is no active color ramp. More...
 
void populate (QgsStyle *style)
 initialize the combo box with color ramps from the style More...
 
void setShowGradientOnly (bool gradientOnly)
 
void setSourceColorRamp (QgsColorRamp *sourceRamp)
 Adds or selects the current color ramp to show in the combo box. More...
 
bool showGradientOnly () const
 

Static Public Attributes

static QSize rampIconSize
 

Protected Attributes

QgsColorRampmSourceColorRamp
 
QgsStylemStyle
 

Detailed Description

Definition at line 26 of file qgscolorrampcombobox.h.

Constructor & Destructor Documentation

§ QgsColorRampComboBox()

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

Definition at line 30 of file qgscolorrampcombobox.cpp.

§ ~QgsColorRampComboBox()

QgsColorRampComboBox::~QgsColorRampComboBox ( )

Definition at line 38 of file qgscolorrampcombobox.cpp.

Member Function Documentation

§ colorRampChanged

void QgsColorRampComboBox::colorRampChanged ( int  index)
slot

Definition at line 104 of file qgscolorrampcombobox.cpp.

§ createNewColorRampSelected()

bool QgsColorRampComboBox::createNewColorRampSelected ( ) const

Returns true if the current selection in the combo box is the option for creating a new color ramp.

Note
added in QGIS 2.7

Definition at line 85 of file qgscolorrampcombobox.cpp.

§ currentColorRamp()

QgsColorRamp * QgsColorRampComboBox::currentColorRamp ( ) const

Returns a new instance of the current color ramp or NULL if there is no active color ramp.

The caller takes responsibility for deleting the returned value.

See also
setSourceColorRamp()

Definition at line 71 of file qgscolorrampcombobox.cpp.

§ editSourceRamp

void QgsColorRampComboBox::editSourceRamp ( )
slot

Triggers a dialog which allows users to edit the current source ramp for the combo box.

See also
sourceRampEdited
Note
added in QGIS 2.12

Definition at line 137 of file qgscolorrampcombobox.cpp.

§ populate()

void QgsColorRampComboBox::populate ( QgsStyle style)

initialize the combo box with color ramps from the style

Definition at line 43 of file qgscolorrampcombobox.cpp.

§ setShowGradientOnly()

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

Definition at line 60 of file qgscolorrampcombobox.h.

§ setSourceColorRamp()

void QgsColorRampComboBox::setSourceColorRamp ( QgsColorRamp sourceRamp)

Adds or selects the current color ramp to show in the combo box.

The ramp appears in the combo box as the "source" ramp.

Parameters
sourceRampcolor ramp, ownership is transferred.
See also
currentColorRamp()

Definition at line 91 of file qgscolorrampcombobox.cpp.

§ showGradientOnly()

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

Definition at line 62 of file qgscolorrampcombobox.h.

§ sourceRampEdited

void QgsColorRampComboBox::sourceRampEdited ( )
signal

Emitted when the user has edited the current source ramp.

See also
editSourceRamp
Note
added in QGIS 2.12

Member Data Documentation

§ mSourceColorRamp

QgsColorRamp* QgsColorRampComboBox::mSourceColorRamp
protected

Definition at line 84 of file qgscolorrampcombobox.h.

§ mStyle

QgsStyle* QgsColorRampComboBox::mStyle
protected

Definition at line 83 of file qgscolorrampcombobox.h.

§ rampIconSize

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

Definition at line 57 of file qgscolorrampcombobox.h.


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