[QGIS Commit] r9233 - in trunk/qgis: python/gui src/app
src/app/legend src/core src/gui src/plugins/georeferencer
src/plugins/grass src/plugins/maplayer
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Aug 31 14:28:22 EDT 2008
Author: timlinux
Date: 2008-08-31 14:28:22 -0400 (Sun, 31 Aug 2008)
New Revision: 9233
Modified:
trunk/qgis/python/gui/qgisinterface.sip
trunk/qgis/python/gui/qgsmapcanvas.sip
trunk/qgis/python/gui/qgsmapcanvasitem.sip
trunk/qgis/python/gui/qgsmapcanvasmap.sip
trunk/qgis/python/gui/qgsmapoverviewcanvas.sip
trunk/qgis/python/gui/qgsmaptool.sip
trunk/qgis/python/gui/qgsmaptoolpan.sip
trunk/qgis/python/gui/qgsmaptoolzoom.sip
trunk/qgis/src/app/legend/qgslegend.cpp
trunk/qgis/src/app/legend/qgslegend.h
trunk/qgis/src/app/legend/qgslegendlayerfile.cpp
trunk/qgis/src/app/legend/qgslegendlayerfile.h
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/app/qgisapp.h
trunk/qgis/src/app/qgisappinterface.cpp
trunk/qgis/src/app/qgisappinterface.h
trunk/qgis/src/app/qgsmaptooladdfeature.cpp
trunk/qgis/src/app/qgsmaptooladdvertex.cpp
trunk/qgis/src/app/qgsmaptoolcapture.cpp
trunk/qgis/src/app/qgsmaptooledit.cpp
trunk/qgis/src/app/qgsmaptoolidentify.cpp
trunk/qgis/src/app/qgsmaptoolmovefeature.cpp
trunk/qgis/src/app/qgsmaptoolmovevertex.cpp
trunk/qgis/src/app/qgsmaptoolselect.cpp
trunk/qgis/src/core/qgsprojectfiletransform.cpp
trunk/qgis/src/gui/qgisinterface.h
trunk/qgis/src/gui/qgsmapcanvas.cpp
trunk/qgis/src/gui/qgsmapcanvas.h
trunk/qgis/src/gui/qgsmapcanvasitem.cpp
trunk/qgis/src/gui/qgsmapcanvasitem.h
trunk/qgis/src/gui/qgsmapcanvasmap.h
trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
trunk/qgis/src/gui/qgsmapoverviewcanvas.h
trunk/qgis/src/gui/qgsmaptool.cpp
trunk/qgis/src/gui/qgsmaptool.h
trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp
trunk/qgis/src/gui/qgsmaptoolpan.h
trunk/qgis/src/gui/qgsmaptoolzoom.h
trunk/qgis/src/gui/qgsrubberband.cpp
trunk/qgis/src/gui/qgsvertexmarker.cpp
trunk/qgis/src/plugins/georeferencer/qgsgeorefdatapoint.cpp
trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp
trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp
trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
trunk/qgis/src/plugins/maplayer/maplayertest.cpp
Log:
More api cleanups mainly affecting gui
Modified: trunk/qgis/python/gui/qgisinterface.sip
===================================================================
--- trunk/qgis/python/gui/qgisinterface.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgisinterface.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -31,7 +31,7 @@
//! Zoom to full extent of map layers
virtual void zoomFull()=0;
//! Zoom to previous view extent
- virtual void zoomPrevious()=0;
+ virtual void zoomToPrevious()=0;
//! Zoome to extent of the active layer
virtual void zoomActiveLayer()=0;
Modified: trunk/qgis/python/gui/qgsmapcanvas.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapcanvas.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgsmapcanvas.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -11,13 +11,13 @@
%End
public:
- QgsMapCanvasLayer(QgsMapLayer* layer, bool visible = TRUE, bool inOverview = FALSE);
+ QgsMapCanvasLayer(QgsMapLayer* layer, bool visible = TRUE, bool isInOverview = FALSE);
void setVisible(bool visible);
- void setInOverview(bool inOverview);
+ void setInOverview(bool isInOverview);
bool isVisible() const;
- bool inOverview() const;
+ bool isInOverview() const;
QgsMapLayer* layer();
//const QgsMapLayer* layer() const;
@@ -68,7 +68,7 @@
QPixmap& canvasPixmap();
//! Get the last reported scale of the canvas
- double getScale();
+ double scale();
//! Clear the map canvas
void clear();
@@ -85,10 +85,10 @@
void setExtent(const QgsRect & r);
//! Zoom to the full extent of all layers
- void zoomFullExtent();
+ void zoomToFullExtent();
//! Zoom to the previous extent (view)
- void zoomPreviousExtent();
+ void zoomToPreviousExtent();
/**Zooms to the extend of the selected features*/
void zoomToSelected();
@@ -165,7 +165,7 @@
void enableAntiAliasing(bool theFlag);
//! Select which Qt class to render with
- void useQImageToRender(bool theFlag);
+ void useImageToRender(bool theFlag);
// following 2 methods should be moved elsewhere or changed to private
// currently used by pan map tool
@@ -272,7 +272,7 @@
void moveCanvasContents(bool reset = FALSE);
//! called on resize or changed extent to notify canvas items to change their rectangle
- void updateCanvasItemsPositions();
+ void updateCanvasItemPositions();
}; // class QgsMapCanvas
Modified: trunk/qgis/python/gui/qgsmapcanvasitem.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapcanvasitem.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgsmapcanvasitem.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -42,10 +42,10 @@
void setRect(const QgsRect& r);
//! transformation from screen coordinates to map coordinates
- QgsPoint toMapCoords(const QPoint& point);
+ QgsPoint toMapCoordinates(const QPoint& point);
//! transformation from map coordinates to screen coordinates
- QPointF toCanvasCoords(const QgsPoint& point);
+ QPointF toCanvasCoordinates(const QgsPoint& point);
};
Modified: trunk/qgis/python/gui/qgsmapcanvasmap.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapcanvasmap.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgsmapcanvasmap.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -33,7 +33,7 @@
void enableAntiAliasing(bool flag);
- void useQImageToRender(bool flag);
+ void useImageToRender(bool flag);
//! renders map using QgsMapRender to mPixmap
void render();
Modified: trunk/qgis/python/gui/qgsmapoverviewcanvas.sip
===================================================================
--- trunk/qgis/python/gui/qgsmapoverviewcanvas.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgsmapoverviewcanvas.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -17,7 +17,7 @@
void refresh();
//! changes background color
- void setbgColor(const QColor& color);
+ void setBackgroundColor(const QColor& color);
//! updates layer set for overview
void setLayerSet(const QStringList& layerSet);
Modified: trunk/qgis/python/gui/qgsmaptool.sip
===================================================================
--- trunk/qgis/python/gui/qgsmaptool.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgsmaptool.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -57,7 +57,7 @@
/** Check whether this MapTool performs a zoom or pan operation.
* If it does, we will be able to perform the zoom and then
* resume operations with the original / previously used tool.*/
- virtual bool isZoomTool();
+ virtual bool isTransient();
/** Check whether this MapTool performs an edit operation.
* If it does, we will deactivate it when editing is turned off
@@ -76,19 +76,19 @@
QgsMapTool(QgsMapCanvas* canvas /TransferThis/);
//! transformation from screen coordinates to map coordinates
- QgsPoint toMapCoords(const QPoint& point);
+ QgsPoint toMapCoordinates(const QPoint& point);
//! transformation from screen coordinates to layer's coordinates
- QgsPoint toLayerCoords(QgsMapLayer* layer, const QPoint& point);
+ QgsPoint toLayerCoordinates(QgsMapLayer* layer, const QPoint& point);
//! trnasformation from map coordinates to layer's coordinates
- QgsPoint toLayerCoords(QgsMapLayer* layer, const QgsPoint& point);
+ QgsPoint toLayerCoordinates(QgsMapLayer* layer, const QgsPoint& point);
//! trnasformation of the rect from map coordinates to layer's coordinates
- QgsRect toLayerCoords(QgsMapLayer* layer, const QgsRect& rect);
+ QgsRect toLayerCoordinates(QgsMapLayer* layer, const QgsRect& rect);
//! transformation from map coordinates to screen coordinates
- QPoint toCanvasCoords(const QgsPoint& point);
+ QPoint toCanvasCoordinates(const QgsPoint& point);
};
Modified: trunk/qgis/python/gui/qgsmaptoolpan.sip
===================================================================
--- trunk/qgis/python/gui/qgsmaptoolpan.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgsmaptoolpan.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -18,7 +18,7 @@
//! Overridden mouse release event
virtual void canvasReleaseEvent(QMouseEvent * e);
- virtual bool isZoomTool();
+ virtual bool isTransient();
};
Modified: trunk/qgis/python/gui/qgsmaptoolzoom.sip
===================================================================
--- trunk/qgis/python/gui/qgsmaptoolzoom.sip 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/python/gui/qgsmaptoolzoom.sip 2008-08-31 18:28:22 UTC (rev 9233)
@@ -18,7 +18,7 @@
//! Overridden mouse release event
virtual void canvasReleaseEvent(QMouseEvent * e);
- virtual bool isZoomTool();
+ virtual bool isTransient();
};
Modified: trunk/qgis/src/app/legend/qgslegend.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/legend/qgslegend.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -511,7 +511,7 @@
// first layer?
if ( mMapCanvas->layerCount() == 1 )
- mMapCanvas->zoomFullExtent();
+ mMapCanvas->zoomToFullExtent();
setCurrentItem( llayer );
//make the QTreeWidget item up-to-date
doItemsLayout();
@@ -910,7 +910,7 @@
legendlayerfilenode.setAttribute( "visible", llf->isVisible() );
// show in overview flag
- legendlayerfilenode.setAttribute( "inOverview", llf->isInOverview() );
+ legendlayerfilenode.setAttribute( "isInOverview", llf->isInOverview() );
}
break;
@@ -1035,7 +1035,7 @@
// load layer's visibility and 'show in overview' flag
theLegendLayerFile->setVisible( atoi( childelem.attribute( "visible", "1" ).toUtf8() ) ); //Default is visible
- theLegendLayerFile->setInOverview( atoi( childelem.attribute( "inOverview" ).toUtf8() ) );
+ theLegendLayerFile->setInOverview( atoi( childelem.attribute( "isInOverview" ).toUtf8() ) );
// set the check state
blockSignals( true );
@@ -1399,7 +1399,7 @@
mMapCanvas->updateOverview();
}
-void QgsLegend::setOverviewAllLayers( bool inOverview )
+void QgsLegend::setOverviewAllLayers( bool isInOverview )
{
QTreeWidgetItem* theItem = firstItem();
while ( theItem )
@@ -1407,7 +1407,7 @@
QgsLegendLayerFile* llf = dynamic_cast<QgsLegendLayerFile*>( theItem );
if ( llf )
{
- llf->setInOverview( inOverview );
+ llf->setInOverview( isInOverview );
}
theItem = nextItem( theItem );
}
Modified: trunk/qgis/src/app/legend/qgslegend.h
===================================================================
--- trunk/qgis/src/app/legend/qgslegend.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/legend/qgslegend.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -154,7 +154,7 @@
void updateOverview();
/**Show/remove all layer in/from overview*/
- void setOverviewAllLayers( bool inOverview );
+ void setOverviewAllLayers( bool isInOverview );
/**Adds an entry to mPixmapWidthValues*/
void addPixmapWidthValue( int width );
Modified: trunk/qgis/src/app/legend/qgslegendlayerfile.cpp
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayerfile.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/legend/qgslegendlayerfile.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -102,7 +102,7 @@
{
QPixmap pix = legend()->pixmaps().mOriginalPixmap;
- if ( mLyr.inOverview() )
+ if ( mLyr.isInOverview() )
{
//add overview glasses to the pixmap
QPainter p( &pix );
@@ -130,12 +130,12 @@
}
-void QgsLegendLayerFile::setIconAppearance( bool inOverview,
+void QgsLegendLayerFile::setIconAppearance( bool isInOverview,
bool editable )
{
QPixmap newIcon( getOriginalPixmap() );
- if ( inOverview )
+ if ( isInOverview )
{
// Overlay the overview icon on the default icon
QPixmap myPixmap = QgisApp::getThemePixmap( "mIconOverview.png" );
@@ -189,14 +189,14 @@
return mLyr.isVisible();
}
-void QgsLegendLayerFile::setInOverview( bool inOverview )
+void QgsLegendLayerFile::setInOverview( bool isInOverview )
{
- mLyr.setInOverview( inOverview );
+ mLyr.setInOverview( isInOverview );
}
bool QgsLegendLayerFile::isInOverview()
{
- return mLyr.inOverview();
+ return mLyr.isInOverview();
}
void QgsLegendLayerFile::showInOverview()
@@ -333,7 +333,7 @@
QAction* showInOverviewAction = theMenu.addAction( tr( "&Show in overview" ), this, SLOT( showInOverview() ) );
showInOverviewAction->setCheckable( true );
showInOverviewAction->blockSignals( true );
- showInOverviewAction->setChecked( mLyr.inOverview() );
+ showInOverviewAction->setChecked( mLyr.isInOverview() );
showInOverviewAction->blockSignals( false );
// remove from canvas
Modified: trunk/qgis/src/app/legend/qgslegendlayerfile.h
===================================================================
--- trunk/qgis/src/app/legend/qgslegendlayerfile.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/legend/qgslegendlayerfile.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -46,7 +46,7 @@
QPixmap getOriginalPixmap() const;
- void setIconAppearance( bool inOverview, bool editable );
+ void setIconAppearance( bool isInOverview, bool editable );
/**Returns a label for a layer. Is static such that
the name can be passed to the constructor of QgsLegendLayerFile*/
@@ -55,7 +55,7 @@
void setVisible( bool visible = TRUE );
bool isVisible();
- void setInOverview( bool inOverview = TRUE );
+ void setInOverview( bool isInOverview = TRUE );
bool isInOverview();
/** called to add appropriate menu items to legend's popup menu */
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgisapp.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -728,7 +728,7 @@
mActionZoomLast = new QAction( getThemeIcon( "mActionZoomLast.png" ), tr( "Zoom Last" ), this );
//mActionZoomLast->setShortcut(tr("Ctrl+O","Zoom to Last Extent"));
mActionZoomLast->setStatusTip( tr( "Zoom to Last Extent" ) );
- connect( mActionZoomLast, SIGNAL( triggered() ), this, SLOT( zoomPrevious() ) );
+ connect( mActionZoomLast, SIGNAL( triggered() ), this, SLOT( zoomToPrevious() ) );
mActionZoomActualSize = new QAction( tr( "Zoom Actual Size" ), this );
mActionZoomActualSize->setStatusTip( tr( "Zoom to Actual Size" ) );
@@ -825,7 +825,7 @@
mActionAddToOverview = new QAction( getThemeIcon( "mActionInOverview.png" ), tr( "Add to Overview" ), this );
mActionAddToOverview->setShortcut( tr( "O", "Add current layer to overview map" ) );
mActionAddToOverview->setStatusTip( tr( "Add current layer to overview map" ) );
- connect( mActionAddToOverview, SIGNAL( triggered() ), this, SLOT( inOverview() ) );
+ connect( mActionAddToOverview, SIGNAL( triggered() ), this, SLOT( isInOverview() ) );
mActionAddToOverview->setEnabled( false );
mActionAddAllToOverview = new QAction( getThemeIcon( "mActionAddAllToOverview.png" ), tr( "Add All to Overview" ), this );
@@ -1596,7 +1596,7 @@
// moved here to set anti aliasing to both map canvas and overview
QSettings mySettings;
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing", false ).toBool() );
- mMapCanvas->useQImageToRender( mySettings.value( "/qgis/use_qimage_to_render", false ).toBool() );
+ mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render", false ).toBool() );
int action = mySettings.value( "/qgis/wheel_action", 0 ).toInt();
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();
@@ -3650,15 +3650,15 @@
void QgisApp::zoomFull()
{
- mMapCanvas->zoomFullExtent();
+ mMapCanvas->zoomToFullExtent();
// notify the project we've made a change
QgsProject::instance()->dirty( true );
}
-void QgisApp::zoomPrevious()
+void QgisApp::zoomToPrevious()
{
- mMapCanvas->zoomPreviousExtent();
+ mMapCanvas->zoomToPreviousExtent();
// notify the project we've made a change
QgsProject::instance()->dirty( true );
@@ -4078,7 +4078,7 @@
void QgisApp::userScale()
{
- double currentScale = mMapCanvas->getScale();
+ double currentScale = mMapCanvas->scale();
QStringList parts = mScaleEdit->text().split( ':' );
if ( parts.size() == 2 )
@@ -4096,7 +4096,7 @@
// toggle overview status
-void QgisApp::inOverview()
+void QgisApp::isInOverview()
{
mMapLegend->legendLayerShowInOverview();
}
@@ -4477,7 +4477,7 @@
QSettings mySettings;
mMapCanvas->enableAntiAliasing( mySettings.value( "/qgis/enable_anti_aliasing" ).toBool() );
- mMapCanvas->useQImageToRender( mySettings.value( "/qgis/use_qimage_to_render" ).toBool() );
+ mMapCanvas->useImageToRender( mySettings.value( "/qgis/use_qimage_to_render" ).toBool() );
int action = mySettings.value( "/qgis/wheel_action", 0 ).toInt();
double zoomFactor = mySettings.value( "/qgis/zoom_factor", 2 ).toDouble();
Modified: trunk/qgis/src/app/qgisapp.h
===================================================================
--- trunk/qgis/src/app/qgisapp.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgisapp.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -312,7 +312,7 @@
//! Zoom to full extent
void zoomFull();
//! Zoom to the previous extent
- void zoomPrevious();
+ void zoomToPrevious();
//! Zoom to selected features
void zoomToSelected();
@@ -358,7 +358,7 @@
void addDatabaseLayer();
//#endif
/** toggles whether the current selected layer is in overview or not */
- void inOverview();
+ void isInOverview();
//! Slot to show the map coordinate position of the mouse cursor
void showMouseCoordinate( QgsPoint & );
//! Slot to show current map scale;
Modified: trunk/qgis/src/app/qgisappinterface.cpp
===================================================================
--- trunk/qgis/src/app/qgisappinterface.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgisappinterface.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -47,9 +47,9 @@
qgis->zoomFull();
}
-void QgisAppInterface::zoomPrevious()
+void QgisAppInterface::zoomToPrevious()
{
- qgis->zoomPrevious();
+ qgis->zoomToPrevious();
}
void QgisAppInterface::zoomActiveLayer()
Modified: trunk/qgis/src/app/qgisappinterface.h
===================================================================
--- trunk/qgis/src/app/qgisappinterface.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgisappinterface.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -46,7 +46,7 @@
//! Zoom map to full extent
void zoomFull();
//! Zoom map to previous extent
- void zoomPrevious();
+ void zoomToPrevious();
//! Zoom to active layer
void zoomActiveLayer();
Modified: trunk/qgis/src/app/qgsmaptooladdfeature.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptooladdfeature.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptooladdfeature.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -103,7 +103,7 @@
idPoint = snapPointFromResults( snapResults, e->pos() );
try
{
- savePoint = toLayerCoords( vlayer, idPoint );
+ savePoint = toLayerCoordinates( vlayer, idPoint );
QgsDebugMsg( "savePoint = " + savePoint.toString() );
}
catch ( QgsCsException &cse )
Modified: trunk/qgis/src/app/qgsmaptooladdvertex.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptooladdvertex.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptooladdvertex.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -92,7 +92,7 @@
if ( mSnapper.snapToBackgroundLayers( e->pos(), snapResults ) == 0 )
{
snappedPointMapCoord = snapPointFromResults( snapResults, e->pos() );
- snappedPointLayerCoord = toLayerCoords( vlayer, snappedPointMapCoord );
+ snappedPointLayerCoord = toLayerCoordinates( vlayer, snappedPointMapCoord );
//and change the feature points
QList<QgsSnappingResult>::iterator sr_it = mRecentSnappingResults.begin();
Modified: trunk/qgis/src/app/qgsmaptoolcapture.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolcapture.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptoolcapture.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -102,7 +102,7 @@
QgsPoint digitisedPoint;
try
{
- digitisedPoint = toLayerCoords( vlayer, p );
+ digitisedPoint = toLayerCoordinates( vlayer, p );
}
catch ( QgsCsException &cse )
{
@@ -119,7 +119,7 @@
mapPoint = snapPointFromResults( snapResults, p );
try
{
- layerPoint = toLayerCoords( vlayer, mapPoint ); //transform snapped point back to layer crs
+ layerPoint = toLayerCoordinates( vlayer, mapPoint ); //transform snapped point back to layer crs
}
catch ( QgsCsException &cse )
{
Modified: trunk/qgis/src/app/qgsmaptooledit.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptooledit.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptooledit.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -47,7 +47,7 @@
QList<QgsSnappingResult>::iterator it = transformedSnapResults.begin();
for ( ; it != transformedSnapResults.constEnd(); ++it )
{
- QgsPoint layerPoint = toLayerCoords( editedLayer, it->snappedVertex );
+ QgsPoint layerPoint = toLayerCoordinates( editedLayer, it->snappedVertex );
it->snappedVertex = layerPoint;
}
@@ -58,7 +58,7 @@
{
if ( snapResults.size() < 1 )
{
- return toMapCoords( screenCoords );
+ return toMapCoordinates( screenCoords );
}
else
{
Modified: trunk/qgis/src/app/qgsmaptoolidentify.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolidentify.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptoolidentify.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -246,7 +246,7 @@
r.setYMinimum( point.y() - searchRadius );
r.setYMaximum( point.y() + searchRadius );
- r = toLayerCoords( layer, r );
+ r = toLayerCoordinates( layer, r );
int featureCount = 0;
//QgsFeature feat;
Modified: trunk/qgis/src/app/qgsmaptoolmovefeature.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolmovefeature.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptoolmovefeature.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -39,7 +39,7 @@
{
if ( mRubberBand )
{
- QgsPoint pointCanvasCoords = toMapCoords( e->pos() );
+ QgsPoint pointCanvasCoords = toMapCoordinates( e->pos() );
double offsetX = pointCanvasCoords.x() - mStartPointMapCoords.x();
double offsetY = pointCanvasCoords.y() - mStartPointMapCoords.y();
mRubberBand->setTranslationOffset( offsetX, offsetY );
@@ -69,7 +69,7 @@
}
//find first geometry under mouse cursor and store iterator to it
- QgsPoint layerCoords = toLayerCoords(( QgsMapLayer* )vlayer, e->pos() );
+ QgsPoint layerCoords = toLayerCoordinates(( QgsMapLayer* )vlayer, e->pos() );
QSettings settings;
double searchRadius = settings.value( "/qgis/digitizing/search_radius_vertex_edit", 10 ).toDouble();
QgsRect selectRect( layerCoords.x() - searchRadius, layerCoords.y() - searchRadius,
@@ -106,7 +106,7 @@
return;
}
- mStartPointMapCoords = toMapCoords( e->pos() );
+ mStartPointMapCoords = toMapCoordinates( e->pos() );
mMovedFeature = cf.featureId(); //todo: take the closest feature, not the first one...
mRubberBand = createRubberBand();
mRubberBand->setToGeometry( cf.geometry(), *vlayer );
@@ -131,8 +131,8 @@
return;
}
- QgsPoint startPointLayerCoords = toLayerCoords(( QgsMapLayer* )vlayer, mStartPointMapCoords );
- QgsPoint stopPointLayerCoords = toLayerCoords(( QgsMapLayer* )vlayer, e->pos() );
+ QgsPoint startPointLayerCoords = toLayerCoordinates(( QgsMapLayer* )vlayer, mStartPointMapCoords );
+ QgsPoint stopPointLayerCoords = toLayerCoordinates(( QgsMapLayer* )vlayer, e->pos() );
double dx = stopPointLayerCoords.x() - startPointLayerCoords.x();
double dy = stopPointLayerCoords.y() - startPointLayerCoords.y();
Modified: trunk/qgis/src/app/qgsmaptoolmovevertex.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolmovevertex.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptoolmovevertex.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -162,7 +162,7 @@
snappedPointMapCoord = snapPointFromResults( snapResults, e->pos() );
- snappedPointLayerCoord = toLayerCoords( vlayer, snappedPointMapCoord );
+ snappedPointLayerCoord = toLayerCoordinates( vlayer, snappedPointMapCoord );
//and change the feature points
QList<QgsSnappingResult>::iterator sr_it = mRecentSnappingResults.begin();
Modified: trunk/qgis/src/app/qgsmaptoolselect.cpp
===================================================================
--- trunk/qgis/src/app/qgsmaptoolselect.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/app/qgsmaptoolselect.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -92,7 +92,7 @@
bool lock = ( e->modifiers() & Qt::ControlModifier );
QgsVectorLayer* vlayer = dynamic_cast<QgsVectorLayer*>( mCanvas->currentLayer() );
- search = toLayerCoords( vlayer, search );
+ search = toLayerCoordinates( vlayer, search );
QApplication::setOverrideCursor( Qt::WaitCursor );
vlayer->select( search, lock );
Modified: trunk/qgis/src/core/qgsprojectfiletransform.cpp
===================================================================
--- trunk/qgis/src/core/qgsprojectfiletransform.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/core/qgsprojectfiletransform.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -171,7 +171,7 @@
legendLayerFile.setAttribute( "visible", mapLayer.attribute( "visible" ) );
// Set overview flag from maplayer to legendlayer
- legendLayerFile.setAttribute( "inOverview", mapLayer.attribute( "showInOverviewFlag" ) );
+ legendLayerFile.setAttribute( "isInOverview", mapLayer.attribute( "showInOverviewFlag" ) );
}
}
}
Modified: trunk/qgis/src/gui/qgisinterface.h
===================================================================
--- trunk/qgis/src/gui/qgisinterface.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgisinterface.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -64,7 +64,7 @@
//! Zoom to full extent of map layers
virtual void zoomFull() = 0;
//! Zoom to previous view extent
- virtual void zoomPrevious() = 0;
+ virtual void zoomToPrevious() = 0;
//! Zoome to extent of the active layer
virtual void zoomActiveLayer() = 0;
Modified: trunk/qgis/src/gui/qgsmapcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmapcanvas.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -157,9 +157,9 @@
mMapOverview->enableAntiAliasing( theFlag );
} // anti aliasing
-void QgsMapCanvas::useQImageToRender( bool theFlag )
+void QgsMapCanvas::useImageToRender( bool theFlag )
{
- mMap->useQImageToRender( theFlag );
+ mMap->useImageToRender( theFlag );
}
QgsMapCanvasMap* QgsMapCanvas::map()
@@ -188,10 +188,10 @@
mCurrentLayer = layer;
}
-double QgsMapCanvas::getScale()
+double QgsMapCanvas::scale()
{
return mMapRenderer->scale();
-} // getScale
+} // scale
void QgsMapCanvas::setDirty( bool dirty )
{
@@ -236,7 +236,7 @@
{
layerSet.push_back( lyr.layer()->getLayerID() );
}
- if ( lyr.inOverview() )
+ if ( lyr.isInOverview() )
{
layerSetOverview.push_back( lyr.layer()->getLayerID() );
}
@@ -467,7 +467,7 @@
mLastExtent = current;
// notify canvas items of change
- updateCanvasItemsPositions();
+ updateCanvasItemPositions();
} // setExtent
@@ -489,7 +489,7 @@
-void QgsMapCanvas::zoomFullExtent()
+void QgsMapCanvas::zoomToFullExtent()
{
if ( mDrawing )
{
@@ -506,11 +506,11 @@
}
refresh();
-} // zoomFullExtent
+} // zoomToFullExtent
-void QgsMapCanvas::zoomPreviousExtent()
+void QgsMapCanvas::zoomToPreviousExtent()
{
if ( mDrawing )
{
@@ -521,7 +521,7 @@
setExtent( mLastExtent );
mLastExtent = current;
refresh();
-} // zoomPreviousExtent
+} // zoomToPreviousExtent
bool QgsMapCanvas::projectionsEnabled()
@@ -757,7 +757,7 @@
if ( mMapTool )
{
// right button was pressed in zoom tool? return to previous non zoom tool
- if ( e->button() == Qt::RightButton && mMapTool->isZoomTool() )
+ if ( e->button() == Qt::RightButton && mMapTool->isTransient() )
{
QgsDebugMsg( "Right click in map tool zoom or pan, last tool is " +
QString( mLastNonZoomMapTool ? "not null." : "null." ) );
@@ -816,7 +816,7 @@
mScene->setSceneRect( QRectF( 0, 0, width, height ) );
// notify canvas items of change
- updateCanvasItemsPositions();
+ updateCanvasItemPositions();
updateScale();
refresh();
@@ -825,7 +825,7 @@
} // resizeEvent
-void QgsMapCanvas::updateCanvasItemsPositions()
+void QgsMapCanvas::updateCanvasItemPositions()
{
QList<QGraphicsItem*> list = mScene->items();
QList<QGraphicsItem*>::iterator it = list.begin();
@@ -959,7 +959,7 @@
if ( mMapTool )
mMapTool->deactivate();
- if ( tool->isZoomTool() && mMapTool && !mMapTool->isZoomTool() )
+ if ( tool->isTransient() && mMapTool && !mMapTool->isTransient() )
{
// if zoom or pan tool will be active, save old tool
// to bring it back on right click
@@ -1012,7 +1012,7 @@
// background of QGraphicsScene
mScene->setBackgroundBrush( bgBrush );
-} // setbgColor
+} // setBackgroundColor
QColor QgsMapCanvas::canvasColor() const
{
@@ -1200,7 +1200,7 @@
}
// show items
- updateCanvasItemsPositions();
+ updateCanvasItemPositions();
}
Modified: trunk/qgis/src/gui/qgsmapcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvas.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmapcanvas.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -63,14 +63,14 @@
class GUI_EXPORT QgsMapCanvasLayer
{
public:
- QgsMapCanvasLayer( QgsMapLayer* layer, bool visible = TRUE, bool inOverview = FALSE )
- : mLayer( layer ), mVisible( visible ), mInOverview( inOverview ) {}
+ QgsMapCanvasLayer( QgsMapLayer* layer, bool visible = TRUE, bool isInOverview = FALSE )
+ : mLayer( layer ), mVisible( visible ), mInOverview( isInOverview ) {}
void setVisible( bool visible ) { mVisible = visible; }
- void setInOverview( bool inOverview ) { mInOverview = inOverview; }
+ void setInOverview( bool isInOverview ) { mInOverview = isInOverview; }
bool isVisible() const { return mVisible; }
- bool inOverview() const { return mInOverview; }
+ bool isInOverview() const { return mInOverview; }
QgsMapLayer* layer() { return mLayer; }
const QgsMapLayer* layer() const { return mLayer; }
@@ -121,7 +121,7 @@
QPixmap& canvasPixmap();
//! Get the last reported scale of the canvas
- double getScale();
+ double scale();
//! Clear the map canvas
void clear();
@@ -138,10 +138,10 @@
void setExtent( QgsRect const & r );
//! Zoom to the full extent of all layers
- void zoomFullExtent();
+ void zoomToFullExtent();
//! Zoom to the previous extent (view)
- void zoomPreviousExtent();
+ void zoomToPreviousExtent();
/**Zooms to the extend of the selected features*/
void zoomToSelected();
@@ -221,7 +221,7 @@
void enableAntiAliasing( bool theFlag );
//! Select which Qt class to render with
- void useQImageToRender( bool theFlag );
+ void useImageToRender( bool theFlag );
// following 2 methods should be moved elsewhere or changed to private
// currently used by pan map tool
@@ -333,7 +333,7 @@
void moveCanvasContents( bool reset = FALSE );
//! called on resize or changed extent to notify canvas items to change their rectangle
- void updateCanvasItemsPositions();
+ void updateCanvasItemPositions();
/// implementation struct
class CanvasProperties;
Modified: trunk/qgis/src/gui/qgsmapcanvasitem.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvasitem.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmapcanvasitem.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -43,13 +43,13 @@
paint( painter ); // call the derived item's drawing routines
}
-QgsPoint QgsMapCanvasItem::toMapCoords( const QPoint& point )
+QgsPoint QgsMapCanvasItem::toMapCoordinates( const QPoint& point )
{
return mMapCanvas->getCoordinateTransform()->toMapCoordinates( point - mPanningOffset );
}
-QPointF QgsMapCanvasItem::toCanvasCoords( const QgsPoint& point )
+QPointF QgsMapCanvasItem::toCanvasCoordinates( const QgsPoint& point )
{
double x = point.x(), y = point.y();
mMapCanvas->getCoordinateTransform()->transformInPlace( x, y );
@@ -71,8 +71,8 @@
QRectF r; // empty rect by default
if ( !mRect.isEmpty() )
{
- r.setTopLeft( toCanvasCoords( QgsPoint( mRect.xMin(), mRect.yMin() ) ) );
- r.setBottomRight( toCanvasCoords( QgsPoint( mRect.xMax(), mRect.yMax() ) ) );
+ r.setTopLeft( toCanvasCoordinates( QgsPoint( mRect.xMin(), mRect.yMin() ) ) );
+ r.setBottomRight( toCanvasCoordinates( QgsPoint( mRect.xMax(), mRect.yMax() ) ) );
r = r.normalized();
}
Modified: trunk/qgis/src/gui/qgsmapcanvasitem.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvasitem.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmapcanvasitem.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -66,10 +66,10 @@
void setRect( const QgsRect& r );
//! transformation from screen coordinates to map coordinates
- QgsPoint toMapCoords( const QPoint& point );
+ QgsPoint toMapCoordinates( const QPoint& point );
//! transformation from map coordinates to screen coordinates
- QPointF toCanvasCoords( const QgsPoint& point );
+ QPointF toCanvasCoordinates( const QgsPoint& point );
protected:
Modified: trunk/qgis/src/gui/qgsmapcanvasmap.h
===================================================================
--- trunk/qgis/src/gui/qgsmapcanvasmap.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmapcanvasmap.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -39,7 +39,7 @@
void enableAntiAliasing( bool flag ) { mAntiAliasing = flag; }
- void useQImageToRender( bool flag ) { mUseQImageToRender = flag; }
+ void useImageToRender( bool flag ) { mUseQImageToRender = flag; }
//! renders map using QgsMapRenderer to mPixmap
void render();
Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -74,7 +74,7 @@
mMapRenderer = new QgsMapRenderer;
mMapRenderer->setOverview();
- setbgColor( palette().window().color() );
+ setBackgroundColor( palette().window().color() );
}
QgsMapOverviewCanvas::~QgsMapOverviewCanvas()
@@ -251,7 +251,7 @@
}
-void QgsMapOverviewCanvas::setbgColor( const QColor& color )
+void QgsMapOverviewCanvas::setBackgroundColor( const QColor& color )
{
mBgColor = color;
Modified: trunk/qgis/src/gui/qgsmapoverviewcanvas.h
===================================================================
--- trunk/qgis/src/gui/qgsmapoverviewcanvas.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmapoverviewcanvas.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -51,7 +51,7 @@
void refresh();
//! changes background color
- void setbgColor( const QColor& color );
+ void setBackgroundColor( const QColor& color );
//! updates layer set for overview
void setLayerSet( const QStringList& layerSet );
Modified: trunk/qgis/src/gui/qgsmaptool.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmaptool.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmaptool.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -34,34 +34,34 @@
}
-QgsPoint QgsMapTool::toMapCoords( const QPoint& point )
+QgsPoint QgsMapTool::toMapCoordinates( const QPoint& point )
{
return mCanvas->getCoordinateTransform()->toMapCoordinates( point );
}
-QgsPoint QgsMapTool::toLayerCoords( QgsMapLayer* layer, const QPoint& point )
+QgsPoint QgsMapTool::toLayerCoordinates( QgsMapLayer* layer, const QPoint& point )
{
- QgsPoint pt = toMapCoords( point );
- return toLayerCoords( layer, pt );
+ QgsPoint pt = toMapCoordinates( point );
+ return toLayerCoordinates( layer, pt );
}
-QgsPoint QgsMapTool::toLayerCoords( QgsMapLayer* layer, const QgsPoint& point )
+QgsPoint QgsMapTool::toLayerCoordinates( QgsMapLayer* layer, const QgsPoint& point )
{
return mCanvas->mapRenderer()->mapToLayerCoordinates( layer, point );
}
-QgsPoint QgsMapTool::toMapCoords( QgsMapLayer* layer, const QgsPoint& point )
+QgsPoint QgsMapTool::toMapCoordinates( QgsMapLayer* layer, const QgsPoint& point )
{
return mCanvas->mapRenderer()->layerToMapCoordinates( layer, point );
}
-QgsRect QgsMapTool::toLayerCoords( QgsMapLayer* layer, const QgsRect& rect )
+QgsRect QgsMapTool::toLayerCoordinates( QgsMapLayer* layer, const QgsRect& rect )
{
return mCanvas->mapRenderer()->mapToLayerCoordinates( layer, rect );
}
-QPoint QgsMapTool::toCanvasCoords( const QgsPoint& point )
+QPoint QgsMapTool::toCanvasCoordinates( const QgsPoint& point )
{
double x = point.x(), y = point.y();
mCanvas->getCoordinateTransform()->transformInPlace( x, y );
@@ -136,7 +136,7 @@
{
}
-bool QgsMapTool::isZoomTool()
+bool QgsMapTool::isTransient()
{
return false;
}
Modified: trunk/qgis/src/gui/qgsmaptool.h
===================================================================
--- trunk/qgis/src/gui/qgsmaptool.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmaptool.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -83,7 +83,7 @@
/** Check whether this MapTool performs a zoom or pan operation.
* If it does, we will be able to perform the zoom and then
* resume operations with the original / previously used tool.*/
- virtual bool isZoomTool();
+ virtual bool isTransient();
/** Check whether this MapTool performs an edit operation.
* If it does, we will deactivate it when editing is turned off
@@ -105,22 +105,22 @@
QgsMapTool( QgsMapCanvas* canvas );
//! transformation from screen coordinates to map coordinates
- QgsPoint toMapCoords( const QPoint& point );
+ QgsPoint toMapCoordinates( const QPoint& point );
//! transformation from screen coordinates to layer's coordinates
- QgsPoint toLayerCoords( QgsMapLayer* layer, const QPoint& point );
+ QgsPoint toLayerCoordinates( QgsMapLayer* layer, const QPoint& point );
//! trasformation from map coordinates to layer's coordinates
- QgsPoint toLayerCoords( QgsMapLayer* layer, const QgsPoint& point );
+ QgsPoint toLayerCoordinates( QgsMapLayer* layer, const QgsPoint& point );
//!transformation from layer's coordinates to map coordinates (which is different in case reprojection is used)
- QgsPoint toMapCoords( QgsMapLayer* layer, const QgsPoint& point );
+ QgsPoint toMapCoordinates( QgsMapLayer* layer, const QgsPoint& point );
//! trnasformation of the rect from map coordinates to layer's coordinates
- QgsRect toLayerCoords( QgsMapLayer* layer, const QgsRect& rect );
+ QgsRect toLayerCoordinates( QgsMapLayer* layer, const QgsRect& rect );
//! transformation from map coordinates to screen coordinates
- QPoint toCanvasCoords( const QgsPoint& point );
+ QPoint toCanvasCoordinates( const QgsPoint& point );
//! pointer to map canvas
QgsMapCanvas* mCanvas;
Modified: trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp
===================================================================
--- trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmaptoolemitpoint.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -31,7 +31,7 @@
void QgsMapToolEmitPoint::canvasPressEvent( QMouseEvent * e )
{
- QgsPoint pnt = toMapCoords( e->pos() );
+ QgsPoint pnt = toMapCoordinates( e->pos() );
emit gotPoint( pnt, e->button() );
}
Modified: trunk/qgis/src/gui/qgsmaptoolpan.h
===================================================================
--- trunk/qgis/src/gui/qgsmaptoolpan.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmaptoolpan.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -40,7 +40,7 @@
//! Overridden mouse release event
virtual void canvasReleaseEvent( QMouseEvent * e );
- virtual bool isZoomTool() { return true; }
+ virtual bool isTransient() { return true; }
private:
Modified: trunk/qgis/src/gui/qgsmaptoolzoom.h
===================================================================
--- trunk/qgis/src/gui/qgsmaptoolzoom.h 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsmaptoolzoom.h 2008-08-31 18:28:22 UTC (rev 9233)
@@ -42,7 +42,7 @@
//! Overridden mouse release event
virtual void canvasReleaseEvent( QMouseEvent * e );
- virtual bool isZoomTool() { return true; }
+ virtual bool isTransient() { return true; }
protected:
//! stores actual zoom rect
Modified: trunk/qgis/src/gui/qgsrubberband.cpp
===================================================================
--- trunk/qgis/src/gui/qgsrubberband.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsrubberband.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -294,7 +294,7 @@
for ( ; it != mPoints.at( i ).constEnd(); ++it )
{
//QgsDebugMsg("Drawing rubberband vertex: " + QString::number(it->x() + mTranslationOffsetX) + "//" + QString::number(it->y() + mTranslationOffsetY));
- pts.append( toCanvasCoords( QgsPoint( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY ) ) - pos() );
+ pts.append( toCanvasCoordinates( QgsPoint( it->x() + mTranslationOffsetX, it->y() + mTranslationOffsetY ) ) - pos() );
}
if ( mIsPolygon )
Modified: trunk/qgis/src/gui/qgsvertexmarker.cpp
===================================================================
--- trunk/qgis/src/gui/qgsvertexmarker.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/gui/qgsvertexmarker.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -41,7 +41,7 @@
void QgsVertexMarker::setCenter( const QgsPoint& point )
{
mCenter = point;
- QPointF pt = toCanvasCoords( mCenter );
+ QPointF pt = toCanvasCoordinates( mCenter );
setPos( pt );
}
Modified: trunk/qgis/src/plugins/georeferencer/qgsgeorefdatapoint.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgsgeorefdatapoint.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/plugins/georeferencer/qgsgeorefdatapoint.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -48,5 +48,5 @@
void QgsGeorefDataPoint::updatePosition()
{
- setPos( toCanvasCoords( mPixelCoords ) );
+ setPos( toCanvasCoordinates( mPixelCoords ) );
}
Modified: trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp
===================================================================
--- trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/plugins/georeferencer/qgspointdialog.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -47,7 +47,7 @@
//! Mouse press event for overriding
virtual void canvasPressEvent( QMouseEvent * e )
{
- QgsPoint pnt = toMapCoords( e->pos() );
+ QgsPoint pnt = toMapCoordinates( e->pos() );
if ( mAddPoint )
mDlg->showCoordDialog( pnt );
Modified: trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/plugins/grass/qgsgrassedittools.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -40,7 +40,7 @@
void QgsGrassEditTool::canvasPressEvent( QMouseEvent * event )
{
- QgsPoint point = toLayerCoords( e->layer(), event->pos() );
+ QgsPoint point = toLayerCoordinates( e->layer(), event->pos() );
mouseClick( point, event->button() );
// Set last click
@@ -53,7 +53,7 @@
void QgsGrassEditTool::canvasMoveEvent( QMouseEvent * event )
{
- QgsPoint point = toLayerCoords( e->layer(), event->pos() );
+ QgsPoint point = toLayerCoordinates( e->layer(), event->pos() );
mouseMove( point );
e->statusBar()->message( e->mCanvasPrompt );
@@ -147,7 +147,7 @@
{
Vect_reset_line( e->mPoints );
Vect_append_points( e->mPoints, e->mEditPoints, GV_FORWARD );
- QgsPoint point = toMapCoords( e->mCanvas->mouseLastXY() );
+ QgsPoint point = toMapCoordinates( e->mCanvas->mouseLastXY() );
Vect_append_point( e->mPoints, point.x(), point.y(), 0.0 );
e->displayDynamic( e->mPoints );
}
@@ -181,7 +181,7 @@
e->mEditPoints->n_points--;
Vect_reset_line( e->mPoints );
Vect_append_points( e->mPoints, e->mEditPoints, GV_FORWARD );
- QgsPoint point = toMapCoords( e->mCanvas->mouseLastXY() );
+ QgsPoint point = toMapCoordinates( e->mCanvas->mouseLastXY() );
Vect_append_point( e->mPoints, point.x(), point.y(), 0.0 );
e->displayDynamic( e->mPoints );
}
Modified: trunk/qgis/src/plugins/grass/qgsgrassregion.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/plugins/grass/qgsgrassregion.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -81,7 +81,7 @@
//! mouse click in map canvas
void canvasPressEvent( QMouseEvent * event )
{
- QgsPoint point = toMapCoords( event->pos() );
+ QgsPoint point = toMapCoordinates( event->pos() );
double x = point.x();
double y = point.y();
@@ -106,7 +106,7 @@
//! mouse movement in map canvas
void canvasMoveEvent( QMouseEvent * event )
{
- QgsPoint point = toMapCoords( event->pos() );
+ QgsPoint point = toMapCoordinates( event->pos() );
QgsDebugMsg( "entered." );
@@ -124,8 +124,8 @@
void setRegion( const QgsPoint& ul, const QgsPoint& lr )
{
- QPoint qul = toCanvasCoords( ul );
- QPoint qlr = toCanvasCoords( lr );
+ QPoint qul = toCanvasCoordinates( ul );
+ QPoint qlr = toCanvasCoordinates( lr );
mRubberBand->setGeometry( QRect( qul, qlr ) );
}
Modified: trunk/qgis/src/plugins/maplayer/maplayertest.cpp
===================================================================
--- trunk/qgis/src/plugins/maplayer/maplayertest.cpp 2008-08-31 18:06:54 UTC (rev 9232)
+++ trunk/qgis/src/plugins/maplayer/maplayertest.cpp 2008-08-31 18:28:22 UTC (rev 9233)
@@ -43,8 +43,8 @@
menuId = menu->insertItem( "&PluginMenu", mapLayerPluginMenu );
#if 0
- QAction *zoomPreviousAction = new QAction( "Zoom Previous", QIconSet( icon_matrix ), "&Zoom Previous", CTRL + Key_S, qgisMainWindow, "zoomFull" );
- connect( zoomPreviousAction, SIGNAL( triggered() ), this, SLOT( zoomPrevious() ) );
+ QAction *zoomToPreviousAction = new QAction( "Zoom Previous", QIconSet( icon_matrix ), "&Zoom Previous", CTRL + Key_S, qgisMainWindow, "zoomFull" );
+ connect( zoomToPreviousAction, SIGNAL( triggered() ), this, SLOT( zoomToPrevious() ) );
#endif
}
void MapLayerTest::unload()
More information about the QGIS-commit
mailing list