Skip to content

Commit d4c8762

Browse files
committed
Change some remaining alpha/transparency strings to opacity
1 parent 9482920 commit d4c8762

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

python/core/qgscolorramp.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@ Creates a new QgsColorRamp from a map of properties
246246
.. seealso:: info()
247247
%End
248248

249-
void addStopsToGradient( QGradient *gradient, double alpha = 1 );
249+
void addStopsToGradient( QGradient *gradient, double opacity = 1 );
250250
%Docstring
251251
Copy color ramp stops to a QGradient
252252
\param gradient gradient to copy stops into
253-
\param alpha alpha multiplier. Opacity of colors will be multiplied
253+
\param opacity opacity multiplier. Opacity of colors will be multiplied
254254
by this factor before adding to the gradient.
255255
.. versionadded:: 2.1
256256
%End

python/gui/symbology-ng/qgsrendererwidget.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class QgsRendererWidget : QgsPanelWidget
5757
/** Change color of selected symbols*/
5858
void changeSymbolColor();
5959
/** Change opacity of selected symbols*/
60-
void changeSymbolTransparency();
60+
void changeSymbolOpacity();
6161
/** Change units mm/map units of selected symbols*/
6262
void changeSymbolUnit();
6363
/** Change line widths of selected symbols*/

src/core/composer/qgscomposeritem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ class CORE_EXPORT QgsComposerItem: public QgsComposerObject, public QGraphicsRec
378378
* \param opacity double between 1.0 (opaque) and 0 (transparent).
379379
* \see itemOpacity()
380380
*/
381-
void setItemOpacity( const double itemOpacity );
381+
void setItemOpacity( const double opacity );
382382

383383
/** Returns whether effects (e.g., blend modes) are enabled for the item
384384
* \returns true if effects are enabled

src/core/qgscolorramp.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,15 +275,15 @@ void QgsGradientColorRamp::setStops( const QgsGradientStopsList &stops )
275275
std::sort( mStops.begin(), mStops.end(), stopLessThan );
276276
}
277277

278-
void QgsGradientColorRamp::addStopsToGradient( QGradient *gradient, double alpha )
278+
void QgsGradientColorRamp::addStopsToGradient( QGradient *gradient, double opacity )
279279
{
280280
//copy color ramp stops to a QGradient
281281
QColor color1 = mColor1;
282282
QColor color2 = mColor2;
283-
if ( alpha < 1 )
283+
if ( opacity < 1 )
284284
{
285-
color1.setAlpha( color1.alpha() * alpha );
286-
color2.setAlpha( color2.alpha() * alpha );
285+
color1.setAlpha( color1.alpha() * opacity );
286+
color2.setAlpha( color2.alpha() * opacity );
287287
}
288288
gradient->setColorAt( 0, color1 );
289289
gradient->setColorAt( 1, color2 );
@@ -292,9 +292,9 @@ void QgsGradientColorRamp::addStopsToGradient( QGradient *gradient, double alpha
292292
it != mStops.constEnd(); ++it )
293293
{
294294
QColor rampColor = it->color;
295-
if ( alpha < 1 )
295+
if ( opacity < 1 )
296296
{
297-
rampColor.setAlpha( rampColor.alpha() * alpha );
297+
rampColor.setAlpha( rampColor.alpha() * opacity );
298298
}
299299
gradient->setColorAt( it->offset, rampColor );
300300
}

src/core/qgscolorramp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,11 @@ class CORE_EXPORT QgsGradientColorRamp : public QgsColorRamp
226226

227227
/** Copy color ramp stops to a QGradient
228228
* \param gradient gradient to copy stops into
229-
* \param alpha alpha multiplier. Opacity of colors will be multiplied
229+
* \param opacity opacity multiplier. Opacity of colors will be multiplied
230230
* by this factor before adding to the gradient.
231231
* \since QGIS 2.1
232232
*/
233-
void addStopsToGradient( QGradient *gradient, double alpha = 1 );
233+
void addStopsToGradient( QGradient *gradient, double opacity = 1 );
234234

235235
protected:
236236
QColor mColor1;

src/gui/qgsgradientcolorrampdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ QgsGradientColorRampDialog::QgsGradientColorRampDialog( const QgsGradientColorRa
125125
mSaturationCurve->attach( mPlot );
126126

127127
mAlphaCurve = new QwtPlotCurve();
128-
mAlphaCurve->setTitle( QStringLiteral( "Alpha" ) );
128+
mAlphaCurve->setTitle( QStringLiteral( "Opacity" ) );
129129
mAlphaCurve->setPen( QPen( QColor( 50, 50, 50 ), 0.0 ) ),
130130
mAlphaCurve->setRenderHint( QwtPlotItem::RenderAntialiased, true );
131131
mAlphaCurve->attach( mPlot );

src/ui/qgsgradientcolorrampdialogbase.ui

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<x>0</x>
149149
<y>0</y>
150150
<width>850</width>
151-
<height>494</height>
151+
<height>492</height>
152152
</rect>
153153
</property>
154154
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
@@ -280,7 +280,7 @@
280280
<item>
281281
<widget class="QCheckBox" name="mPlotAlphaCheckbox">
282282
<property name="text">
283-
<string>Alpha</string>
283+
<string>Opacity</string>
284284
</property>
285285
</widget>
286286
</item>
@@ -336,18 +336,18 @@
336336
<header>qgsscrollarea.h</header>
337337
<container>1</container>
338338
</customwidget>
339-
<customwidget>
340-
<class>QgsColorButton</class>
341-
<extends>QToolButton</extends>
342-
<header>qgscolorbutton.h</header>
343-
<container>1</container>
344-
</customwidget>
345339
<customwidget>
346340
<class>QgsCollapsibleGroupBox</class>
347341
<extends>QGroupBox</extends>
348342
<header>qgscollapsiblegroupbox.h</header>
349343
<container>1</container>
350344
</customwidget>
345+
<customwidget>
346+
<class>QgsColorButton</class>
347+
<extends>QToolButton</extends>
348+
<header>qgscolorbutton.h</header>
349+
<container>1</container>
350+
</customwidget>
351351
<customwidget>
352352
<class>QgsDoubleSpinBox</class>
353353
<extends>QDoubleSpinBox</extends>

0 commit comments

Comments
 (0)