QGIS API Documentation 4.3.0-Master (0ff9723465c)
Loading...
Searching...
No Matches
qgslinematerial_p.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslinematerial_p.h
3 --------------------------------------
4 Date : Apr 2019
5 Copyright : (C) 2019 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 QGSLINEMATERIAL_P_H
17#define QGSLINEMATERIAL_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#include "qgis_3d.h"
31#include "qgsmaterial.h"
32
33#include <Qt3DRender/QCamera>
34
35#define SIP_NO_FILE
36
59class _3D_EXPORT QgsLineMaterial : public QgsMaterial
60{
61 Q_OBJECT
62 public:
63 enum class LinePart
64 {
65 Segment,
66 Join,
67 };
68
69 explicit QgsLineMaterial( LinePart part = LinePart::Segment );
70
72 LinePart part() const { return mPart; }
73
75 void setLineColor( const QColor &color );
76 void setUseVertexColors( bool enabled );
77 void setLineWidth( float width );
78
79 Q_INVOKABLE void setViewportSize( const QSizeF &viewportSize );
80
86 void copyLineParametersTo( QgsLineMaterial *other ) const;
87
88 private:
89 LinePart mPart;
90
91 Qt3DRender::QParameter *mParameterThickness = nullptr;
92 Qt3DRender::QParameter *mParameterLineColor = nullptr;
93 Qt3DRender::QParameter *mParameterUseVertexColors = nullptr;
94 Qt3DRender::QParameter *mParameterWindowScale = nullptr;
95
97 Qt3DRender::QParameter *mParameterMiterLimit = nullptr;
98};
99
101
102#endif // QGSLINEMATERIAL_P_H
Base class for all materials used within QGIS 3D views.
Definition qgsmaterial.h:40