QGIS API Documentation
4.1.0-Master (64dc32379c2)
Loading...
Searching...
No Matches
src
3d
qgsfixedgradientbackgroundsettings.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfixedgradientbackgroundsettings.h
3
--------------------------------------
4
Date : April 2026
5
Copyright : (C) 2026 by Dominik Cindrić
6
Email : viper dot miniq 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 QGSFIXEDGRADIENTBACKGROUNDSETTINGS_H
17
#define QGSFIXEDGRADIENTBACKGROUNDSETTINGS_H
18
19
#include "qgis_3d.h"
20
#include "
qgsabstract3dmapbackgroundsettings.h
"
21
22
#include <QColor>
23
#include <QString>
24
31
class
_3D_EXPORT
QgsFixedGradientBackgroundSettings
:
public
QgsAbstract3DMapBackgroundSettings
32
{
33
public
:
34
QgsFixedGradientBackgroundSettings
() =
default
;
35
36
Qgis::Map3DBackgroundType
type
()
const override
{
return
Qgis::Map3DBackgroundType::FixedGradientBackground
; }
37
38
QgsFixedGradientBackgroundSettings
*
clone
() const override
SIP_FACTORY
;
39
void
readXml( const QDomElement &element, const
QgsReadWriteContext
&context ) override;
40
void
writeXml( QDomElement &element, const
QgsReadWriteContext
&context ) const override;
41
47
QColor
topColor
()
const
{
return
mTopColor; }
48
54
void
setTopColor
(
const
QColor &color ) { mTopColor = color; }
55
61
QColor
bottomColor
()
const
{
return
mBottomColor; }
62
68
void
setBottomColor
(
const
QColor &color ) { mBottomColor = color; }
69
70
private
:
71
QColor mTopColor = QColor( 0, 128, 255 );
72
QColor mBottomColor = Qt::black;
73
};
74
75
#endif
// QGSFIXEDGRADIENTBACKGROUNDSETTINGS_H
Qgis::Map3DBackgroundType
Map3DBackgroundType
Background types for 3D map view.
Definition
qgis.h:4386
Qgis::Map3DBackgroundType::FixedGradientBackground
@ FixedGradientBackground
Two color gradient, fixed in place.
Definition
qgis.h:4388
QgsAbstract3DMapBackgroundSettings
Base class for all background settings classes used in a 3D map view.
Definition
qgsabstract3dmapbackgroundsettings.h:35
QgsAbstract3DMapBackgroundSettings::clone
virtual QgsAbstract3DMapBackgroundSettings * clone() const =0
Returns a deep copy of this background settings object.
QgsFixedGradientBackgroundSettings
Background settings for a two-color vertical gradient rendered behind the 3D scene.
Definition
qgsfixedgradientbackgroundsettings.h:32
QgsFixedGradientBackgroundSettings::setBottomColor
void setBottomColor(const QColor &color)
Sets the color at the bottom of the gradient.
Definition
qgsfixedgradientbackgroundsettings.h:68
QgsFixedGradientBackgroundSettings::topColor
QColor topColor() const
Returns the color at the top of the gradient.
Definition
qgsfixedgradientbackgroundsettings.h:47
QgsFixedGradientBackgroundSettings::type
Qgis::Map3DBackgroundType type() const override
Returns the unique type for this background settings class.
Definition
qgsfixedgradientbackgroundsettings.h:36
QgsFixedGradientBackgroundSettings::bottomColor
QColor bottomColor() const
Returns the color at the bottom of the gradient.
Definition
qgsfixedgradientbackgroundsettings.h:61
QgsFixedGradientBackgroundSettings::setTopColor
void setTopColor(const QColor &color)
Sets the color at the top of the gradient.
Definition
qgsfixedgradientbackgroundsettings.h:54
QgsFixedGradientBackgroundSettings::QgsFixedGradientBackgroundSettings
QgsFixedGradientBackgroundSettings()=default
QgsReadWriteContext
A container for the context for various read/write operations on objects.
Definition
qgsreadwritecontext.h:38
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
qgsabstract3dmapbackgroundsettings.h
Generated on
for QGIS API Documentation by
1.15.0