Skip to content

Commit fd41d31

Browse files
author
timlinux
committed
renamed misnamed QgsMapRender (verb) to QgsMapRenderer (noun) as part of cleanups for 1.0.0 release. Updated all related dependencies. Also removed some spurious debug messages
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8997 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 94c2017 commit fd41d31

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+484
-755
lines changed

python/core/core.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
%Include qgslogger.sip
3030
%Include qgsmaplayer.sip
3131
%Include qgsmaplayerregistry.sip
32-
%Include qgsmaprender.sip
32+
%Include qgsmaprenderer.sip
3333
%Include qgsmaptopixel.sip
3434
%Include qgsmarkercatalogue.sip
3535
%Include qgsmessageoutput.sip

python/core/qgsapplication.sip

+14
Original file line numberDiff line numberDiff line change
@@ -177,5 +177,19 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
177177
//! Returns whether this machine uses big or little endian
178178
static endian_t endian();
179179

180+
/** \brief get a standard css style sheet for reports.
181+
* Typically you will use this method by doing:
182+
* QString myStyle = QgsApplication::reportStyleSheet();
183+
* textBrowserReport->document()->setDefaultStyleSheet(myStyle);
184+
* @return QString containing the CSS 2.1 compliant stylesheet.
185+
* @note you can use the special Qt extensions too, for example
186+
* the gradient fills for backgrounds.
187+
*/
188+
static QString reportStyleSheet();
189+
190+
/** Convenience function to get a summary of the paths used in this
191+
* application instance useful for debugging mainly.*/
192+
static QString showSettings();
193+
180194
};
181195

python/core/qgsmaprender.sip renamed to python/core/qgsmaprenderer.sip

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11

22
/**
3-
* \class QgsMapRender
3+
* \class QgsMapRenderer
44
* \brief Class for rendering map layer set
55
*
66
*/
77

8-
class QgsMapRender : QObject
8+
class QgsMapRenderer : QObject
99
{
1010
%TypeHeaderCode
11-
#include <qgsmaprender.h>
11+
#include <qgsmaprenderer.h>
1212
%End
1313

1414
public:
1515

1616
//! constructor
17-
QgsMapRender();
17+
QgsMapRenderer();
1818

1919
//! destructor
20-
~QgsMapRender();
20+
~QgsMapRenderer();
2121

2222
//! starts rendering
2323
void render(QPainter* painter);

python/core/qgssnapper.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public:
5757
ALL_RESULTS_WITHIN_GIVEN_TOLERANCES
5858
};
5959

60-
QgsSnapper(QgsMapRender* mapRender);
60+
QgsSnapper(QgsMapRenderer* mapRender);
6161
~QgsSnapper();
6262
/**Does the snapping operation
6363
@param startPoint the start point for snapping (in pixel coordinates)

python/gui/qgsmapcanvas.sip

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class QgsMapCanvas : QGraphicsView
6262

6363
QgsMapCanvasMap* map();
6464

65-
QgsMapRender* mapRender();
65+
QgsMapRenderer* mapRender();
6666

6767
//! Accessor for the canvas pixmap
6868
QPixmap& canvasPixmap();

src/app/composer/qgscomposermap.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "qgsmaplayer.h"
2424
#include "qgsmaptopixel.h"
2525
#include "qgsproject.h"
26-
#include "qgsmaprender.h"
26+
#include "qgsmaprenderer.h"
2727
#include "qgsrendercontext.h"
2828
#include "qgsvectorlayer.h"
2929

@@ -138,27 +138,27 @@ void QgsComposerMap::draw ( QPainter *painter, const QgsRect& extent, const QSiz
138138
return;
139139
}
140140

141-
QgsMapRender* canvasMapRender = mMapCanvas->mapRender();
142-
if(!canvasMapRender)
141+
QgsMapRenderer* canvasMapRenderer = mMapCanvas->mapRender();
142+
if(!canvasMapRenderer)
143143
{
144144
return;
145145
}
146146

147-
QgsMapRender theMapRender;
148-
theMapRender.setExtent(extent);
149-
theMapRender.setOutputSize(size, dpi);
150-
theMapRender.setLayerSet(canvasMapRender->layerSet());
151-
theMapRender.setProjectionsEnabled(canvasMapRender->projectionsEnabled());
152-
theMapRender.setDestinationSrs(canvasMapRender->destinationSrs());
147+
QgsMapRenderer theMapRenderer;
148+
theMapRenderer.setExtent(extent);
149+
theMapRenderer.setOutputSize(size, dpi);
150+
theMapRenderer.setLayerSet(canvasMapRenderer->layerSet());
151+
theMapRenderer.setProjectionsEnabled(canvasMapRenderer->projectionsEnabled());
152+
theMapRenderer.setDestinationSrs(canvasMapRenderer->destinationSrs());
153153

154-
QgsRenderContext* theRenderContext = theMapRender.renderContext();
154+
QgsRenderContext* theRenderContext = theMapRenderer.renderContext();
155155
if(theRenderContext)
156156
{
157157
theRenderContext->setDrawEditingInformation(false);
158158
theRenderContext->setRenderingStopped(false);
159159
}
160160

161-
theMapRender.render(painter);
161+
theMapRenderer.render(painter);
162162

163163
mMapCanvas->freeze(false);
164164
}

src/app/legend/qgslegend.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "qgsmapcanvasmap.h"
3333
#include "qgsmaplayer.h"
3434
#include "qgsmaplayerregistry.h"
35-
#include "qgsmaprender.h"
35+
#include "qgsmaprenderer.h"
3636
#include "qgsproject.h"
3737
#include "qgsrasterlayer.h"
3838
#include "qgsrasterlayerproperties.h"

0 commit comments

Comments
 (0)