Skip to content
Permalink
Browse files

Flip 'alpha' to 'opacity' in gui API

  • Loading branch information
nyalldawson committed May 30, 2017
1 parent d24c64f commit 94829206d1c3184bde1a5fe008ef9cbc0cf53d36
Showing with 177 additions and 153 deletions.
  1. +14 −0 doc/api_break.dox
  2. +11 −9 python/gui/qgscolorbutton.sip
  3. +8 −7 python/gui/qgscolordialog.sip
  4. +4 −3 python/gui/qgscompoundcolorwidget.sip
  5. +2 −2 src/app/composer/qgscomposerarrowwidget.cpp
  6. +4 −4 src/app/composer/qgscomposerattributetablewidget.cpp
  7. +2 −2 src/app/composer/qgscomposeritemwidget.cpp
  8. +1 −1 src/app/composer/qgscomposerlegendwidget.cpp
  9. +4 −4 src/app/composer/qgscomposermapgridwidget.cpp
  10. +4 −4 src/app/composer/qgscomposerpicturewidget.cpp
  11. +4 −4 src/app/composer/qgscomposerscalebarwidget.cpp
  12. +2 −2 src/app/composer/qgscomposertablebackgroundcolorsdialog.cpp
  13. +1 −1 src/app/qgsdecorationcopyrightdialog.cpp
  14. +2 −2 src/app/qgsdecorationnortharrowdialog.cpp
  15. +2 −2 src/app/qgsdecorationscalebardialog.cpp
  16. +2 −2 src/app/qgsdiagramproperties.cpp
  17. +5 −5 src/app/qgsoptions.cpp
  18. +1 −1 src/app/qgsprojectproperties.cpp
  19. +1 −1 src/app/qgstextannotationdialog.cpp
  20. +2 −2 src/gui/attributetable/qgsfieldconditionalformatwidget.cpp
  21. +3 −3 src/gui/effects/qgspainteffectwidget.cpp
  22. +12 −12 src/gui/qgscolorbutton.cpp
  23. +15 −11 src/gui/qgscolorbutton.h
  24. +13 −13 src/gui/qgscolordialog.cpp
  25. +9 −8 src/gui/qgscolordialog.h
  26. +1 −1 src/gui/qgscolorschemelist.cpp
  27. +6 −6 src/gui/qgscompoundcolorwidget.cpp
  28. +4 −3 src/gui/qgscompoundcolorwidget.h
  29. +2 −2 src/gui/qgsgradientcolorrampdialog.cpp
  30. +1 −1 src/gui/qgspresetcolorrampdialog.cpp
  31. +1 −1 src/gui/qgspropertyassistantwidget.cpp
  32. +2 −2 src/gui/qgstextformatwidget.cpp
  33. +1 −1 src/gui/raster/qgspalettedrendererwidget.cpp
  34. +3 −3 src/gui/symbology-ng/qgs25drendererwidget.cpp
  35. +2 −2 src/gui/symbology-ng/qgsellipsesymbollayerwidget.cpp
  36. +2 −2 src/gui/symbology-ng/qgspointdisplacementrendererwidget.cpp
  37. +5 −5 src/gui/symbology-ng/qgsrendererwidget.cpp
  38. +1 −1 src/gui/symbology-ng/qgsrendererwidget.h
  39. +17 −17 src/gui/symbology-ng/qgssymbollayerwidget.cpp
  40. +1 −1 src/gui/symbology-ng/qgssymbolslistwidget.cpp
