mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
rename method to socketColor
This commit is contained in:
parent
293be69903
commit
9c1035e773
@ -179,15 +179,19 @@ Return the component associated to the socket */
|
||||
%Docstring
|
||||
Return the parent graphic item associated to the socket */
|
||||
%End
|
||||
QColor getColor();
|
||||
QColor socketColor() const;
|
||||
%Docstring
|
||||
Returns the color of the socket based on the type of data the param
|
||||
corresponds to */
|
||||
corresponds to.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
%End
|
||||
|
||||
bool isDefaultParamValue();
|
||||
bool isDefaultParameterValue() const;
|
||||
%Docstring
|
||||
Returns whether the param value bear the default param value */
|
||||
Returns ``True`` if the parameter is set to the default parameter value.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
%End
|
||||
signals:
|
||||
|
||||
|
@ -179,15 +179,19 @@ Return the component associated to the socket */
|
||||
%Docstring
|
||||
Return the parent graphic item associated to the socket */
|
||||
%End
|
||||
QColor getColor();
|
||||
QColor socketColor() const;
|
||||
%Docstring
|
||||
Returns the color of the socket based on the type of data the param
|
||||
corresponds to */
|
||||
corresponds to.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
%End
|
||||
|
||||
bool isDefaultParamValue();
|
||||
bool isDefaultParameterValue() const;
|
||||
%Docstring
|
||||
Returns whether the param value bear the default param value */
|
||||
Returns ``True`` if the parameter is set to the default parameter value.
|
||||
|
||||
.. versionadded:: 4.0
|
||||
%End
|
||||
signals:
|
||||
|
||||
|
@ -3145,8 +3145,6 @@ QString QgsProcessingParameterDefinition::userFriendlyString( QVariant &value )
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << value ;
|
||||
|
||||
return value.toString();
|
||||
}
|
||||
|
||||
|
@ -185,12 +185,12 @@ QgsModelDesignerSocketGraphicItem::QgsModelDesignerSocketGraphicItem( QgsModelCo
|
||||
|
||||
void QgsModelDesignerSocketGraphicItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * )
|
||||
{
|
||||
QColor outlineColor = getColor();
|
||||
QColor outlineColor = socketColor();
|
||||
QColor fillColor = QColor( outlineColor );
|
||||
|
||||
if ( isInput() )
|
||||
{
|
||||
fillColor.setAlpha( isDefaultParamValue() ? 30 : 255 );
|
||||
fillColor.setAlpha( isDefaultParameterValue() ? 30 : 255 );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -222,13 +222,13 @@ void QgsModelDesignerSocketGraphicItem::paint( QPainter *painter, const QStyleOp
|
||||
}
|
||||
|
||||
|
||||
QColor QgsModelDesignerSocketGraphicItem::getColor()
|
||||
QColor QgsModelDesignerSocketGraphicItem::socketColor() const
|
||||
{
|
||||
return componentItem()->getLinkColor( mEdge, mIndex );
|
||||
return mComponentItem->getLinkColor( mEdge, mIndex );
|
||||
}
|
||||
|
||||
|
||||
bool QgsModelDesignerSocketGraphicItem::isDefaultParamValue()
|
||||
bool QgsModelDesignerSocketGraphicItem::isDefaultParameterValue() const
|
||||
{
|
||||
if ( !mComponent )
|
||||
{
|
||||
|
@ -195,11 +195,17 @@ class GUI_EXPORT QgsModelDesignerSocketGraphicItem : public QgsModelDesignerFlat
|
||||
/** Return the parent graphic item associated to the socket */
|
||||
QgsModelComponentGraphicItem *componentItem() { return mComponentItem; };
|
||||
|
||||
/* Returns the color of the socket based on the type of data the param corresponds to */
|
||||
QColor getColor();
|
||||
/*
|
||||
* Returns the color of the socket based on the type of data the param corresponds to.
|
||||
* \since QGIS 4.0
|
||||
*/
|
||||
QColor socketColor() const;
|
||||
|
||||
/* Returns whether the param value bear the default param value */
|
||||
bool isDefaultParamValue();
|
||||
/*
|
||||
* Returns TRUE if the parameter is set to the default parameter value.
|
||||
* \since QGIS 4.0
|
||||
*/
|
||||
bool isDefaultParameterValue() const;
|
||||
signals:
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user