QGIS API Documentation 4.1.0-Master (64dc32379c2)
Loading...
Searching...
No Matches
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"
21
22#include <QColor>
23#include <QString>
24
32{
33 public:
35
37
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
Map3DBackgroundType
Background types for 3D map view.
Definition qgis.h:4386
@ FixedGradientBackground
Two color gradient, fixed in place.
Definition qgis.h:4388
Base class for all background settings classes used in a 3D map view.
virtual QgsAbstract3DMapBackgroundSettings * clone() const =0
Returns a deep copy of this background settings object.
Background settings for a two-color vertical gradient rendered behind the 3D scene.
void setBottomColor(const QColor &color)
Sets the color at the bottom of the gradient.
QColor topColor() const
Returns the color at the top of the gradient.
Qgis::Map3DBackgroundType type() const override
Returns the unique type for this background settings class.
QColor bottomColor() const
Returns the color at the bottom of the gradient.
void setTopColor(const QColor &color)
Sets the color at the top of the gradient.
A container for the context for various read/write operations on objects.
#define SIP_FACTORY
Definition qgis_sip.h:83