Skip to content

Commit ddb96ea

Browse files
author
timlinux
committedNov 7, 2008
Final cleanups for gui API
git-svn-id: http://svn.osgeo.org/qgis/trunk@9576 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 5501726 commit ddb96ea

11 files changed

+16
-15
lines changed
 

‎python/gui/qgsmapcanvasmap.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class QgsMapCanvasMap : QGraphicsRectItem
3838
//! renders map using QgsMapRender to mPixmap
3939
void render();
4040

41-
void setBgColor(const QColor& color);
41+
void setBackgroundColor(const QColor& color);
4242

4343
void setPanningOffset(const QPoint& point);
4444

‎python/gui/qgsmapoverviewcanvas.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class QgsMapOverviewCanvas : QWidget
1111
~QgsMapOverviewCanvas();
1212

1313
//! used for overview canvas to reflect changed extent in main map canvas
14-
void reflectChangedExtent();
14+
void drawExtentRect();
1515

1616
//! renders overview and updates panning widget
1717
void refresh();

‎python/gui/qgsmaptoolemitpoint.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ class QgsMapToolEmitPoint : QgsMapTool
2121
signals:
2222

2323
//! signal emitted on canvas click
24-
void gotPoint(QgsPoint& point, Qt::MouseButton button);
24+
void canvasClicked(QgsPoint& point, Qt::MouseButton button);
2525
};

‎src/gui/qgsmapcanvas.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ void QgsMapCanvas::setExtent( QgsRect const & r )
463463
emit extentsChanged();
464464
updateScale();
465465
if ( mMapOverview )
466-
mMapOverview->reflectChangedExtent();
466+
mMapOverview->drawExtentRect();
467467
mLastExtent = current;
468468

469469
// notify canvas items of change
@@ -1000,7 +1000,7 @@ void QgsMapCanvas::unsetMapTool( QgsMapTool* tool )
10001000
void QgsMapCanvas::setCanvasColor( const QColor & theColor )
10011001
{
10021002
// background of map's pixmap
1003-
mMap->setBgColor( theColor );
1003+
mMap->setBackgroundColor( theColor );
10041004

10051005
// background of the QGraphicsView
10061006
QBrush bgBrush( theColor );

‎src/gui/qgsmapcanvas.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ class GUI_EXPORT QgsMapCanvas : public QGraphicsView
226226
// currently used by pan map tool
227227
//! Ends pan action and redraws the canvas.
228228
void panActionEnd( QPoint releasePoint );
229+
229230
//! Called when mouse is moving and pan is activated
230231
void panAction( QMouseEvent * event );
231232

‎src/gui/qgsmapcanvasmap.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class GUI_EXPORT QgsMapCanvasMap : public QGraphicsRectItem
4444
//! renders map using QgsMapRenderer to mPixmap
4545
void render();
4646

47-
void setBgColor( const QColor& color ) { mBgColor = color; }
47+
void setBackgroundColor( const QColor& color ) { mBgColor = color; }
4848

4949
void setPanningOffset( const QPoint& point );
5050

‎src/gui/qgsmapoverviewcanvas.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void QgsMapOverviewCanvas::resizeEvent( QResizeEvent* e )
9090
}
9191

9292

93-
void QgsMapOverviewCanvas::reflectChangedExtent()
93+
void QgsMapOverviewCanvas::drawExtentRect()
9494
{
9595
const QgsRect& extent = mMapCanvas->extent();
9696

@@ -247,7 +247,7 @@ void QgsMapOverviewCanvas::refresh()
247247
update();
248248

249249
// update panning widget
250-
reflectChangedExtent();
250+
drawExtentRect();
251251
}
252252

253253

@@ -269,7 +269,7 @@ void QgsMapOverviewCanvas::setLayerSet( const QStringList& layerSet )
269269
void QgsMapOverviewCanvas::updateFullExtent( const QgsRect& rect )
270270
{
271271
mMapRenderer->setExtent( rect );
272-
reflectChangedExtent();
272+
drawExtentRect();
273273
}
274274

275275
void QgsMapOverviewCanvas::hasCrsTransformEnabled( bool flag )

‎src/gui/qgsmapoverviewcanvas.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class GUI_EXPORT QgsMapOverviewCanvas : public QWidget
4545
~QgsMapOverviewCanvas();
4646

4747
//! used for overview canvas to reflect changed extent in main map canvas
48-
void reflectChangedExtent();
48+
void drawExtentRect();
4949

5050
//! renders overview and updates panning widget
5151
void refresh();

‎src/gui/qgsmaptoolemitpoint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void QgsMapToolEmitPoint::canvasMoveEvent( QMouseEvent * e )
3232
void QgsMapToolEmitPoint::canvasPressEvent( QMouseEvent * e )
3333
{
3434
QgsPoint pnt = toMapCoordinates( e->pos() );
35-
emit gotPoint( pnt, e->button() );
35+
emit canvasClicked( pnt, e->button() );
3636
}
3737

3838
void QgsMapToolEmitPoint::canvasReleaseEvent( QMouseEvent * e )

‎src/gui/qgsmaptoolemitpoint.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class QgsMapCanvas;
2323

2424

2525
/** \ingroup gui
26-
* A map tool that simple emits a point when clicking on the map.
27-
* Connecting a slot to its gotPoint() signal will
26+
* A map tool that simply emits a point when clicking on the map.
27+
* Connecting a slot to its canvasClicked() signal will
2828
* let you implement custom behaviour for the passed in point.
2929
*/
3030
class GUI_EXPORT QgsMapToolEmitPoint : public QgsMapTool
@@ -47,7 +47,7 @@ class GUI_EXPORT QgsMapToolEmitPoint : public QgsMapTool
4747
signals:
4848

4949
//! signal emitted on canvas click
50-
void gotPoint( QgsPoint& point, Qt::MouseButton button );
50+
void canvasClicked( QgsPoint& point, Qt::MouseButton button );
5151
};
5252

5353
#endif

‎src/plugins/georeferencer/mapcoordsdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ MapCoordsDialog::MapCoordsDialog( const QgsPoint& pixelCoords, QgsMapCanvas* qgi
3737

3838
mToolEmitPoint = new QgsMapToolEmitPoint( qgisCanvas );
3939
mToolEmitPoint->setButton( btnPointFromCanvas );
40-
connect(( QgsMapToolEmitPoint* )mToolEmitPoint, SIGNAL( gotPoint( QgsPoint&, Qt::MouseButton ) ),
40+
connect(( QgsMapToolEmitPoint* )mToolEmitPoint, SIGNAL( canvasClicked( QgsPoint&, Qt::MouseButton ) ),
4141
this, SLOT( maybeSetXY( QgsPoint&, Qt::MouseButton ) ) );
4242

4343
connect( leXCoord, SIGNAL( textChanged( const QString& ) ), this, SLOT( updateOK() ) );

0 commit comments

Comments
 (0)
Please sign in to comment.