-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docs + cleanups for color ramp dialogs
- Loading branch information
1 parent
cf9292c
commit b7716aa
Showing
13 changed files
with
335 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
/** \ingroup gui | ||
* \class QgsColorBrewerColorRampDialog | ||
* A dialog which allows users to modify the properties of a QgsColorBrewerColorRamp. | ||
* \note added in QGIS 3.0 | ||
*/ | ||
|
||
class QgsColorBrewerColorRampDialog : QDialog | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscolorbrewercolorrampdialog.h> | ||
%End | ||
|
||
public: | ||
|
||
/** Constructor for QgsColorBrewerColorRampDialog. | ||
* @param ramp initial ramp to show in dialog | ||
* @param parent parent widget | ||
*/ | ||
QgsColorBrewerColorRampDialog( const QgsColorBrewerColorRamp& ramp, QWidget* parent /TransferThis/ = nullptr ); | ||
|
||
/** Returns a color ramp representing the current settings from the dialog. | ||
* @see setRamp() | ||
*/ | ||
QgsColorBrewerColorRamp ramp() const; | ||
|
||
public slots: | ||
void setSchemeName(); | ||
void setColors(); | ||
|
||
void populateVariants(); | ||
/** Sets the color ramp to show in the dialog. | ||
* @param ramp color ramp | ||
* @see ramp() | ||
*/ | ||
void setRamp( const QgsColorBrewerColorRamp& ramp ); | ||
|
||
protected: | ||
signals: | ||
|
||
void updatePreview(); | ||
//! Emitted when the dialog settings change | ||
void changed(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,50 @@ | ||
/** \ingroup gui | ||
* \class QgsGradientColorRampDialog | ||
* A dialog which allows users to modify the properties of a QgsGradientColorRamp. | ||
* \note added in QGIS 3.0 | ||
*/ | ||
|
||
class QgsGradientColorRampDialog : QDialog | ||
{ | ||
%TypeHeaderCode | ||
#include <qgsgradientcolorrampdialog.h> | ||
%End | ||
|
||
public: | ||
|
||
/** Constructor for QgsGradientColorRampDialog. | ||
* @param ramp initial ramp to show in dialog | ||
* @param parent parent widget | ||
*/ | ||
QgsGradientColorRampDialog( const QgsGradientColorRamp& ramp, QWidget* parent /TransferThis/ = nullptr ); | ||
~QgsGradientColorRampDialog(); | ||
|
||
/** Returns a color ramp representing the current settings from the dialog. | ||
* @see setRamp() | ||
*/ | ||
QgsGradientColorRamp ramp() const; | ||
|
||
/** Sets the color ramp to show in the dialog. | ||
* @param ramp color ramp | ||
* @see ramp() | ||
*/ | ||
void setRamp( const QgsGradientColorRamp& ramp ); | ||
|
||
signals: | ||
|
||
//! Emitted when the dialog settings change | ||
void changed(); | ||
|
||
public slots: | ||
|
||
/** Sets the start color for the gradient ramp. | ||
* @see setColor2() | ||
*/ | ||
void setColor1( const QColor& color ); | ||
void setColor2( const QColor& color ); | ||
|
||
protected slots: | ||
void on_cboType_currentIndexChanged( int index ); | ||
void on_btnInformation_pressed(); | ||
/** Sets the end color for the gradient ramp. | ||
* @see setColor1() | ||
*/ | ||
void setColor2( const QColor& color ); | ||
|
||
protected: | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,53 @@ | ||
/** \ingroup gui | ||
* \class QgsLimitedRandomColorRampDialog | ||
* A dialog which allows users to modify the properties of a QgsLimitedRandomColorRamp. | ||
* \note added in QGIS 3.0 | ||
*/ | ||
|
||
class QgsLimitedRandomColorRampDialog : QDialog | ||
{ | ||
%TypeHeaderCode | ||
#include <qgslimitedrandomcolorrampdialog.h> | ||
%End | ||
|
||
public: | ||
|
||
/** Constructor for QgsLimitedRandomColorRampDialog. | ||
* @param ramp initial ramp to show in dialog | ||
* @param parent parent widget | ||
*/ | ||
QgsLimitedRandomColorRampDialog( const QgsLimitedRandomColorRamp& ramp, QWidget* parent /TransferThis/ = nullptr ); | ||
|
||
/** Returns a color ramp representing the current settings from the dialog. | ||
* @see setRamp() | ||
*/ | ||
QgsLimitedRandomColorRamp ramp() const; | ||
|
||
/** Sets the color ramp to show in the dialog. | ||
* @param ramp color ramp | ||
* @see ramp() | ||
*/ | ||
void setRamp( const QgsLimitedRandomColorRamp& ramp ); | ||
|
||
signals: | ||
|
||
//! Emitted when the dialog settings change | ||
void changed(); | ||
|
||
public slots: | ||
|
||
//! Sets the number of colors to create in the ramp | ||
void setCount( int val ); | ||
//! Sets the minimum hue for colors in the ramp | ||
void setHue1( int val ); | ||
//! Sets the maximum hue for colors in the ramp | ||
void setHue2( int val ); | ||
//! Sets the minimum saturation for colors in the ramp | ||
void setSat1( int val ); | ||
//! Sets the maximum saturation for colors in the ramp | ||
void setSat2( int val ); | ||
//! Sets the minimum value for colors in the ramp | ||
void setVal1( int val ); | ||
//! Sets the maximum value for colors in the ramp | ||
void setVal2( int val ); | ||
|
||
protected: | ||
|
||
void updatePreview(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.