Skip to content

Commit dfcacb6

Browse files
author
ersts
committed
-Propogated updates for QgsRect setYMin/setYMax
git-svn-id: http://svn.osgeo.org/qgis/trunk@9177 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6e8b4a2 commit dfcacb6

16 files changed

+53
-53
lines changed

python/core/qgsrect.sip

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class QgsRect
3131
//! Set the maximum x value
3232
void setXMaximum(double x);
3333
//! Set the maximum y value
34-
void setYmin(double y);
34+
void setYMinimum(double y);
3535
//! Set the maximum y value
36-
void setYmax(double y);
36+
void setYMaximum(double y);
3737
//! Set a rectangle so that min corner is at max
3838
// and max corner is at min. It is NOT normalized.
3939
void setMinimal();

src/app/qgsmaptoolidentify.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,8 @@ void QgsMapToolIdentify::identifyVectorLayer( const QgsPoint& point )
244244
QgsRect r;
245245
r.setXMinimum( point.x() - searchRadius );
246246
r.setXMaximum( point.x() + searchRadius );
247-
r.setYmin( point.y() - searchRadius );
248-
r.setYmax( point.y() + searchRadius );
247+
r.setYMinimum( point.y() - searchRadius );
248+
r.setYMaximum( point.y() + searchRadius );
249249

250250
r = toLayerCoords( layer, r );
251251

src/core/composer/qgscomposermap.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ void QgsComposerMap::moveContent( double dx, double dy )
263263

264264
mExtent.setXMinimum( mExtent.xMin() + xMoveMapCoord );
265265
mExtent.setXMaximum( mExtent.xMax() + xMoveMapCoord );
266-
mExtent.setYmin( mExtent.yMin() + yMoveMapCoord );
267-
mExtent.setYmax( mExtent.yMax() + yMoveMapCoord );
266+
mExtent.setYMinimum( mExtent.yMin() + yMoveMapCoord );
267+
mExtent.setYMaximum( mExtent.yMax() + yMoveMapCoord );
268268
emit extentChanged();
269269
cache();
270270
update();

src/core/qgsmaprenderer.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ void QgsMapRenderer::adjustExtentToSize()
182182
// update extent
183183
mExtent.setXMinimum( dxmin );
184184
mExtent.setXMaximum( dxmax );
185-
mExtent.setYmin( dymin );
186-
mExtent.setYmax( dymax );
185+
mExtent.setYMinimum( dymin );
186+
mExtent.setYMaximum( dymax );
187187

188188
// update the scale
189189
updateScale();
@@ -326,7 +326,7 @@ void QgsMapRenderer::render( QPainter* painter )
326326
bk_mapToPixel = mRenderContext.mapToPixel();
327327
rasterMapToPixel = mRenderContext.mapToPixel();
328328
rasterMapToPixel.setMapUnitsPerPixel( mRenderContext.mapToPixel().mapUnitsPerPixel() / rasterScaleFactor );
329-
rasterMapToPixel.setYmax( mSize.height() * rasterScaleFactor );
329+
rasterMapToPixel.setYMaximum( mSize.height() * rasterScaleFactor );
330330
mRenderContext.setMapToPixel( rasterMapToPixel );
331331
mRenderContext.painter()->save();
332332
mRenderContext.painter()->scale( 1.0 / rasterScaleFactor, 1.0 / rasterScaleFactor );
@@ -754,15 +754,15 @@ bool QgsMapRenderer::readXML( QDomNode & theNode )
754754

755755
exElement = yminNode.toElement();
756756
double ymin = exElement.text().toDouble();
757-
aoi.setYmin( ymin );
757+
aoi.setYMinimum( ymin );
758758

759759
exElement = xmaxNode.toElement();
760760
double xmax = exElement.text().toDouble();
761761
aoi.setXMaximum( xmax );
762762

763763
exElement = ymaxNode.toElement();
764764
double ymax = exElement.text().toDouble();
765-
aoi.setYmax( ymax );
765+
aoi.setYMaximum( ymax );
766766

767767
setExtent( aoi );
768768

