Skip to content

Commit

Permalink
const fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Oct 1, 2024
1 parent ddc0d1f commit 4afbf9e
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ whenever this signal is emitted.

virtual ~QgsCreateAnnotationItemMapToolInterface();

virtual QgsCreateAnnotationItemMapToolHandler *handler() = 0;
virtual QgsCreateAnnotationItemMapToolHandler *handler() const = 0;
%Docstring
Returns the handler object for the map tool.
%End
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ whenever this signal is emitted.

virtual ~QgsCreateAnnotationItemMapToolInterface();

virtual QgsCreateAnnotationItemMapToolHandler *handler() = 0;
virtual QgsCreateAnnotationItemMapToolHandler *handler() const = 0;
%Docstring
Returns the handler object for the map tool.
%End
Expand Down
2 changes: 1 addition & 1 deletion src/gui/annotations/qgscreateannotationitemmaptool.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class GUI_EXPORT QgsCreateAnnotationItemMapToolInterface
/**
* Returns the handler object for the map tool.
*/
virtual QgsCreateAnnotationItemMapToolHandler *handler() = 0;
virtual QgsCreateAnnotationItemMapToolHandler *handler() const = 0;

/**
* Returns a reference to the associated map tool.
Expand Down
8 changes: 4 additions & 4 deletions src/gui/annotations/qgscreateannotationitemmaptool_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ QgsMapToolCaptureAnnotationItem::QgsMapToolCaptureAnnotationItem( QgsMapCanvas *
mToolName = tr( "Annotation tool" );
}

QgsCreateAnnotationItemMapToolHandler *QgsMapToolCaptureAnnotationItem::handler()
QgsCreateAnnotationItemMapToolHandler *QgsMapToolCaptureAnnotationItem::handler() const
{
return mHandler;
}
Expand Down Expand Up @@ -120,7 +120,7 @@ void QgsCreatePointTextItemMapTool::cadCanvasPressEvent( QgsMapMouseEvent *event
mHandler->pushCreatedItem( createdItem.release() );
}

QgsCreateAnnotationItemMapToolHandler *QgsCreatePointTextItemMapTool::handler()
QgsCreateAnnotationItemMapToolHandler *QgsCreatePointTextItemMapTool::handler() const
{
return mHandler;
}
Expand Down Expand Up @@ -369,7 +369,7 @@ void QgsCreatePictureItemMapTool::keyPressEvent( QKeyEvent *event )
}
}

QgsCreateAnnotationItemMapToolHandler *QgsCreatePictureItemMapTool::handler()
QgsCreateAnnotationItemMapToolHandler *QgsCreatePictureItemMapTool::handler() const
{
return mHandler;
}
Expand Down Expand Up @@ -472,7 +472,7 @@ void QgsCreateRectangleTextItemMapTool::keyPressEvent( QKeyEvent *event )
}
}

QgsCreateAnnotationItemMapToolHandler *QgsCreateRectangleTextItemMapTool::handler()
QgsCreateAnnotationItemMapToolHandler *QgsCreateRectangleTextItemMapTool::handler() const
{
return mHandler;
}
Expand Down
8 changes: 4 additions & 4 deletions src/gui/annotations/qgscreateannotationitemmaptool_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GUI_EXPORT QgsMapToolCaptureAnnotationItem: public QgsMapToolCapture, publ
public:
//! Constructor
QgsMapToolCaptureAnnotationItem( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget, CaptureMode mode );
QgsCreateAnnotationItemMapToolHandler *handler() override;
QgsCreateAnnotationItemMapToolHandler *handler() const override;
QgsMapTool *mapTool() override;
QgsMapLayer *layer() const override;
QgsMapToolCapture::Capabilities capabilities() const override;
Expand Down Expand Up @@ -71,7 +71,7 @@ class GUI_EXPORT QgsCreatePointTextItemMapTool: public QgsMapToolAdvancedDigitiz
~QgsCreatePointTextItemMapTool() override;

void cadCanvasPressEvent( QgsMapMouseEvent *event ) override;
QgsCreateAnnotationItemMapToolHandler *handler() override;
QgsCreateAnnotationItemMapToolHandler *handler() const override;
QgsMapTool *mapTool() override;

private:
Expand Down Expand Up @@ -161,7 +161,7 @@ class GUI_EXPORT QgsCreateRectangleTextItemMapTool: public QgsMapToolAdvancedDig
void cadCanvasMoveEvent( QgsMapMouseEvent *event ) override;
void keyPressEvent( QKeyEvent *event ) override;

QgsCreateAnnotationItemMapToolHandler *handler() override;
QgsCreateAnnotationItemMapToolHandler *handler() const override;
QgsMapTool *mapTool() override;

private:
Expand Down Expand Up @@ -195,7 +195,7 @@ class GUI_EXPORT QgsCreatePictureItemMapTool: public QgsMapToolAdvancedDigitizin
void cadCanvasMoveEvent( QgsMapMouseEvent *event ) override;
void keyPressEvent( QKeyEvent *event ) override;

QgsCreateAnnotationItemMapToolHandler *handler() override;
QgsCreateAnnotationItemMapToolHandler *handler() const override;
QgsMapTool *mapTool() override;

private:
Expand Down

0 comments on commit 4afbf9e

Please sign in to comment.