mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
Better function naming
This commit is contained in:
parent
2743ea2fa7
commit
16cdae82ce
@ -16,7 +16,7 @@ QgsModelComponentGraphicItem.Flag.__and__ = lambda flag1, flag2: _force_int(flag
|
||||
QgsModelComponentGraphicItem.Flag.__or__ = lambda flag1, flag2: QgsModelComponentGraphicItem.Flag(_force_int(flag1) | _force_int(flag2))
|
||||
try:
|
||||
QgsModelComponentGraphicItem.__attribute_docs__ = {'requestModelRepaint': 'Emitted by the item to request a repaint of the parent model scene.\n', 'aboutToChange': 'Emitted when the definition of the associated component is about to be\nchanged by the item.\n\nThe ``text`` argument gives the translated text describing the change\nabout to occur, and the optional ``id`` can be used to group the\nassociated undo commands.\n', 'changed': 'Emitted when the definition of the associated component is changed by\nthe item.\n', 'repaintArrows': 'Emitted when item requests that all connected arrows are repainted.\n', 'updateArrowPaths': 'Emitted when item requires that all connected arrow paths are\nrecalculated.\n', 'sizePositionChanged': "Emitted when the item's size or position changes.\n"}
|
||||
QgsModelComponentGraphicItem.__virtual_methods__ = ['flags', 'getLinkedParamDataType', 'linkPointCount', 'linkPointText', 'editComment', 'canDeleteComponent', 'deleteComponent', 'editComponent', 'strokeStyle', 'titleAlignment', 'iconPicture', 'iconPixmap']
|
||||
QgsModelComponentGraphicItem.__virtual_methods__ = ['flags', 'linkedParameterDataType', 'linkPointCount', 'linkPointText', 'editComment', 'canDeleteComponent', 'deleteComponent', 'editComponent', 'strokeStyle', 'titleAlignment', 'iconPicture', 'iconPixmap']
|
||||
QgsModelComponentGraphicItem.__abstract_methods__ = ['fillColor', 'strokeColor', 'textColor', 'updateStoredComponentPosition']
|
||||
QgsModelComponentGraphicItem.__overridden_methods__ = ['mouseDoubleClickEvent', 'hoverEnterEvent', 'hoverMoveEvent', 'hoverLeaveEvent', 'itemChange', 'boundingRect', 'contains', 'paint']
|
||||
QgsModelComponentGraphicItem.__signal_arguments__ = {'aboutToChange': ['text: str', 'id: int = 0']}
|
||||
@ -30,7 +30,7 @@ try:
|
||||
except (NameError, AttributeError):
|
||||
pass
|
||||
try:
|
||||
QgsModelParameterGraphicItem.__overridden_methods__ = ['contextMenuEvent', 'canDeleteComponent', 'getLinkedParamDataType', 'getLinkColor', 'fillColor', 'strokeColor', 'textColor', 'iconPicture', 'linkPointCount', 'linkPointText', 'updateStoredComponentPosition', 'deleteComponent']
|
||||
QgsModelParameterGraphicItem.__overridden_methods__ = ['contextMenuEvent', 'canDeleteComponent', 'linkedParameterDataType', 'linkColor', 'fillColor', 'strokeColor', 'textColor', 'iconPicture', 'linkPointCount', 'linkPointText', 'updateStoredComponentPosition', 'deleteComponent']
|
||||
QgsModelParameterGraphicItem.__group__ = ['processing', 'models']
|
||||
except (NameError, AttributeError):
|
||||
pass
|
||||
|
@ -112,7 +112,7 @@ Shows a preview of moving the item from its stored position by ``dx``,
|
||||
Sets a new scene ``rect`` for the item.
|
||||
%End
|
||||
|
||||
virtual QString getLinkedParamDataType( Qt::Edge edge, int index );
|
||||
virtual QString linkedParameterDataType( Qt::Edge edge, int index ) const;
|
||||
|
||||
virtual void mouseDoubleClickEvent( QGraphicsSceneMouseEvent *event );
|
||||
|
||||
@ -328,8 +328,8 @@ Updates the item's button positions, based on the current item rect.
|
||||
|
||||
QColor fallbackColor() const;
|
||||
%Docstring
|
||||
Get the fallback color if parameter or output do not have a specific
|
||||
color
|
||||
Returns the fallback color if the parameter or output does not have a
|
||||
specific color.
|
||||
%End
|
||||
};
|
||||
QFlags<QgsModelComponentGraphicItem::Flag> operator|(QgsModelComponentGraphicItem::Flag f1, QFlags<QgsModelComponentGraphicItem::Flag> f2);
|
||||
@ -369,10 +369,10 @@ Ownership of ``parameter`` is transferred to the item.
|
||||
virtual bool canDeleteComponent();
|
||||
|
||||
|
||||
virtual QString getLinkedParamDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index );
|
||||
virtual QString linkedParameterDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index ) const;
|
||||
|
||||
|
||||
virtual QColor getLinkColor( Qt::Edge edge, int index );
|
||||
virtual QColor linkColor( Qt::Edge edge, int index ) const;
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -1,7 +1,7 @@
|
||||
# The following has been generated automatically from src/gui/processing/models/qgsmodelcomponentgraphicitem.h
|
||||
try:
|
||||
QgsModelComponentGraphicItem.__attribute_docs__ = {'requestModelRepaint': 'Emitted by the item to request a repaint of the parent model scene.\n', 'aboutToChange': 'Emitted when the definition of the associated component is about to be\nchanged by the item.\n\nThe ``text`` argument gives the translated text describing the change\nabout to occur, and the optional ``id`` can be used to group the\nassociated undo commands.\n', 'changed': 'Emitted when the definition of the associated component is changed by\nthe item.\n', 'repaintArrows': 'Emitted when item requests that all connected arrows are repainted.\n', 'updateArrowPaths': 'Emitted when item requires that all connected arrow paths are\nrecalculated.\n', 'sizePositionChanged': "Emitted when the item's size or position changes.\n"}
|
||||
QgsModelComponentGraphicItem.__virtual_methods__ = ['flags', 'getLinkedParamDataType', 'linkPointCount', 'linkPointText', 'editComment', 'canDeleteComponent', 'deleteComponent', 'editComponent', 'strokeStyle', 'titleAlignment', 'iconPicture', 'iconPixmap']
|
||||
QgsModelComponentGraphicItem.__virtual_methods__ = ['flags', 'linkedParameterDataType', 'linkPointCount', 'linkPointText', 'editComment', 'canDeleteComponent', 'deleteComponent', 'editComponent', 'strokeStyle', 'titleAlignment', 'iconPicture', 'iconPixmap']
|
||||
QgsModelComponentGraphicItem.__abstract_methods__ = ['fillColor', 'strokeColor', 'textColor', 'updateStoredComponentPosition']
|
||||
QgsModelComponentGraphicItem.__overridden_methods__ = ['mouseDoubleClickEvent', 'hoverEnterEvent', 'hoverMoveEvent', 'hoverLeaveEvent', 'itemChange', 'boundingRect', 'contains', 'paint']
|
||||
QgsModelComponentGraphicItem.__signal_arguments__ = {'aboutToChange': ['text: str', 'id: int = 0']}
|
||||
@ -15,7 +15,7 @@ try:
|
||||
except (NameError, AttributeError):
|
||||
pass
|
||||
try:
|
||||
QgsModelParameterGraphicItem.__overridden_methods__ = ['contextMenuEvent', 'canDeleteComponent', 'getLinkedParamDataType', 'getLinkColor', 'fillColor', 'strokeColor', 'textColor', 'iconPicture', 'linkPointCount', 'linkPointText', 'updateStoredComponentPosition', 'deleteComponent']
|
||||
QgsModelParameterGraphicItem.__overridden_methods__ = ['contextMenuEvent', 'canDeleteComponent', 'linkedParameterDataType', 'linkColor', 'fillColor', 'strokeColor', 'textColor', 'iconPicture', 'linkPointCount', 'linkPointText', 'updateStoredComponentPosition', 'deleteComponent']
|
||||
QgsModelParameterGraphicItem.__group__ = ['processing', 'models']
|
||||
except (NameError, AttributeError):
|
||||
pass
|
||||
|
@ -112,7 +112,7 @@ Shows a preview of moving the item from its stored position by ``dx``,
|
||||
Sets a new scene ``rect`` for the item.
|
||||
%End
|
||||
|
||||
virtual QString getLinkedParamDataType( Qt::Edge edge, int index );
|
||||
virtual QString linkedParameterDataType( Qt::Edge edge, int index ) const;
|
||||
|
||||
virtual void mouseDoubleClickEvent( QGraphicsSceneMouseEvent *event );
|
||||
|
||||
@ -328,8 +328,8 @@ Updates the item's button positions, based on the current item rect.
|
||||
|
||||
QColor fallbackColor() const;
|
||||
%Docstring
|
||||
Get the fallback color if parameter or output do not have a specific
|
||||
color
|
||||
Returns the fallback color if the parameter or output does not have a
|
||||
specific color.
|
||||
%End
|
||||
};
|
||||
QFlags<QgsModelComponentGraphicItem::Flag> operator|(QgsModelComponentGraphicItem::Flag f1, QFlags<QgsModelComponentGraphicItem::Flag> f2);
|
||||
@ -369,10 +369,10 @@ Ownership of ``parameter`` is transferred to the item.
|
||||
virtual bool canDeleteComponent();
|
||||
|
||||
|
||||
virtual QString getLinkedParamDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index );
|
||||
virtual QString linkedParameterDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index ) const;
|
||||
|
||||
|
||||
virtual QColor getLinkColor( Qt::Edge edge, int index );
|
||||
virtual QColor linkColor( Qt::Edge edge, int index ) const;
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -73,7 +73,7 @@ QgsModelArrowItem::QgsModelArrowItem( QgsModelComponentGraphicItem *startItem, M
|
||||
|
||||
void QgsModelArrowItem::paint( QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * )
|
||||
{
|
||||
QColor color = mStartItem->getLinkColor( mStartEdge, mStartIndex );
|
||||
QColor color = mStartItem->linkColor( mStartEdge, mStartIndex );
|
||||
|
||||
if ( mStartItem->state() == QgsModelComponentGraphicItem::Selected || mEndItem->state() == QgsModelComponentGraphicItem::Selected )
|
||||
color.setAlpha( 220 );
|
||||
@ -121,7 +121,7 @@ void QgsModelArrowItem::paint( QPainter *painter, const QStyleOptionGraphicsItem
|
||||
|
||||
// Set the painter back to regular stroke thickness
|
||||
p = pen();
|
||||
QColor endColor = mEndItem->getLinkColor( mEndEdge, mEndIndex );
|
||||
QColor endColor = mEndItem->linkColor( mEndEdge, mEndIndex );
|
||||
color.setAlpha( 255 );
|
||||
|
||||
QLinearGradient gradient;
|
||||
|
@ -868,7 +868,7 @@ QString QgsModelParameterGraphicItem::linkPointText( Qt::Edge, int index ) const
|
||||
}
|
||||
|
||||
|
||||
QString QgsModelParameterGraphicItem::getLinkedParamDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index )
|
||||
QString QgsModelParameterGraphicItem::linkedParameterDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index ) const
|
||||
{
|
||||
if ( index < 0 )
|
||||
{
|
||||
@ -884,7 +884,7 @@ QString QgsModelParameterGraphicItem::getLinkedParamDataType( Qt::Edge /* unused
|
||||
}
|
||||
|
||||
|
||||
QColor QgsModelParameterGraphicItem::getLinkColor( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index )
|
||||
QColor QgsModelParameterGraphicItem::linkColor( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index ) const
|
||||
{
|
||||
if ( index < 0 )
|
||||
{
|
||||
@ -1139,7 +1139,7 @@ int QgsModelChildAlgorithmGraphicItem::linkPointCount( Qt::Edge edge ) const
|
||||
}
|
||||
|
||||
|
||||
QString QgsModelComponentGraphicItem::getLinkedParamDataType( Qt::Edge edge, int index )
|
||||
QString QgsModelComponentGraphicItem::linkedParameterDataType( Qt::Edge edge, int index ) const
|
||||
{
|
||||
if ( const QgsProcessingModelChildAlgorithm *child = dynamic_cast<const QgsProcessingModelChildAlgorithm *>( component() ) )
|
||||
{
|
||||
@ -1179,7 +1179,7 @@ QString QgsModelComponentGraphicItem::getLinkedParamDataType( Qt::Edge edge, int
|
||||
return QString();
|
||||
}
|
||||
|
||||
QColor QgsModelComponentGraphicItem::getLinkColor( Qt::Edge edge, int index )
|
||||
QColor QgsModelComponentGraphicItem::linkColor( Qt::Edge edge, int index ) const
|
||||
{
|
||||
if ( const QgsProcessingModelChildAlgorithm *child = dynamic_cast<const QgsProcessingModelChildAlgorithm *>( component() ) )
|
||||
{
|
||||
|
@ -137,11 +137,11 @@ class GUI_EXPORT QgsModelComponentGraphicItem : public QGraphicsObject
|
||||
*/
|
||||
void setItemRect( QRectF rect );
|
||||
|
||||
virtual QString getLinkedParamDataType( Qt::Edge edge, int index );
|
||||
virtual QString linkedParameterDataType( Qt::Edge edge, int index ) const;
|
||||
|
||||
#ifndef SIP_RUN
|
||||
|
||||
virtual QColor getLinkColor( Qt::Edge edge, int index );
|
||||
virtual QColor linkColor( Qt::Edge edge, int index ) const;
|
||||
|
||||
/**
|
||||
* Shows a preview of setting a new \a rect for the item.
|
||||
@ -368,7 +368,7 @@ class GUI_EXPORT QgsModelComponentGraphicItem : public QGraphicsObject
|
||||
void updateButtonPositions();
|
||||
|
||||
/**
|
||||
* Get the fallback color if parameter or output do not have a specific color
|
||||
* Returns the fallback color if the parameter or output does not have a specific color.
|
||||
*/
|
||||
QColor fallbackColor() const { return mFallbackColor; };
|
||||
|
||||
@ -437,9 +437,9 @@ class GUI_EXPORT QgsModelParameterGraphicItem : public QgsModelComponentGraphicI
|
||||
void contextMenuEvent( QGraphicsSceneContextMenuEvent *event ) override;
|
||||
bool canDeleteComponent() override;
|
||||
|
||||
QString getLinkedParamDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index ) override;
|
||||
QString linkedParameterDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index ) const override;
|
||||
|
||||
QColor getLinkColor( Qt::Edge edge, int index ) override;
|
||||
QColor linkColor( Qt::Edge edge, int index ) const override;
|
||||
|
||||
protected:
|
||||
QColor fillColor( State state ) const override;
|
||||
|
@ -224,7 +224,7 @@ void QgsModelDesignerSocketGraphicItem::paint( QPainter *painter, const QStyleOp
|
||||
|
||||
QColor QgsModelDesignerSocketGraphicItem::socketColor() const
|
||||
{
|
||||
return mComponentItem->getLinkColor( mEdge, mIndex );
|
||||
return mComponentItem->linkColor( mEdge, mIndex );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user