QGIS API Documentation
2.4.0-Chugiak
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
core
qgsmaprenderercustompainterjob.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsmaprenderercustompainterjob.h
3
--------------------------------------
4
Date : December 2013
5
Copyright : (C) 2013 by Martin Dobias
6
Email : wonder dot sk at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSMAPRENDERERCUSTOMPAINTERJOB_H
17
#define QGSMAPRENDERERCUSTOMPAINTERJOB_H
18
19
#include "
qgsmaprendererjob.h
"
20
21
#include <QEventLoop>
22
31
class
CORE_EXPORT
QgsMapRendererCustomPainterJob
:
public
QgsMapRendererJob
32
{
33
Q_OBJECT
34
public
:
35
QgsMapRendererCustomPainterJob
(
const
QgsMapSettings
& settings, QPainter* painter );
36
~
QgsMapRendererCustomPainterJob
();
37
38
virtual
void
start
();
39
virtual
void
cancel
();
40
virtual
void
waitForFinished
();
41
virtual
bool
isActive
()
const
;
42
virtual
QgsLabelingResults
*
takeLabelingResults
();
43
45
const
LayerRenderJobs
&
jobs
()
const
{
return
mLayerJobs; }
46
59
void
waitForFinishedWithEventLoop( QEventLoop::ProcessEventsFlags flags = QEventLoop::AllEvents );
60
70
void
renderSynchronously();
71
72
protected
slots:
73
void
futureFinished();
74
75
protected
:
76
static
void
staticRender(
QgsMapRendererCustomPainterJob
*
self
);
// function to be used within the thread
77
78
// these methods are called within worker thread
79
void
doRender();
80
81
private
:
82
QPainter*
mPainter
;
83
QFuture<void>
mFuture
;
84
QFutureWatcher<void>
mFutureWatcher
;
85
QgsRenderContext
mLabelingRenderContext
;
86
QgsPalLabeling
*
mLabelingEngine
;
87
88
bool
mActive
;
89
LayerRenderJobs
mLayerJobs
;
90
bool
mRenderSynchronously
;
91
};
92
93
94
#endif // QGSMAPRENDERERCUSTOMPAINTERJOB_H
QgsMapRendererCustomPainterJob
Job implementation that renders everything sequentially using a custom painter.
Definition:
qgsmaprenderercustompainterjob.h:31
QgsMapRendererJob
Abstract base class for map rendering implementations.
Definition:
qgsmaprendererjob.h:78
QgsPalLabeling
Definition:
qgspallabeling.h:705
QgsMapRendererCustomPainterJob::mFuture
QFuture< void > mFuture
Definition:
qgsmaprenderercustompainterjob.h:83
QgsMapRendererCustomPainterJob::mRenderSynchronously
bool mRenderSynchronously
Definition:
qgsmaprenderercustompainterjob.h:90
QgsMapRendererCustomPainterJob::mActive
bool mActive
Definition:
qgsmaprenderercustompainterjob.h:88
QgsMapRendererCustomPainterJob::mLayerJobs
LayerRenderJobs mLayerJobs
Definition:
qgsmaprenderercustompainterjob.h:89
QgsMapSettings
The QgsMapSettings class contains configuration for rendering of the map.
Definition:
qgsmapsettings.h:52
QgsMapRendererJob::waitForFinished
virtual void waitForFinished()=0
Block until the job has finished.
QgsMapRendererCustomPainterJob::jobs
const LayerRenderJobs & jobs() const
Definition:
qgsmaprenderercustompainterjob.h:45
qgsmaprendererjob.h
QgsMapRendererJob::start
virtual void start()=0
Start the rendering job and immediately return.
QgsMapRendererCustomPainterJob::mLabelingEngine
QgsPalLabeling * mLabelingEngine
Definition:
qgsmaprenderercustompainterjob.h:86
QgsRenderContext
Contains information about the context of a rendering operation.
Definition:
qgsrendercontext.h:39
QgsMapRendererCustomPainterJob::mLabelingRenderContext
QgsRenderContext mLabelingRenderContext
Definition:
qgsmaprenderercustompainterjob.h:85
QgsMapRendererCustomPainterJob::mPainter
QPainter * mPainter
Definition:
qgsmaprenderercustompainterjob.h:82
QgsMapRendererJob::cancel
virtual void cancel()=0
Stop the rendering job - does not return until the job has terminated.
QgsLabelingResults
Class that stores computed placement from labeling engine.
Definition:
qgspallabeling.h:685
LayerRenderJobs
QList< LayerRenderJob > LayerRenderJobs
Definition:
qgsmaprendererjob.h:51
QgsMapRendererJob::takeLabelingResults
virtual QgsLabelingResults * takeLabelingResults()=0
Get pointer to internal labeling engine (in order to get access to the results)
QgsMapRendererCustomPainterJob::mFutureWatcher
QFutureWatcher< void > mFutureWatcher
Definition:
qgsmaprenderercustompainterjob.h:84
QgsMapRendererJob::isActive
virtual bool isActive() const =0
Tell whether the rendering job is currently running in background.
Generated on Fri Jun 27 2014 18:43:41 for QGIS API Documentation by
1.8.7