Skip to content

Commit

Permalink
Function naming improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 20, 2024
1 parent 0a877ea commit a979931
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ Emitted whenever the selected item changes.
If ``None``, no item is selected.
%End

void showPreviousResults( const QString &childId );
void showChildAlgorithmOutputs( const QString &childId );
%Docstring
Emitted when the user opts to view previous results from the child algorithm with matching ID.

.. versionadded:: 3.38
%End

void showLog( const QString &childId );
void showChildAlgorithmLog( const QString &childId );
%Docstring
Emitted when the user opts to view the previous log from the child algorithm with matching ID.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ Emitted whenever the selected item changes.
If ``None``, no item is selected.
%End

void showPreviousResults( const QString &childId );
void showChildAlgorithmOutputs( const QString &childId );
%Docstring
Emitted when the user opts to view previous results from the child algorithm with matching ID.

.. versionadded:: 3.38
%End

void showLog( const QString &childId );
void showChildAlgorithmLog( const QString &childId );
%Docstring
Emitted when the user opts to view the previous log from the child algorithm with matching ID.

Expand Down
8 changes: 4 additions & 4 deletions src/gui/processing/models/qgsmodeldesignerdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,8 @@ void QgsModelDesignerDialog::setModelScene( QgsModelGraphicsScene *scene )
} );
connect( mScene, &QgsModelGraphicsScene::componentAboutToChange, this, [ = ]( const QString & description, int id ) { beginUndoCommand( description, id ); } );
connect( mScene, &QgsModelGraphicsScene::componentChanged, this, [ = ] { endUndoCommand(); } );
connect( mScene, &QgsModelGraphicsScene::showPreviousResults, this, &QgsModelDesignerDialog::showPreviousResults );
connect( mScene, &QgsModelGraphicsScene::showLog, this, &QgsModelDesignerDialog::showLog );
connect( mScene, &QgsModelGraphicsScene::showChildAlgorithmOutputs, this, &QgsModelDesignerDialog::showChildAlgorithmOutputs );
connect( mScene, &QgsModelGraphicsScene::showChildAlgorithmLog, this, &QgsModelDesignerDialog::showChildAlgorithmLog );

mView->centerOn( center );

Expand Down Expand Up @@ -1043,7 +1043,7 @@ void QgsModelDesignerDialog::run()
dialog->exec();
}

void QgsModelDesignerDialog::showPreviousResults( const QString &childId )
void QgsModelDesignerDialog::showChildAlgorithmOutputs( const QString &childId )
{
const QString childDescription = mModel->childAlgorithm( childId ).description();

Expand Down Expand Up @@ -1121,7 +1121,7 @@ void QgsModelDesignerDialog::showPreviousResults( const QString &childId )
}
}

void QgsModelDesignerDialog::showLog( const QString &childId )
void QgsModelDesignerDialog::showChildAlgorithmLog( const QString &childId )
{
const QString childDescription = mModel->childAlgorithm( childId ).description();

Expand Down
4 changes: 2 additions & 2 deletions src/gui/processing/models/qgsmodeldesignerdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ class GUI_EXPORT QgsModelDesignerDialog : public QMainWindow, public Ui::QgsMode
void setPanelVisibility( bool hidden );
void editHelp();
void run();
void showPreviousResults( const QString &childId );
void showLog( const QString &childId );
void showChildAlgorithmOutputs( const QString &childId );
void showChildAlgorithmLog( const QString &childId );

private:

Expand Down
4 changes: 2 additions & 2 deletions src/gui/processing/models/qgsmodelgraphicsscene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,11 +147,11 @@ void QgsModelGraphicsScene::createItems( QgsProcessingModelAlgorithm *model, Qgs
connect( item, &QgsModelComponentGraphicItem::aboutToChange, this, &QgsModelGraphicsScene::componentAboutToChange );
connect( item, &QgsModelChildAlgorithmGraphicItem::showPreviousResults, this, [this, childId]
{
emit showPreviousResults( childId );
emit showChildAlgorithmOutputs( childId );
} );
connect( item, &QgsModelChildAlgorithmGraphicItem::showLog, this, [this, childId]
{
emit showLog( childId );
emit showChildAlgorithmLog( childId );
} );

addCommentItemForComponent( model, it.value(), item );
Expand Down
4 changes: 2 additions & 2 deletions src/gui/processing/models/qgsmodelgraphicsscene.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,14 @@ class GUI_EXPORT QgsModelGraphicsScene : public QGraphicsScene
*
* \since QGIS 3.38
*/
void showPreviousResults( const QString &childId );
void showChildAlgorithmOutputs( const QString &childId );

/**
* Emitted when the user opts to view the previous log from the child algorithm with matching ID.
*
* \since QGIS 3.38
*/
void showLog( const QString &childId );
void showChildAlgorithmLog( const QString &childId );

protected:

Expand Down

0 comments on commit a979931

Please sign in to comment.