QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
qgsterraintextureimage_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsterraintextureimage_p.h
3 --------------------------------------
4 Date : July 2017
5 Copyright : (C) 2017 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 QGSTERRAINTEXTUREIMAGE_P_H
17#define QGSTERRAINTEXTUREIMAGE_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#define SIP_NO_FILE
31
32#include <Qt3DRender/QAbstractTextureImage>
33
34#include "qgsrectangle.h"
35
36class QgsTerrainTextureGenerator;
37
45class QgsTerrainTextureImage : public Qt3DRender::QAbstractTextureImage
46{
47 Q_OBJECT
48 public:
50 QgsTerrainTextureImage( const QImage &image, const QgsRectangle &extent, const QString &debugText, Qt3DCore::QNode *parent = nullptr );
51
52 Qt3DRender::QTextureImageDataGeneratorPtr dataGenerator() const override;
53
55 void invalidate();
57 void setImage( const QImage &image );
59 QImage getImage() const { return mImage; }
60
62 QgsRectangle imageExtent() const { return mExtent; }
64 QString imageDebugText() const { return mDebugText; }
65
66 private:
67 QgsRectangle mExtent;
68 QString mDebugText;
69 QImage mImage;
70 int mVersion = 1;
71};
72
74
75#endif // QGSTERRAINTEXTUREIMAGE_P_H
A rectangle specified with double values.