Skip to content

Commit

Permalink
renamed misnamed QgsMapRender (verb) to QgsMapRenderer (noun) as part…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
timlinux committed Aug 5, 2008
1 parent 94c2017 commit fd41d31
Show file tree
Hide file tree
Showing 50 changed files with 484 additions and 755 deletions.
2 changes: 1 addition & 1 deletion python/core/core.sip
Expand Up @@ -29,7 +29,7 @@
%Include qgslogger.sip
%Include qgsmaplayer.sip
%Include qgsmaplayerregistry.sip
%Include qgsmaprender.sip
%Include qgsmaprenderer.sip
%Include qgsmaptopixel.sip
%Include qgsmarkercatalogue.sip
%Include qgsmessageoutput.sip
Expand Down
14 changes: 14 additions & 0 deletions python/core/qgsapplication.sip
Expand Up @@ -177,5 +177,19 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
//! Returns whether this machine uses big or little endian
static endian_t endian();

/** \brief get a standard css style sheet for reports.
* Typically you will use this method by doing:
* QString myStyle = QgsApplication::reportStyleSheet();
* textBrowserReport->document()->setDefaultStyleSheet(myStyle);
* @return QString containing the CSS 2.1 compliant stylesheet.
* @note you can use the special Qt extensions too, for example
* the gradient fills for backgrounds.
*/
static QString reportStyleSheet();

/** Convenience function to get a summary of the paths used in this
* application instance useful for debugging mainly.*/
static QString showSettings();

};

10 changes: 5 additions & 5 deletions python/core/qgsmaprender.sip → python/core/qgsmaprenderer.sip
@@ -1,23 +1,23 @@

/**
* \class QgsMapRender
* \class QgsMapRenderer
* \brief Class for rendering map layer set
*
*/

class QgsMapRender : QObject
class QgsMapRenderer : QObject
{
%TypeHeaderCode
#include <qgsmaprender.h>
#include <qgsmaprenderer.h>
%End

public:

//! constructor
QgsMapRender();
QgsMapRenderer();

//! destructor
~QgsMapRender();
~QgsMapRenderer();

//! starts rendering
void render(QPainter* painter);
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgssnapper.sip
Expand Up @@ -57,7 +57,7 @@ public:
ALL_RESULTS_WITHIN_GIVEN_TOLERANCES
};

QgsSnapper(QgsMapRender* mapRender);
QgsSnapper(QgsMapRenderer* mapRender);
~QgsSnapper();
/**Does the snapping operation
@param startPoint the start point for snapping (in pixel coordinates)
Expand Down
2 changes: 1 addition & 1 deletion python/gui/qgsmapcanvas.sip
Expand Up @@ -62,7 +62,7 @@ class QgsMapCanvas : QGraphicsView

QgsMapCanvasMap* map();

QgsMapRender* mapRender();
QgsMapRenderer* mapRender();

//! Accessor for the canvas pixmap
QPixmap& canvasPixmap();
Expand Down
22 changes: 11 additions & 11 deletions src/app/composer/qgscomposermap.cpp
Expand Up @@ -23,7 +23,7 @@
#include "qgsmaplayer.h"
#include "qgsmaptopixel.h"
#include "qgsproject.h"
#include "qgsmaprender.h"
#include "qgsmaprenderer.h"
#include "qgsrendercontext.h"
#include "qgsvectorlayer.h"

Expand Down Expand Up @@ -138,27 +138,27 @@ void QgsComposerMap::draw ( QPainter *painter, const QgsRect& extent, const QSiz
return;
}

QgsMapRender* canvasMapRender = mMapCanvas->mapRender();
if(!canvasMapRender)
QgsMapRenderer* canvasMapRenderer = mMapCanvas->mapRender();
if(!canvasMapRenderer)
{
return;
}

QgsMapRender theMapRender;
theMapRender.setExtent(extent);
theMapRender.setOutputSize(size, dpi);
theMapRender.setLayerSet(canvasMapRender->layerSet());
theMapRender.setProjectionsEnabled(canvasMapRender->projectionsEnabled());
theMapRender.setDestinationSrs(canvasMapRender->destinationSrs());
QgsMapRenderer theMapRenderer;
theMapRenderer.setExtent(extent);
theMapRenderer.setOutputSize(size, dpi);
theMapRenderer.setLayerSet(canvasMapRenderer->layerSet());
theMapRenderer.setProjectionsEnabled(canvasMapRenderer->projectionsEnabled());
theMapRenderer.setDestinationSrs(canvasMapRenderer->destinationSrs());

QgsRenderContext* theRenderContext = theMapRender.renderContext();
QgsRenderContext* theRenderContext = theMapRenderer.renderContext();
if(theRenderContext)
{
theRenderContext->setDrawEditingInformation(false);
theRenderContext->setRenderingStopped(false);
}

theMapRender.render(painter);
theMapRenderer.render(painter);

mMapCanvas->freeze(false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/legend/qgslegend.cpp
Expand Up @@ -32,7 +32,7 @@
#include "qgsmapcanvasmap.h"
#include "qgsmaplayer.h"
#include "qgsmaplayerregistry.h"
#include "qgsmaprender.h"
#include "qgsmaprenderer.h"
#include "qgsproject.h"
#include "qgsrasterlayer.h"
#include "qgsrasterlayerproperties.h"
Expand Down

0 comments on commit fd41d31

Please sign in to comment.