QGIS API Documentation 3.99.0-Master (c22de0620c0)
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
26#define SIP_NO_FILE
27
28class QTimer;
29class Qgs3DMapScene;
30class Qgs3DMapSceneEntity;
31class QgsFeature3DHandler;
32class QgsFeature;
33class QgsMapLayer;
34class QgsRubberBand3D;
35
36
44class _3D_EXPORT Qgs3DHighlightFeatureHandler : public QObject
45{
46 Q_OBJECT
47
48 public:
52
53 public slots:
59 void highlightFeature( QgsFeature feature, QgsMapLayer *layer );
60
62 void clearHighlights();
63
64 private slots:
65 void onRenderer3DChanged();
66
67 private:
68 void finalizeAndAddToScene( Qgs3DMapSceneEntity *entity );
69
70 Qgs3DMapScene *mScene;
72 QMap<QgsMapLayer *, QgsRubberBand3D *> mRubberBands;
74 QVector<Qgs3DMapSceneEntity *> mHighlightEntities;
76 QMap<QgsMapLayer *, QgsFeature3DHandler *> mHighlightHandlers;
78 QMap<QgsMapLayer *, QgsRuleBased3DRenderer::RuleToHandlerMap> mHighlightRuleBasedHandlers;
80 std::unique_ptr<QTimer> mHighlightHandlerTimer;
81};
82
83#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