src/core/qgsmaptopixel.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ double QgsMapToPixel::mapUnitsPerPixel() const
6464
return mMapUnitsPerPixel;
6565
}
6666

67-
void QgsMapToPixel::setYmax( double ymax )
67+
void QgsMapToPixel::setYMaximum( double ymax )
6868
{
6969
yMax = ymax;
7070
}
7171

72-
void QgsMapToPixel::setYmin( double ymin )
72+
void QgsMapToPixel::setYMinimum( double ymin )
7373
{
7474
yMin = ymin;
7575
}

src/core/qgsmaptopixel.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ class CORE_EXPORT QgsMapToPixel
9191
double mapUnitsPerPixel() const;
9292

9393
//! Set maximum y value
94-
void setYmax( double ymax );
94+
void setYMaximum( double ymax );
9595
//! Set minimum y value
96-
void setYmin( double ymin );
96+
void setYMinimum( double ymin );
9797
//! set minimum x value
9898
void setXMinimum( double xmin );
9999
/*! Set parameters for use in tranfsorming coordinates

src/core/qgsrect.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,12 @@ inline void QgsRect::setXMaximum( double x )
145145
xmax = x;
146146
}
147147

148-
inline void QgsRect::setYmin( double y )
148+
inline void QgsRect::setYMinimum( double y )
149149
{
150150
ymin = y;
151151
}
152152

153-
inline void QgsRect::setYmax( double y )
153+
inline void QgsRect::setYMaximum( double y )
154154
{
155155
ymax = y;
156156
}

src/core/qgsvectorlayer.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -1535,8 +1535,8 @@ int QgsVectorLayer::addRing( const QList<QgsPoint>& ring )
15351535

15361536
if ( boundingBoxFromPointList( ring, xMin, yMin, xMax, yMax ) == 0 )
15371537
{
1538-
bBox.setXMinimum( xMin ); bBox.setYmin( yMin );
1539-
bBox.setXMaximum( xMax ); bBox.setYmax( yMax );
1538+
bBox.setXMinimum( xMin ); bBox.setYMinimum( yMin );
1539+
bBox.setXMaximum( xMax ); bBox.setYMaximum( yMax );
15401540
}
15411541
else
15421542
{
@@ -1661,8 +1661,8 @@ int QgsVectorLayer::splitFeatures( const QList<QgsPoint>& splitLine, bool topolo
16611661
{
16621662
if ( boundingBoxFromPointList( splitLine, xMin, yMin, xMax, yMax ) == 0 )
16631663
{
1664-
bBox.setXMinimum( xMin ); bBox.setYmin( yMin );
1665-
bBox.setXMaximum( xMax ); bBox.setYmax( yMax );
1664+
bBox.setXMinimum( xMin ); bBox.setYMinimum( yMin );
1665+
bBox.setXMaximum( xMax ); bBox.setYMaximum( yMax );
16661666
}
16671667
else
16681668
{
@@ -1679,8 +1679,8 @@ int QgsVectorLayer::splitFeatures( const QList<QgsPoint>& splitLine, bool topolo
16791679
}
16801680
else if ( bBox.height() == 0.0 && bBox.width() > 0 )
16811681
{
1682-
bBox.setYmin( bBox.yMin() - bBox.width() / 2 );
1683-
bBox.setYmax( bBox.yMax() + bBox.width() / 2 );
1682+
bBox.setYMinimum( bBox.yMin() - bBox.width() / 2 );
1683+
bBox.setYMaximum( bBox.yMax() + bBox.width() / 2 );
16841684
}
16851685
else
16861686
{
@@ -2176,8 +2176,8 @@ bool QgsVectorLayer::setDataProvider( QString const & provider )
21762176
// store the extent
21772177
mLayerExtent.setXMaximum( mbr.xMax() );
21782178
mLayerExtent.setXMinimum( mbr.xMin() );
2179-
mLayerExtent.setYmax( mbr.yMax() );
2180-
mLayerExtent.setYmin( mbr.yMin() );
2179+
mLayerExtent.setYMaximum( mbr.yMax() );
2180+
mLayerExtent.setYMinimum( mbr.yMin() );
21812181

21822182
// get and store the feature type
21832183
mGeometryType = mDataProvider->geometryType();

src/core/raster/qgsrasterlayer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ bool QgsRasterLayer::readFile( QString const & fileName )
483483
// The affine transform reduces to these values at the
484484
// top-left corner of the raster
485485
mLayerExtent.setXMinimum( mGeoTransform[0] );
486-
mLayerExtent.setYmax( mGeoTransform[3] );
487-
mLayerExtent.setYmin( myYMin );
486+
mLayerExtent.setYMaximum( mGeoTransform[3] );
487+
mLayerExtent.setYMinimum( myYMin );
488488

489489
//
490490
// Set up the x and y dimensions of this raster layer
@@ -4864,8 +4864,8 @@ void QgsRasterLayer::setDataProvider( QString const & provider,
48644864
// store the extent
48654865
mLayerExtent.setXMaximum( mbr.xMax() );
48664866
mLayerExtent.setXMinimum( mbr.xMin() );
4867-
mLayerExtent.setYmax( mbr.yMax() );
4868-
mLayerExtent.setYmin( mbr.yMin() );
4867+
mLayerExtent.setYMaximum( mbr.yMax() );
4868+
mLayerExtent.setYMinimum( mbr.yMin() );
48694869

48704870
// upper case the first letter of the layer name
48714871
QgsDebugMsg( "mLayerName: " + name() );

src/gui/qgsmapcanvas.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -628,17 +628,17 @@ void QgsMapCanvas::keyPressEvent( QKeyEvent * e )
628628
case Qt::Key_Up:
629629
QgsDebugMsg( "Pan up" );
630630

631-
currentExtent.setYmax( currentExtent.yMax() + dy );
632-
currentExtent.setYmin( currentExtent.yMin() + dy );
631+
currentExtent.setYMaximum( currentExtent.yMax() + dy );
632+
currentExtent.setYMinimum( currentExtent.yMin() + dy );
633633
setExtent( currentExtent );
634634
refresh();
635635
break;
636636

637637
case Qt::Key_Down:
638638
QgsDebugMsg( "Pan down" );
639639

640-
currentExtent.setYmax( currentExtent.yMax() - dy );
641-
currentExtent.setYmin( currentExtent.yMin() - dy );
640+
currentExtent.setYMaximum( currentExtent.yMax() - dy );
641+
currentExtent.setYMinimum( currentExtent.yMin() - dy );
642642
setExtent( currentExtent );
643643
refresh();
644644
break;
@@ -1134,14 +1134,14 @@ void QgsMapCanvas::panActionEnd( QPoint releasePoint )
11341134

11351135
if ( end.y() < start.y() )
11361136
{
1137-
r.setYmax( r.yMax() + dy );
1138-
r.setYmin( r.yMin() + dy );
1137+
r.setYMaximum( r.yMax() + dy );
1138+
r.setYMinimum( r.yMin() + dy );
11391139

11401140
}
11411141
else
11421142
{
1143-
r.setYmax( r.yMax() - dy );
1144-
r.setYmin( r.yMin() - dy );
1143+
r.setYMaximum( r.yMax() - dy );
1144+
r.setYMinimum( r.yMin() - dy );
11451145

11461146
}
11471147

src/gui/qgsmapoverviewcanvas.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ void QgsMapOverviewCanvas::mouseReleaseEvent( QMouseEvent * e )
188188
QgsRect ext;
189189
ext.setXMinimum( center.x() - oldExtent.width() / 2 );
190190
ext.setXMaximum( center.x() + oldExtent.width() / 2 );
191-
ext.setYmin( center.y() - oldExtent.height() / 2 );
192-
ext.setYmax( center.y() + oldExtent.height() / 2 );
191+
ext.setYMinimum( center.y() - oldExtent.height() / 2 );
192+
ext.setYMaximum( center.y() + oldExtent.height() / 2 );
193193

194194
QgsDebugMsg( QString( "panning: new position: [%1,%2] [%3x%4]" ).arg( rect.left() ).arg( rect.top() ).arg( rect.width() ).arg( rect.height() ) );
195195

src/gui/qgsmaptip.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ QString QgsMapTip::fetchFeature( QgsMapLayer *layer, QgsPoint & mapPosition, Qgs
9292
QgsRect r;
9393
r.setXMinimum( mapPosition.x() - searchRadius );
9494
r.setXMaximum( mapPosition.x() + searchRadius );
95-
r.setYmin( mapPosition.y() - searchRadius );
96-
r.setYmax( mapPosition.y() + searchRadius );
95+
r.setYMinimum( mapPosition.y() - searchRadius );
96+
r.setYMaximum( mapPosition.y() + searchRadius );
9797

9898
// Get the data provider
9999
QgsVectorDataProvider* dataProvider = dynamic_cast<QgsVectorLayer*>( layer )->dataProvider();

src/gui/qgsmaptoolzoom.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ void QgsMapToolZoom::canvasReleaseEvent( QMouseEvent * e )
8585

8686
QgsRect r;
8787
r.setXMinimum( ll.x() );
88-
r.setYmin( ll.y() );
88+
r.setYMinimum( ll.y() );
8989
r.setXMaximum( ur.x() );
90-
r.setYmax( ur.y() );
90+
r.setYMaximum( ur.y() );
9191
r.normalize();
9292

9393
// prevent zooming to an empty extent

src/providers/postgres/qgspostgresextentthread.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ void QgsPostgresExtentThread::run()
137137
/*
138138
layerExtent.setXMaximum(maxx);
139139
layerExtent.setXMinimum(minx);
140-
layerExtent.setYmax(maxy);
141-
layerExtent.setYmin(miny);
140+
layerExtent.setYMaximum(maxy);
141+
layerExtent.setYMinimum(miny);
142142
*/
143143