@@ -579,6 +579,14 @@ QgsColorButton {#qgis_api_break_3_0_QgsColorButton}
--------------

- Behaviour enum and its corresponding setter/getter have been renamed to Behavior <!--#spellok-->
- setAllowAlpha() and allowAlpha() were removed. Use setAllowOpacity() and allowOpacity() instead.


QgsColorDialog {#qgis_api_break_3_0_QgsColorDialog}
--------------

- setAllowAlpha() was removed. Use setAllowOpacity() instead.


QgsColorEffect {#qgis_api_break_3_0_QgsColorEffect}
-------------
@@ -800,6 +808,12 @@ all these item added events.
- addComposerMap no longer takes a setDefaultPreviewStyle argument.
- the mapsToRestore parameter has been removed from addItemsFromXml

QgsCompoundColorWidget {#qgis_api_break_3_0_QgsCompoundColorWidget}
----------------------

- setAllowAlpha() was removed. Use setAllowOpacity() instead.


QgsConditionalLayerStyle {#qgis_api_break_3_0_QgsConditionalLayerStyle}
------------------------

@@ -54,20 +54,22 @@ class QgsColorButton : QToolButton
:rtype: QColor
%End

void setAllowAlpha( const bool allowAlpha );
void setAllowOpacity( const bool allowOpacity );
%Docstring
Sets whether alpha modification (transparency) is permitted
Sets whether opacity modification (transparency) is permitted
for the color. Defaults to false.
\param allowAlpha set to true to allow alpha modification
.. seealso:: allowAlpha
\param allowOpacity set to true to allow opacity modification
.. seealso:: allowOpacity()
.. versionadded:: 3.0
%End

bool allowAlpha() const;
bool allowOpacity() const;
%Docstring
Returns whether alpha modification (transparency) is permitted
Returns whether opacity modification (transparency) is permitted
for the color.
:return: true if alpha modification is allowed
.. seealso:: setAllowAlpha
:return: true if opacity modification is allowed
.. seealso:: setAllowOpacity()
.. versionadded:: 3.0
:rtype: bool
%End

@@ -313,7 +315,7 @@ class QgsColorButton : QToolButton
Sets color to a totally transparent color.
.. note::

If the color button is not set to show an alpha channel in the color
If the color button is not set to show an opacity channel in the color
dialog (see setColorDialogOptions) then the color will not be changed.
.. seealso:: setToNull()
%End
@@ -45,38 +45,39 @@ class QgsColorDialog : QDialog
\param title title for dialog box
%End

void setAllowAlpha( const bool allowAlpha );
void setAllowOpacity( const bool allowOpacity );
%Docstring
Sets whether alpha modification (transparency) is permitted
Sets whether opacity modification (transparency) is permitted
for the color dialog. Defaults to true.
\param allowAlpha set to false to disable alpha modification
\param allowOpacity set to false to disable opacity modification
.. versionadded:: 3.0
%End

static QColor getLiveColor( const QColor &initialColor, QObject *updateObject, const char *updateSlot,
QWidget *parent = 0,
const QString &title = QString(),
const bool allowAlpha = true );
const bool allowOpacity = true );
%Docstring
Return a color selection from a color dialog, with live updating of interim selections.
\param initialColor the initial color of the selection dialog.
\param updateObject the receiver object of the live updating.
\param updateSlot the receiver object's slot for live updating (e.g. SLOT( setValidColor( const QColor& ) ) ).
\param parent parent widget
\param title the title of the dialog.
\param allowAlpha set to true to allow modification of color alpha value (transparency)
\param allowOpacity set to true to allow modification of color opacity value (transparency)
:return: Selected color on accepted() or initialColor on rejected().
.. seealso:: getColor
:rtype: QColor
%End

static QColor getColor( const QColor &initialColor, QWidget *parent, const QString &title = QString(),
const bool allowAlpha = false );
const bool allowOpacity = false );
%Docstring
Return a color selection from a color dialog.
\param initialColor the initial color of the selection dialog.
\param parent parent widget
\param title the title of the dialog.
\param allowAlpha set to true to allow modification of color alpha value (transparency)
\param allowOpacity set to true to allow modification of color opacity value (transparency)
:return: Selected color on accepted() or initialColor on rejected().
.. seealso:: getLiveColor
:rtype: QColor
@@ -45,11 +45,12 @@ class QgsCompoundColorWidget : QgsPanelWidget
:rtype: QColor
%End

void setAllowAlpha( const bool allowAlpha );
void setAllowOpacity( const bool allowOpacity );
%Docstring
Sets whether alpha modification (transparency) is permitted
Sets whether opacity modification (transparency) is permitted
for the color dialog. Defaults to true.
\param allowAlpha set to false to disable alpha modification
\param allowOpacity set to false to disable opacity modification
.. versionadded:: 3.0
%End

void setDiscarded( bool discarded );
@@ -43,12 +43,12 @@ QgsComposerArrowWidget::QgsComposerArrowWidget( QgsComposerArrow *arrow ): QgsCo
mainLayout->addWidget( itemPropertiesWidget );

mArrowHeadStrokeColorButton->setColorDialogTitle( tr( "Select arrow head stroke color" ) );
mArrowHeadStrokeColorButton->setAllowAlpha( true );
mArrowHeadStrokeColorButton->setAllowOpacity( true );
mArrowHeadStrokeColorButton->setContext( QStringLiteral( "composer" ) );
mArrowHeadStrokeColorButton->setNoColorString( tr( "Transparent stroke" ) );
mArrowHeadStrokeColorButton->setShowNoColor( true );
mArrowHeadFillColorButton->setColorDialogTitle( tr( "Select arrow head fill color" ) );
mArrowHeadFillColorButton->setAllowAlpha( true );
mArrowHeadFillColorButton->setAllowOpacity( true );
mArrowHeadFillColorButton->setContext( QStringLiteral( "composer" ) );
mArrowHeadFillColorButton->setNoColorString( tr( "Transparent fill" ) );
mArrowHeadFillColorButton->setShowNoColor( true );
@@ -68,17 +68,17 @@ QgsComposerAttributeTableWidget::QgsComposerAttributeTableWidget( QgsComposerAtt
connect( mComposerMapComboBox, &QgsComposerItemComboBox::itemChanged, this, &QgsComposerAttributeTableWidget::composerMapChanged );

mHeaderFontColorButton->setColorDialogTitle( tr( "Select header font color" ) );
mHeaderFontColorButton->setAllowAlpha( true );
mHeaderFontColorButton->setAllowOpacity( true );
mHeaderFontColorButton->setContext( QStringLiteral( "composer" ) );
mContentFontColorButton->setColorDialogTitle( tr( "Select content font color" ) );
mContentFontColorButton->setAllowAlpha( true );
mContentFontColorButton->setAllowOpacity( true );
mContentFontColorButton->setContext( QStringLiteral( "composer" ) );
mGridColorButton->setColorDialogTitle( tr( "Select grid color" ) );
mGridColorButton->setAllowAlpha( true );
mGridColorButton->setAllowOpacity( true );
mGridColorButton->setContext( QStringLiteral( "composer" ) );
mGridColorButton->setDefaultColor( Qt::black );
mBackgroundColorButton->setColorDialogTitle( tr( "Select background color" ) );
mBackgroundColorButton->setAllowAlpha( true );
mBackgroundColorButton->setAllowOpacity( true );
mBackgroundColorButton->setContext( QStringLiteral( "composer" ) );
mBackgroundColorButton->setShowNoColor( true );
mBackgroundColorButton->setNoColorString( tr( "No background" ) );
@@ -565,10 +565,10 @@ void QgsComposerItemWidget::setValuesForGuiElements()
}

mBackgroundColorButton->setColorDialogTitle( tr( "Select background color" ) );
mBackgroundColorButton->setAllowAlpha( true );
mBackgroundColorButton->setAllowOpacity( true );
mBackgroundColorButton->setContext( QStringLiteral( "composer" ) );
mFrameColorButton->setColorDialogTitle( tr( "Select frame color" ) );
mFrameColorButton->setAllowAlpha( true );
mFrameColorButton->setAllowOpacity( true );
mFrameColorButton->setContext( QStringLiteral( "composer" ) );

setValuesForGuiPositionElements();
@@ -75,7 +75,7 @@ QgsComposerLegendWidget::QgsComposerLegendWidget( QgsComposerLegend *legend )
mFontColorButton->setContext( QStringLiteral( "composer" ) );

mRasterStrokeColorButton->setColorDialogTitle( tr( "Select stroke color" ) );
mRasterStrokeColorButton->setAllowAlpha( true );
mRasterStrokeColorButton->setAllowOpacity( true );
mRasterStrokeColorButton->setContext( QStringLiteral( "composer " ) );

if ( legend )
@@ -58,7 +58,7 @@ QgsComposerMapGridWidget::QgsComposerMapGridWidget( QgsComposerMapGrid *mapGrid,
mAnnotationFormatComboBox->addItem( tr( "Custom" ), QgsComposerMapGrid::CustomFormat );

mAnnotationFontColorButton->setColorDialogTitle( tr( "Select font color" ) );
mAnnotationFontColorButton->setAllowAlpha( true );
mAnnotationFontColorButton->setAllowOpacity( true );
mAnnotationFontColorButton->setContext( QStringLiteral( "composer" ) );

insertAnnotationDisplayEntries( mAnnotationDisplayLeftComboBox );
@@ -77,19 +77,19 @@ QgsComposerMapGridWidget::QgsComposerMapGridWidget( QgsComposerMapGrid *mapGrid,
insertAnnotationDirectionEntries( mAnnotationDirectionComboBoxBottom );

mGridFramePenColorButton->setColorDialogTitle( tr( "Select grid frame color" ) );
mGridFramePenColorButton->setAllowAlpha( true );
mGridFramePenColorButton->setAllowOpacity( true );
mGridFramePenColorButton->setContext( QStringLiteral( "composer" ) );
mGridFramePenColorButton->setNoColorString( tr( "Transparent frame" ) );
mGridFramePenColorButton->setShowNoColor( true );

mGridFrameFill1ColorButton->setColorDialogTitle( tr( "Select grid frame fill color" ) );
mGridFrameFill1ColorButton->setAllowAlpha( true );
mGridFrameFill1ColorButton->setAllowOpacity( true );
mGridFrameFill1ColorButton->setContext( QStringLiteral( "composer" ) );
mGridFrameFill1ColorButton->setNoColorString( tr( "Transparent fill" ) );
mGridFrameFill1ColorButton->setShowNoColor( true );

mGridFrameFill2ColorButton->setColorDialogTitle( tr( "Select grid frame fill color" ) );
mGridFrameFill2ColorButton->setAllowAlpha( true );
mGridFrameFill2ColorButton->setAllowOpacity( true );
mGridFrameFill2ColorButton->setContext( QStringLiteral( "composer" ) );
mGridFrameFill2ColorButton->setNoColorString( tr( "Transparent fill" ) );
mGridFrameFill2ColorButton->setShowNoColor( true );
@@ -39,10 +39,10 @@ QgsComposerPictureWidget::QgsComposerPictureWidget( QgsComposerPicture *picture
setupUi( this );
setPanelTitle( tr( "Picture properties" ) );

mFillColorButton->setAllowAlpha( true );
mFillColorButton->setAllowOpacity( true );
mFillColorButton->setColorDialogTitle( tr( "Select fill color" ) );
mFillColorButton->setContext( QStringLiteral( "composer" ) );
mStrokeColorButton->setAllowAlpha( true );
mStrokeColorButton->setAllowOpacity( true );
mStrokeColorButton->setColorDialogTitle( tr( "Select stroke color" ) );
mStrokeColorButton->setContext( QStringLiteral( "composer" ) );

@@ -481,7 +481,7 @@ void QgsComposerPictureWidget::updateSvgParamGui( bool resetValues )
mFillColorButton->setColor( fill );
}
mFillColorButton->setEnabled( hasFillParam );
mFillColorButton->setAllowAlpha( hasFillOpacityParam );
mFillColorButton->setAllowOpacity( hasFillOpacityParam );
if ( resetValues )
{
QColor stroke = mStrokeColorButton->color();
@@ -494,7 +494,7 @@ void QgsComposerPictureWidget::updateSvgParamGui( bool resetValues )
mStrokeColorButton->setColor( stroke );
}
mStrokeColorButton->setEnabled( hasStrokeParam );
mStrokeColorButton->setAllowAlpha( hasStrokeOpacityParam );
mStrokeColorButton->setAllowOpacity( hasStrokeOpacityParam );
if ( hasDefaultStrokeWidth && resetValues )
{
mStrokeWidthSpinBox->setValue( defaultStrokeWidth );
@@ -61,23 +61,23 @@ QgsComposerScaleBarWidget::QgsComposerScaleBarWidget( QgsComposerScaleBar *scale
mUnitsComboBox->insertItem( 3, tr( "Nautical Miles" ), QgsUnitTypes::DistanceNauticalMiles );

mFillColorButton->setColorDialogTitle( tr( "Select fill color" ) );
mFillColorButton->setAllowAlpha( true );
mFillColorButton->setAllowOpacity( true );
mFillColorButton->setContext( QStringLiteral( "composer" ) );
mFillColorButton->setNoColorString( tr( "Transparent fill" ) );
mFillColorButton->setShowNoColor( true );

mFillColor2Button->setColorDialogTitle( tr( "Select alternate fill color" ) );
mFillColor2Button->setAllowAlpha( true );
mFillColor2Button->setAllowOpacity( true );
mFillColor2Button->setContext( QStringLiteral( "composer" ) );
mFillColor2Button->setNoColorString( tr( "Transparent fill" ) );
mFillColor2Button->setShowNoColor( true );

mFontColorButton->setColorDialogTitle( tr( "Select font color" ) );
mFontColorButton->setAllowAlpha( true );
mFontColorButton->setAllowOpacity( true );
mFontColorButton->setContext( QStringLiteral( "composer" ) );

mStrokeColorButton->setColorDialogTitle( tr( "Select line color" ) );
mStrokeColorButton->setAllowAlpha( true );
mStrokeColorButton->setAllowOpacity( true );
mStrokeColorButton->setContext( QStringLiteral( "composer" ) );
mStrokeColorButton->setNoColorString( tr( "Transparent line" ) );
mStrokeColorButton->setShowNoColor( true );
@@ -119,12 +119,12 @@ void QgsComposerTableBackgroundColorsDialog::setGuiElementValues()
continue;
button->setEnabled( mComposerTable->cellStyle( styleGroup )->enabled );
button->setColor( mComposerTable->cellStyle( styleGroup )->cellBackgroundColor );
button->setAllowAlpha( true );
button->setAllowOpacity( true );
button->setColorDialogTitle( tr( "Select background color" ) );
}

mDefaultColorButton->setColor( mComposerTable->backgroundColor() );
mDefaultColorButton->setAllowAlpha( true );
mDefaultColorButton->setAllowOpacity( true );
mDefaultColorButton->setColorDialogTitle( tr( "Select background color" ) );
mDefaultColorButton->setShowNoColor( true );
mDefaultColorButton->setNoColorString( tr( "No background" ) );
@@ -50,7 +50,7 @@ QgsDecorationCopyrightDialog::QgsDecorationCopyrightDialog( QgsDecorationCopyrig
wgtUnitSelection->setUnit( mDeco.mMarginUnit );

// color
pbnColorChooser->setAllowAlpha( true );
pbnColorChooser->setAllowOpacity( true );
pbnColorChooser->setColor( mDeco.mColor );
pbnColorChooser->setContext( QStringLiteral( "gui" ) );
pbnColorChooser->setColorDialogTitle( tr( "Select text color" ) );
@@ -56,12 +56,12 @@ QgsDecorationNorthArrowDialog::QgsDecorationNorthArrowDialog( QgsDecorationNorth
// automatic
cboxAutomatic->setChecked( mDeco.mAutomatic );

pbnChangeColor->setAllowAlpha( true );
pbnChangeColor->setAllowOpacity( true );
pbnChangeColor->setColor( mDeco.mColor );
pbnChangeColor->setContext( QStringLiteral( "gui" ) );
pbnChangeColor->setColorDialogTitle( tr( "Select north arrow fill color" ) );

pbnChangeOutlineColor->setAllowAlpha( true );
pbnChangeOutlineColor->setAllowOpacity( true );
pbnChangeOutlineColor->setColor( mDeco.mOutlineColor );
pbnChangeOutlineColor->setContext( QStringLiteral( "gui" ) );
pbnChangeOutlineColor->setColorDialogTitle( tr( "Select north arrow outline color" ) );
@@ -71,12 +71,12 @@ QgsDecorationScaleBarDialog::QgsDecorationScaleBarDialog( QgsDecorationScaleBar

cboStyle->setCurrentIndex( mDeco.mStyleIndex );

pbnChangeColor->setAllowAlpha( true );
pbnChangeColor->setAllowOpacity( true );
pbnChangeColor->setColor( mDeco.mColor );
pbnChangeColor->setContext( QStringLiteral( "gui" ) );
pbnChangeColor->setColorDialogTitle( tr( "Select scale bar fill color" ) );

pbnChangeOutlineColor->setAllowAlpha( true );
pbnChangeOutlineColor->setAllowOpacity( true );
pbnChangeOutlineColor->setColor( mDeco.mOutlineColor );
pbnChangeOutlineColor->setContext( QStringLiteral( "gui" ) );
pbnChangeOutlineColor->setColorDialogTitle( tr( "Select scale bar outline color" ) );
@@ -85,12 +85,12 @@ QgsDiagramProperties::QgsDiagramProperties( QgsVectorLayer *layer, QWidget *pare
mSizeFieldExpressionWidget->registerExpressionContextGenerator( this );

mBackgroundColorButton->setColorDialogTitle( tr( "Select background color" ) );
mBackgroundColorButton->setAllowAlpha( true );
mBackgroundColorButton->setAllowOpacity( true );
mBackgroundColorButton->setContext( QStringLiteral( "symbology" ) );
mBackgroundColorButton->setShowNoColor( true );
mBackgroundColorButton->setNoColorString( tr( "Transparent background" ) );
mDiagramPenColorButton->setColorDialogTitle( tr( "Select pen color" ) );
mDiagramPenColorButton->setAllowAlpha( true );
mDiagramPenColorButton->setAllowOpacity( true );
mDiagramPenColorButton->setContext( QStringLiteral( "symbology" ) );
mDiagramPenColorButton->setShowNoColor( true );
mDiagramPenColorButton->setNoColorString( tr( "Transparent stroke" ) );
@@ -126,7 +126,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
connect( cmbUITheme, static_cast<void ( QComboBox::* )( const QString & )>( &QComboBox::currentIndexChanged ), this, &QgsOptions::uiThemeChanged );

mIdentifyHighlightColorButton->setColorDialogTitle( tr( "Identify highlight color" ) );
mIdentifyHighlightColorButton->setAllowAlpha( true );
mIdentifyHighlightColorButton->setAllowOpacity( true );
mIdentifyHighlightColorButton->setContext( QStringLiteral( "gui" ) );
mIdentifyHighlightColorButton->setDefaultColor( Qgis::DEFAULT_HIGHLIGHT_COLOR );

@@ -684,7 +684,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
int myAlpha = mSettings->value( QStringLiteral( "/qgis/default_selection_color_alpha" ), 255 ).toInt();
pbnSelectionColor->setColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
pbnSelectionColor->setColorDialogTitle( tr( "Set selection color" ) );
pbnSelectionColor->setAllowAlpha( true );
pbnSelectionColor->setAllowOpacity( true );
pbnSelectionColor->setContext( QStringLiteral( "gui" ) );
pbnSelectionColor->setDefaultColor( QColor( 255, 255, 0, 255 ) );

@@ -790,7 +790,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
QColor gridColor = QColor( gridRed, gridGreen, gridBlue, gridAlpha );
mGridColorButton->setColor( gridColor );
mGridColorButton->setColorDialogTitle( tr( "Select grid color" ) );
mGridColorButton->setAllowAlpha( true );
mGridColorButton->setAllowOpacity( true );
mGridColorButton->setContext( QStringLiteral( "gui" ) );
mGridColorButton->setDefaultColor( QColor( 190, 190, 190, 100 ) );

@@ -844,7 +844,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
myBlue = mSettings->value( QStringLiteral( "/qgis/digitizing/line_color_blue" ), 0 ).toInt();
myAlpha = mSettings->value( QStringLiteral( "/qgis/digitizing/line_color_alpha" ), 200 ).toInt();
mLineColorToolButton->setColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
mLineColorToolButton->setAllowAlpha( true );
mLineColorToolButton->setAllowOpacity( true );
mLineColorToolButton->setContext( QStringLiteral( "gui" ) );
mLineColorToolButton->setDefaultColor( QColor( 255, 0, 0, 200 ) );

@@ -853,7 +853,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
myBlue = mSettings->value( QStringLiteral( "/qgis/digitizing/fill_color_blue" ), 0 ).toInt();
myAlpha = mSettings->value( QStringLiteral( "/qgis/digitizing/fill_color_alpha" ), 30 ).toInt();
mFillColorToolButton->setColor( QColor( myRed, myGreen, myBlue, myAlpha ) );
mFillColorToolButton->setAllowAlpha( true );
mFillColorToolButton->setAllowOpacity( true );
mFillColorToolButton->setContext( QStringLiteral( "gui" ) );
mFillColorToolButton->setDefaultColor( QColor( 255, 0, 0, 30 ) );

0 comments on commit 9482920

Please sign in to comment.
You can’t perform that action at this time.