Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
rename displayMessage to emitMessage in QgsMapTool
  • Loading branch information
3nids committed Mar 19, 2014
1 parent ab920ba commit 59a6663
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/nodetool/qgsmaptoolnodetool.cpp
Expand Up @@ -362,7 +362,7 @@ void QgsMapToolNodeTool::canvasPressEvent( QMouseEvent * e )

if ( snapResults.size() < 1 )
{
emit displayMessage( tr( "could not snap to a segment on the current layer." ) );
emit emitMessage( tr( "could not snap to a segment on the current layer." ) );
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsmaptooladdpart.cpp
Expand Up @@ -62,7 +62,7 @@ void QgsMapToolAddPart::canvasReleaseEvent( QMouseEvent * e )

if ( !selectionErrorMsg.isEmpty() )
{
emit displayMessage( tr( "Could not add part. %1" ).arg( selectionErrorMsg ) , QgsMessageBar::WARNING );
emit emitMessage( tr( "Could not add part. %1" ).arg( selectionErrorMsg ) , QgsMessageBar::WARNING );
stopCapturing();
return;
}
Expand Down Expand Up @@ -101,7 +101,7 @@ void QgsMapToolAddPart::canvasReleaseEvent( QMouseEvent * e )
else if ( error == 2 )
{
//problem with coordinate transformation
emit displayMessage( tr( "Coordinate transform error. Cannot transform the point to the layers coordinate system" ) , QgsMessageBar::WARNING );
emit emitMessage( tr( "Coordinate transform error. Cannot transform the point to the layers coordinate system" ) , QgsMessageBar::WARNING );
return;
}

Expand Down Expand Up @@ -195,6 +195,6 @@ void QgsMapToolAddPart::canvasReleaseEvent( QMouseEvent * e )
break;
}

emit displayMessage( errorMessage , QgsMessageBar::WARNING );
emit emitMessage( errorMessage , QgsMessageBar::WARNING );
vlayer->destroyEditCommand();
}
2 changes: 1 addition & 1 deletion src/app/qgsmaptooldeletepart.cpp
Expand Up @@ -64,7 +64,7 @@ void QgsMapToolDeletePart::canvasPressEvent( QMouseEvent *e )
}
else
{
emit displayMessage( tr( "could not snap to a part on the current layer." ) );
emit emitMessage( tr( "could not snap to a part on the current layer." ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooldeletering.cpp
Expand Up @@ -66,7 +66,7 @@ void QgsMapToolDeleteRing::canvasPressEvent( QMouseEvent *e )
}
else
{
emit displayMessage( tr( "could not snap to a ring on the current layer." ) );
emit emitMessage( tr( "could not snap to a ring on the current layer." ) );
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmaptooledit.cpp
Expand Up @@ -133,10 +133,10 @@ int QgsMapToolEdit::addTopologicalPoints( const QList<QgsPoint>& geom )

void QgsMapToolEdit::notifyNotVectorLayer()
{
emit displayMessage( tr( "No active vector layer" ) );
emit emitMessage( tr( "No active vector layer" ) );
}

void QgsMapToolEdit::notifyNotEditableLayer()
{
emit displayMessage( tr( "Layer not editable" ) );
emit emitMessage( tr( "Layer not editable" ) );
}
4 changes: 2 additions & 2 deletions src/gui/qgsmaptool.h
Expand Up @@ -131,8 +131,8 @@ class GUI_EXPORT QgsMapTool : public QObject

signals:
//! emit a message
void displayMessage( QString message );
void displayMessage( QString message, QgsMessageBar::MessageLevel );
void emitMessage( QString message );
void emitMessage( QString message, QgsMessageBar::MessageLevel );

//! emit signal to clear previous message
void removeMessage();
Expand Down

0 comments on commit 59a6663

Please sign in to comment.