144144

src/providers/postgres/qgspostgresprovider.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ void QgsPostgresProvider::setExtent( QgsRect& newExtent )
698698
{
699699
layerExtent.setXMaximum( newExtent.xMax() );
700700
layerExtent.setXMinimum( newExtent.xMin() );
701-
layerExtent.setYmax( newExtent.yMax() );
702-
layerExtent.setYmin( newExtent.yMin() );
701+
layerExtent.setYMaximum( newExtent.yMax() );
702+
layerExtent.setYMinimum( newExtent.yMin() );
703703
}
704704

705705
// TODO - make this function return the real extent_
@@ -2388,8 +2388,8 @@ void QgsPostgresProvider::calculateExtents()
23882388

23892389
layerExtent.setXMaximum( maxx );
23902390
layerExtent.setXMinimum( minx );
2391-
layerExtent.setYmax( maxy );
2392-
layerExtent.setYmin( miny );
2391+
layerExtent.setYMaximum( maxy );
2392+
layerExtent.setYMinimum( miny );
23932393
}
23942394
}
23952395
else

src/providers/wfs/qgswfsprovider.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -620,10 +620,10 @@ int QgsWFSProvider::getExtentFromGML2( QgsRect* extent, const QDomElement& wfsCo
620620

621621
std::list<QgsPoint>::const_iterator it = boundingPoints.begin();
622622
extent->setXMinimum( it->x() );
623-
extent->setYmin( it->y() );
623+
extent->setYMinimum( it->y() );
624624
++it;
625625
extent->setXMaximum( it->x() );
626-
extent->setYmax( it->y() );
626+
extent->setYMaximum( it->y() );
627627
return 0;
628628
}
629629
else if ( coordinatesNode.localName() == "coord" )
@@ -659,9 +659,9 @@ int QgsWFSProvider::getExtentFromGML2( QgsRect* extent, const QDomElement& wfsCo
659659
return 10;
660660
}
661661
extent->setXMinimum( x1 );
662-
extent->setYmin( y1 );
662+
extent->setYMinimum( y1 );
663663
extent->setXMaximum( x2 );
664-
extent->setYmax( y2 );
664+
extent->setYMaximum( y2 );
665665
return 0;
666666
}
667667
else

0 commit comments

Comments
 (0)