Skip to content
Permalink
Browse files

rename displayMessage to emitMessage in QgsMapTool

  • Loading branch information
3nids committed Mar 19, 2014
1 parent ab920ba commit 59a6663964e919d553c2bae92a0f97c42cc9868e
@@ -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;
}

@@ -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;
}
@@ -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;
}

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

emit displayMessage( errorMessage , QgsMessageBar::WARNING );
emit emitMessage( errorMessage , QgsMessageBar::WARNING );
vlayer->destroyEditCommand();
}
@@ -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." ) );
}
}

@@ -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." ) );
}
}

@@ -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" ) );
}
@@ -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();

0 comments on commit 59a6663

Please sign in to comment.
You can’t perform that action at this time.