QGIS API Documentation 3.99.0-Master (357b655ed83)
Loading...
Searching...
No Matches
qgs3dhighlightfeaturehandler.h
Go to the documentation of this file.
1/***************************************************************************
2 qgs3dhighlightfeaturehandler.h
3 ---------------------
4 begin : December 2025
5 copyright : (C) 2025 by Stefanos Natsis
6 email : uclaros 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 QGS3DHIGHLIGHTFEATUREHANDLER_H
17#define QGS3DHIGHLIGHTFEATUREHANDLER_H
18
19#include "qgis_3d.h"
21
22#include <QMap>
23#include <QObject>
24#include <QVector>
25
26class QTimer;
27class Qgs3DMapScene;
28class Qgs3DMapSceneEntity;
29class QgsFeature3DHandler;
30class QgsFeature;
31class QgsMapLayer;
32class QgsRubberBand3D;
33
34#define SIP_NO_FILE
35
43class _3D_EXPORT Qgs3DHighlightFeatureHandler : public QObject
44{
45 Q_OBJECT
46
47 public:
51
52 public slots:
58 void highlightFeature( QgsFeature feature, QgsMapLayer *layer );
59
61 void clearHighlights();
62
63 private slots:
64 void onRenderer3DChanged();
65
66 private:
67 void finalizeAndAddToScene( Qgs3DMapSceneEntity *entity );
68
69 Qgs3DMapScene *mScene;
71 QMap<QgsMapLayer *, QgsRubberBand3D *> mRubberBands;
73 QVector<Qgs3DMapSceneEntity *> mHighlightEntities;
75 QMap<QgsMapLayer *, QgsFeature3DHandler *> mHighlightHandlers;
77 QMap<QgsMapLayer *, QgsRuleBased3DRenderer::RuleToHandlerMap> mHighlightRuleBasedHandlers;
79 std::unique_ptr<QTimer> mHighlightHandlerTimer;
80};
81
82#endif // QGS3DHIGHLIGHTFEATUREHANDLER_H
Qgs3DHighlightFeatureHandler(Qgs3DMapScene *scene)
Constructor.
void highlightFeature(QgsFeature feature, QgsMapLayer *layer)
Highlights feature of layer in the 3d scene When multiple features are identified,...
void clearHighlights()
Clears all highlights.
Entity that encapsulates our 3D scene - contains all other entities (such as terrain) as children.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:60
Base class for all map layer types.
Definition qgsmaplayer.h:83