2016-08-24 13:41:08 +10:00
|
|
|
/** \ingroup gui
|
|
|
|
* \class QgsGradientColorRampDialog
|
|
|
|
* A dialog which allows users to modify the properties of a QgsGradientColorRamp.
|
|
|
|
* \note added in QGIS 3.0
|
|
|
|
*/
|
|
|
|
|
2016-08-24 11:31:06 +10:00
|
|
|
class QgsGradientColorRampDialog : QDialog
|
2012-09-24 02:28:15 +02:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
2016-08-24 11:31:06 +10:00
|
|
|
#include <qgsgradientcolorrampdialog.h>
|
2012-09-24 02:28:15 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
2016-08-24 13:41:08 +10:00
|
|
|
|
|
|
|
/** Constructor for QgsGradientColorRampDialog.
|
|
|
|
* @param ramp initial ramp to show in dialog
|
|
|
|
* @param parent parent widget
|
|
|
|
*/
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsGradientColorRampDialog( const QgsGradientColorRamp &ramp, QWidget *parent /TransferThis/ = nullptr );
|
2016-08-24 12:50:46 +10:00
|
|
|
~QgsGradientColorRampDialog();
|
|
|
|
|
2016-08-24 13:41:08 +10:00
|
|
|
/** Returns a color ramp representing the current settings from the dialog.
|
|
|
|
* @see setRamp()
|
|
|
|
*/
|
2016-08-24 12:50:46 +10:00
|
|
|
QgsGradientColorRamp ramp() const;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2016-08-24 13:41:08 +10:00
|
|
|
/** Sets the color ramp to show in the dialog.
|
|
|
|
* @param ramp color ramp
|
|
|
|
* @see ramp()
|
|
|
|
*/
|
2017-05-01 16:42:33 +02:00
|
|
|
void setRamp( const QgsGradientColorRamp &ramp );
|
2016-08-24 13:41:08 +10:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
//! Emitted when the dialog settings change
|
|
|
|
void changed();
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
public slots:
|
2016-08-24 13:41:08 +10:00
|
|
|
|
|
|
|
/** Sets the start color for the gradient ramp.
|
|
|
|
* @see setColor2()
|
|
|
|
*/
|
2017-05-01 16:42:33 +02:00
|
|
|
void setColor1( const QColor &color );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2016-08-24 13:41:08 +10:00
|
|
|
/** Sets the end color for the gradient ramp.
|
|
|
|
* @see setColor1()
|
|
|
|
*/
|
2017-05-01 16:42:33 +02:00
|
|
|
void setColor2( const QColor &color );
|
2015-02-03 02:21:52 +01:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
};
|