mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-19 00:02:48 -04:00
Change some remaining alpha/transparency strings to opacity
This commit is contained in:
parent
94829206d1
commit
d4c87620aa
@ -246,11 +246,11 @@ Creates a new QgsColorRamp from a map of properties
|
||||
.. seealso:: info()
|
||||
%End
|
||||
|
||||
void addStopsToGradient( QGradient *gradient, double alpha = 1 );
|
||||
void addStopsToGradient( QGradient *gradient, double opacity = 1 );
|
||||
%Docstring
|
||||
Copy color ramp stops to a QGradient
|
||||
\param gradient gradient to copy stops into
|
||||
\param alpha alpha multiplier. Opacity of colors will be multiplied
|
||||
\param opacity opacity multiplier. Opacity of colors will be multiplied
|
||||
by this factor before adding to the gradient.
|
||||
.. versionadded:: 2.1
|
||||
%End
|
||||
|
@ -57,7 +57,7 @@ class QgsRendererWidget : QgsPanelWidget
|
||||
/** Change color of selected symbols*/
|
||||
void changeSymbolColor();
|
||||
/** Change opacity of selected symbols*/
|
||||
void changeSymbolTransparency();
|
||||
void changeSymbolOpacity();
|
||||
/** Change units mm/map units of selected symbols*/
|
||||
void changeSymbolUnit();
|
||||
/** Change line widths of selected symbols*/
|
||||
|
@ -378,7 +378,7 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
|
||||
* \param opacity double between 1.0 (opaque) and 0 (transparent).
|
||||
* \see itemOpacity()
|
||||
*/
|
||||
void setItemOpacity( const double itemOpacity );
|
||||
void setItemOpacity( const double opacity );
|
||||
|
||||
/** Returns whether effects (e.g., blend modes) are enabled for the item
|
||||
* \returns true if effects are enabled
|
||||
|
@ -275,15 +275,15 @@ void QgsGradientColorRamp::setStops( const QgsGradientStopsList &stops )
|
||||
std::sort( mStops.begin(), mStops.end(), stopLessThan );
|
||||
}
|
||||
|
||||
void QgsGradientColorRamp::addStopsToGradient( QGradient *gradient, double alpha )
|
||||
void QgsGradientColorRamp::addStopsToGradient( QGradient *gradient, double opacity )
|
||||
{
|
||||
//copy color ramp stops to a QGradient
|
||||
QColor color1 = mColor1;
|
||||
QColor color2 = mColor2;
|
||||
if ( alpha < 1 )
|
||||
if ( opacity < 1 )
|
||||
{
|
||||
color1.setAlpha( color1.alpha() * alpha );
|
||||
color2.setAlpha( color2.alpha() * alpha );
|
||||
color1.setAlpha( color1.alpha() * opacity );
|
||||
color2.setAlpha( color2.alpha() * opacity );
|
||||
}
|
||||
gradient->setColorAt( 0, color1 );
|
||||
gradient->setColorAt( 1, color2 );
|
||||
@ -292,9 +292,9 @@ void QgsGradientColorRamp::addStopsToGradient( QGradient *gradient, double alpha
|
||||
it != mStops.constEnd(); ++it )
|
||||
{
|
||||
QColor rampColor = it->color;
|
||||
if ( alpha < 1 )
|
||||
if ( opacity < 1 )
|
||||
{
|
||||
rampColor.setAlpha( rampColor.alpha() * alpha );
|
||||
rampColor.setAlpha( rampColor.alpha() * opacity );
|
||||
}
|
||||
gradient->setColorAt( it->offset, rampColor );
|
||||
}
|
||||
|
@ -226,11 +226,11 @@ class CORE_EXPORT QgsGradientColorRamp : public QgsColorRamp
|
||||
|
||||
/** Copy color ramp stops to a QGradient
|
||||
* \param gradient gradient to copy stops into
|
||||
* \param alpha alpha multiplier. Opacity of colors will be multiplied
|
||||
* \param opacity opacity multiplier. Opacity of colors will be multiplied
|
||||
* by this factor before adding to the gradient.
|
||||
* \since QGIS 2.1
|
||||
*/
|
||||
void addStopsToGradient( QGradient *gradient, double alpha = 1 );
|
||||
void addStopsToGradient( QGradient *gradient, double opacity = 1 );
|
||||
|
||||
protected:
|
||||
QColor mColor1;
|
||||
|
@ -125,7 +125,7 @@ QgsGradientColorRampDialog::QgsGradientColorRampDialog( const QgsGradientColorRa
|
||||
mSaturationCurve->attach( mPlot );
|
||||
|
||||
mAlphaCurve = new QwtPlotCurve();
|
||||
mAlphaCurve->setTitle( QStringLiteral( "Alpha" ) );
|
||||
mAlphaCurve->setTitle( QStringLiteral( "Opacity" ) );
|
||||
mAlphaCurve->setPen( QPen( QColor( 50, 50, 50 ), 0.0 ) ),
|
||||
mAlphaCurve->setRenderHint( QwtPlotItem::RenderAntialiased, true );
|
||||
mAlphaCurve->attach( mPlot );
|
||||
|
@ -148,7 +148,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>850</width>
|
||||
<height>494</height>
|
||||
<height>492</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
|
||||
@ -280,7 +280,7 @@
|
||||
<item>
|
||||
<widget class="QCheckBox" name="mPlotAlphaCheckbox">
|
||||
<property name="text">
|
||||
<string>Alpha</string>
|
||||
<string>Opacity</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -336,18 +336,18 @@
|
||||
<header>qgsscrollarea.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsColorButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgscolorbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsCollapsibleGroupBox</class>
|
||||
<extends>QGroupBox</extends>
|
||||
<header>qgscollapsiblegroupbox.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsColorButton</class>
|
||||
<extends>QToolButton</extends>
|
||||
<header>qgscolorbutton.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QgsDoubleSpinBox</class>
|
||||
<extends>QDoubleSpinBox</extends>
|
||||
|
Loading…
x
Reference in New Issue
Block a user