QGIS/python/gui/symbology-ng/qgscolorrampcombobox.sip
Nyall Dawson a0c1380e79 Fix incorrect warning dialog appearing when creating new ramp
Previously a "not available" warning dialog would appear when
attempting to create a new color ramp using the categorised renderer.
2014-11-24 20:45:10 +11:00

37 lines
1.0 KiB
Plaintext

class QgsColorRampComboBox : QComboBox
{
%TypeHeaderCode
#include <qgscolorrampcombobox.h>
%End
public:
QgsColorRampComboBox( QWidget *parent = 0 );
~QgsColorRampComboBox();
//! initialize the combo box with color ramps from the style
void populate( QgsStyleV2* style );
//! add/select color ramp which was used previously by the renderer
void setSourceColorRamp( QgsVectorColorRampV2* sourceRamp );
//! return new instance of the current color ramp or NULL if there is no active color ramp
QgsVectorColorRampV2* currentColorRamp();
/**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
*/
bool createNewColorRampSelected() const;
//! @note not available in python bindings
// static QSize rampIconSize;
//! @note added in 2.2
void setShowGradientOnly( bool gradientOnly );
//! @note added in 2.2
bool showGradientOnly() const;
public slots:
void colorRampChanged( int index );
};