Marble::GeoDataLabelStyle

Search for usage in LXR

Marble::GeoDataLabelStyle Class Reference

#include <GeoDataLabelStyle.h>

Inheritance diagram for Marble::GeoDataLabelStyle:

Public Types

enum  Alignment { Corner, Center, Right }
 
- Public Types inherited from Marble::GeoDataColorStyle
enum  ColorMode { Normal, Random }
 

Public Member Functions

 GeoDataLabelStyle ()
 
 GeoDataLabelStyle (const GeoDataLabelStyle &other)
 
 GeoDataLabelStyle (const QFont &font, const QColor &color)
 
GeoDataLabelStyle::Alignment alignment () const
 
QFont font () const
 
bool glow () const
 
const char * nodeType () const override
 
bool operator!= (const GeoDataLabelStyle &other) const
 
GeoDataLabelStyleoperator= (const GeoDataLabelStyle &other)
 
bool operator== (const GeoDataLabelStyle &other) const
 
void pack (QDataStream &stream) const override
 
float scale () const
 
QFont scaledFont () const
 
void setAlignment (GeoDataLabelStyle::Alignment alignment)
 
void setFont (const QFont &font)
 
void setGlow (bool on)
 
void setScale (float scale)
 
void unpack (QDataStream &stream) override
 
- Public Member Functions inherited from Marble::GeoDataColorStyle
 GeoDataColorStyle (const GeoDataColorStyle &other)
 
QColor color () const
 
ColorMode colorMode () const
 
bool operator!= (const GeoDataColorStyle &other) const
 
GeoDataColorStyleoperator= (const GeoDataColorStyle &other)
 
bool operator== (const GeoDataColorStyle &other) const
 
void pack (QDataStream &stream) const override
 
QColor paintedColor () const
 
void setColor (const QColor &value)
 
void setColorMode (ColorMode colorMode)
 
void unpack (QDataStream &stream) override
 
- Public Member Functions inherited from Marble::GeoDataObject
 GeoDataObject (const GeoDataObject &)
 
QString id () const
 
GeoDataObjectoperator= (const GeoDataObject &)
 
void pack (QDataStream &stream) const override
 
GeoDataObjectparent ()
 
const GeoDataObjectparent () const
 
QString resolvePath (const QString &relativePath) const
 
void setId (const QString &value)
 
void setParent (GeoDataObject *parent)
 
void setTargetId (const QString &value)
 
QString targetId () const
 
void unpack (QDataStream &steam) override
 

Additional Inherited Members

- Static Public Member Functions inherited from Marble::GeoDataColorStyle
static QString contrastColor (const QColor &color)
 
- Protected Member Functions inherited from Marble::GeoDataObject
virtual bool equals (const GeoDataObject &other) const
 

Detailed Description

specifies how the name of a GeoDataFeature is drawn

A GeoDataLabelStyle specifies how the name of a GeoDataFeature is drawn in the viewer. A custom color, color mode (both inherited from GeoDataColorStyle, and scale for the label (name) can be specified.

Definition at line 30 of file GeoDataLabelStyle.h.

Constructor & Destructor Documentation

◆ GeoDataLabelStyle() [1/2]

Marble::GeoDataLabelStyle::GeoDataLabelStyle ( )

Construct a new GeoDataLabelStyle.

Definition at line 53 of file GeoDataLabelStyle.cpp.

◆ GeoDataLabelStyle() [2/2]

Marble::GeoDataLabelStyle::GeoDataLabelStyle ( const QFont font,
const QColor color 
)

Construct a new GeoDataLabelStyle.

Parameters
fontthe font to use when showing the name
colorthe color to use when showing the name
See also
GeoDataColorStyle

Definition at line 64 of file GeoDataLabelStyle.cpp.

Member Function Documentation

◆ alignment()

GeoDataLabelStyle::Alignment Marble::GeoDataLabelStyle::alignment ( ) const

Return the alignment of the label.

Returns
the current alignment

Definition at line 109 of file GeoDataLabelStyle.cpp.

◆ font()

QFont Marble::GeoDataLabelStyle::font ( ) const

Return the current font of the label.

Returns
the current font

Definition at line 129 of file GeoDataLabelStyle.cpp.

◆ glow()

bool Marble::GeoDataLabelStyle::glow ( ) const

Return true if the text of the label should glow, false otherwise.

See also
setGlow

Definition at line 147 of file GeoDataLabelStyle.cpp.

◆ nodeType()

const char * Marble::GeoDataLabelStyle::nodeType ( ) const
overridevirtual

Provides type information for downcasting a GeoData.

Reimplemented from Marble::GeoDataColorStyle.

Definition at line 99 of file GeoDataLabelStyle.cpp.

◆ operator=()

GeoDataLabelStyle & Marble::GeoDataLabelStyle::operator= ( const GeoDataLabelStyle other)

assignment operator

Definition at line 75 of file GeoDataLabelStyle.cpp.

◆ pack()

void Marble::GeoDataLabelStyle::pack ( QDataStream stream) const
override

Serialize the style to a stream.

Parameters
streamthe stream

Definition at line 157 of file GeoDataLabelStyle.cpp.

◆ scale()

float Marble::GeoDataLabelStyle::scale ( ) const

Return the current scale of the label.

Returns
the current scale

Definition at line 119 of file GeoDataLabelStyle.cpp.

◆ scaledFont()

QFont Marble::GeoDataLabelStyle::scaledFont ( ) const

Return the scaled font of the label.

Returns
the scaled font

Definition at line 134 of file GeoDataLabelStyle.cpp.

◆ setAlignment()

void Marble::GeoDataLabelStyle::setAlignment ( GeoDataLabelStyle::Alignment  alignment)

Set the alignment of the label.

Parameters
alignmentthe alignment

Definition at line 104 of file GeoDataLabelStyle.cpp.

◆ setFont()

void Marble::GeoDataLabelStyle::setFont ( const QFont font)

Set the font of the label.

Parameters
fontthe new font

Definition at line 124 of file GeoDataLabelStyle.cpp.

◆ setGlow()

void Marble::GeoDataLabelStyle::setGlow ( bool  on)

Enable or disable a glow effect around the text of the label.

The default is false.

Note that this is not a KML property.

Definition at line 152 of file GeoDataLabelStyle.cpp.

◆ setScale()

void Marble::GeoDataLabelStyle::setScale ( float  scale)

Set the scale of the label.

Parameters
scalethe new scale

Definition at line 114 of file GeoDataLabelStyle.cpp.

◆ unpack()

void Marble::GeoDataLabelStyle::unpack ( QDataStream stream)
override

Unserialize the style from a stream.

Parameters
streamthe stream

Definition at line 166 of file GeoDataLabelStyle.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Sep 22 2023 03:53:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.