QGIS API Documentation 3.99.0-Master (c22de0620c0)
Loading...
Searching...
No Matches
qgsmapoverlaytexturegenerator_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmapoverlaytexturegenerator_p.h
3 --------------------------------------
4 Date : July 2025
5 Copyright : (C) 2025 by Jean Felder
6 Email : jean dot felder at oslandia 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 QGSMAPOVERLAYTEXTUREGENERATOR_P_H
17#define QGSMAPOVERLAYTEXTUREGENERATOR_P_H
18
20
21//
22// W A R N I N G
23// -------------
24//
25// This file is not part of the QGIS API. It exists purely as an
26// implementation detail. This header file may change from version to
27// version without notice, or even be removed.
28//
29
30
31#include "qgsrectangle.h"
32
33#include <QObject>
34
35#define SIP_NO_FILE
36
39class QgsMapSettings;
40class QgsProject;
41class QgsRasterLayer;
42
52class QgsMapOverlayTextureGenerator : public QObject
53{
54 Q_OBJECT
55 public:
57 QgsMapOverlayTextureGenerator( const Qgs3DMapSettings &mapSettings, int size );
58
59 ~QgsMapOverlayTextureGenerator() override;
60
65 int render( const QgsRectangle &extent, const QVector<QgsPointXY> &frustumExtent, double azimuthDegrees, bool showFrustum = false );
66
68 void cancelActiveJob();
69
71 void waitForFinished();
72
73 signals:
75 void textureReady( const QImage &image );
76
77 private slots:
78 void onRenderingFinished();
79
80 private:
81 QgsMapSettings baseMapSettings() const;
82
83 const Qgs3DMapSettings &m3DMapSettings;
84 QSize mSize;
85 QgsMapRendererParallelJob *mActiveJob = nullptr;
86 QgsRectangle mExtent;
87 double mRotation = 0.;
88 QVector<QgsPointXY> mFrustumExtent;
89 bool mShowFrustum = false;
90 int mLastJobId = 0;
91};
92
94
95#endif // QGSMAPOVERLAYTEXTUREGENERATOR_P_H
Definition of the world.
Job implementation that renders all layers in parallel.
Contains configuration for rendering maps.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:113
Represents a raster layer.