18 #include <QDomDocument> 
   25   QDomElement elemLight = doc.createElement( QStringLiteral( 
"directional-light" ) );
 
   26   elemLight.setAttribute( QStringLiteral( 
"x" ), mDirection.
x() );
 
   27   elemLight.setAttribute( QStringLiteral( 
"y" ), mDirection.
y() );
 
   28   elemLight.setAttribute( QStringLiteral( 
"z" ), mDirection.
z() );
 
   30   elemLight.setAttribute( QStringLiteral( 
"intensity" ), mIntensity );
 
   36   mDirection.
set( elem.attribute( QStringLiteral( 
"x" ) ).toFloat(),
 
   37                   elem.attribute( QStringLiteral( 
"y" ) ).toFloat(),
 
   38                   elem.attribute( QStringLiteral( 
"z" ) ).toFloat() );
 
   40   mIntensity = elem.attribute( QStringLiteral( 
"intensity" ) ).toFloat();
 
   45   return mDirection == other.mDirection && mColor == other.mColor && mIntensity == other.mIntensity;
 
bool operator==(const QgsDirectionalLightSettings &other)
QDomElement writeXml(QDomDocument &doc) const
Writes configuration to a new DOM element and returns it.
void readXml(const QDomElement &elem)
Reads configuration from a DOM element previously written using writeXml()
static QColor decodeColor(const QString &str)
static QString encodeColor(const QColor &color)
double y() const
Returns Y coordinate.
double z() const
Returns Z coordinate.
double x() const
Returns X coordinate.
void set(double x, double y, double z)
Sets vector coordinates.