KGAPI2::StaticMapPath

Search for usage in LXR

KGAPI2::StaticMapPath Class Reference

#include <staticmappath.h>

Public Types

enum  LocationType { Undefined = -1 , String , KABCAddress , KABCGeo }
 

Public Member Functions

 StaticMapPath ()
 
 StaticMapPath (const KContacts::Address::List &locations, const quint8 weight=5, const QColor &color=Qt::blue, const QColor &fillColor=QColor())
 
 StaticMapPath (const QList< KContacts::Geo > &locations, const quint8 weight=5, const QColor &color=Qt::blue, const QColor &fillColor=QColor())
 
 StaticMapPath (const QStringList &locations, const quint8 weight=5, const QColor &color=Qt::blue, const QColor &fillColor=QColor())
 
 StaticMapPath (const StaticMapPath &other)
 
 ~StaticMapPath ()
 
QColor color () const
 
QColor fillColor () const
 
bool isValid () const
 
KContacts::Address::List locationsAddress () const
 
QList< KContacts::GeolocationsGeo () const
 
QStringList locationsString () const
 
LocationType locationType () const
 
StaticMapPathoperator= (const StaticMapPath &other)
 
void setColor (const QColor &color)
 
void setFillColor (const QColor &color)
 
void setLocations (const KContacts::Address::List &locations)
 
void setLocations (const QList< KContacts::Geo > &locations)
 
void setLocations (const QStringList &locations)
 
void setWeight (const quint8 weight)
 
QString toString () const
 
quint8 weight () const
 

Detailed Description

Represents path with defined locations, weight, color and color for filled area.

Author
Jan Grulich grulj.nosp@m.a@gm.nosp@m.ail.c.nosp@m.om
Since
0.4

Definition at line 26 of file staticmappath.h.

Member Enumeration Documentation

◆ LocationType

enum KGAPI2::StaticMapPath::LocationType

Definition at line 29 of file staticmappath.h.

Constructor & Destructor Documentation

◆ StaticMapPath() [1/5]

StaticMapPath::StaticMapPath ( )
explicit

Constructs an empty path.

Definition at line 50 of file staticmappath.cpp.

◆ StaticMapPath() [2/5]

StaticMapPath::StaticMapPath ( const QStringList & locations,
const quint8 weight = 5,
const QColor & color = Qt::blue,
const QColor & fillColor = QColor() )
explicit

Constructs a new path.

Parameters
locationsThe path locations in QString
weightThe thickness of the path in pixels
colorThe color of the path
fillColorThe color of filled area

Definition at line 60 of file staticmappath.cpp.

◆ StaticMapPath() [3/5]

StaticMapPath::StaticMapPath ( const KContacts::Address::List & locations,
const quint8 weight = 5,
const QColor & color = Qt::blue,
const QColor & fillColor = QColor() )
explicit

Constructs a new path.

Parameters
locationsThe path locations in KContacts::Address
weightThe thickness of the path in pixels
colorColor of the path
fillColorThe color of filled area

Definition at line 70 of file staticmappath.cpp.

◆ StaticMapPath() [4/5]

StaticMapPath::StaticMapPath ( const QList< KContacts::Geo > & locations,
const quint8 weight = 5,
const QColor & color = Qt::blue,
const QColor & fillColor = QColor() )
explicit

Constructs a new path.

Parameters
locationsThe path locations in KContacts::Geo
weightThe thickness of the path in pixels
colorThe color of the path
fillColorThe color of filled area

Definition at line 80 of file staticmappath.cpp.

◆ StaticMapPath() [5/5]

StaticMapPath::StaticMapPath ( const StaticMapPath & other)

Copy constructor.

Definition at line 55 of file staticmappath.cpp.

◆ ~StaticMapPath()

StaticMapPath::~StaticMapPath ( )

Destructor.

Definition at line 90 of file staticmappath.cpp.

Member Function Documentation

◆ color()

QColor StaticMapPath::color ( ) const
nodiscard

Returns the color of path.

Definition at line 100 of file staticmappath.cpp.

◆ fillColor()

QColor StaticMapPath::fillColor ( ) const
nodiscard

Returns the color of filled area.

Definition at line 115 of file staticmappath.cpp.

◆ isValid()

bool StaticMapPath::isValid ( ) const

Returns whether the path is valid.

This means that path has at least two locations

Definition at line 110 of file staticmappath.cpp.

◆ locationsAddress()

KContacts::Address::List StaticMapPath::locationsAddress ( ) const
nodiscard

Returns locations in KContacts::Address.

Returns empty list if is not defined

Definition at line 138 of file staticmappath.cpp.

◆ locationsGeo()

QList< KContacts::Geo > StaticMapPath::locationsGeo ( ) const
nodiscard

Returns locations in KContacts::Geo.

Returns empty list if is not defined

Definition at line 151 of file staticmappath.cpp.

◆ locationsString()

QStringList StaticMapPath::locationsString ( ) const
nodiscard

Returns locations in QString.

Returns empty list if is not defined

Definition at line 125 of file staticmappath.cpp.

◆ locationType()

StaticMapPath::LocationType StaticMapPath::locationType ( ) const
nodiscard

Location type.

Definition at line 95 of file staticmappath.cpp.

◆ operator=()

StaticMapPath & StaticMapPath::operator= ( const StaticMapPath & other)

Assignment operator.

Definition at line 213 of file staticmappath.cpp.

◆ setColor()

void StaticMapPath::setColor ( const QColor & color)

Sets color of the path.

Parameters
colorColor for path

Definition at line 105 of file staticmappath.cpp.

◆ setFillColor()

void StaticMapPath::setFillColor ( const QColor & color)

Sets color for filled area in path.

Parameters
colorThe color for filled area

Definition at line 120 of file staticmappath.cpp.

◆ setLocations() [1/3]

void StaticMapPath::setLocations ( const KContacts::Address::List & locations)

Sets locations for path.

Parameters
locationsLocations for path in KContacts::Address

Definition at line 143 of file staticmappath.cpp.

◆ setLocations() [2/3]

void StaticMapPath::setLocations ( const QList< KContacts::Geo > & locations)

Sets locations for path.

Parameters
locationsLocations for path in KContacts::Geo

Definition at line 156 of file staticmappath.cpp.

◆ setLocations() [3/3]

void StaticMapPath::setLocations ( const QStringList & locations)

Sets locations for path.

Parameters
locationsLocations for path in QString

Definition at line 130 of file staticmappath.cpp.

◆ setWeight()

void StaticMapPath::setWeight ( const quint8 weight)

Sets weight of the path.

Parameters
weightThe thickness of the path in pixels

Definition at line 208 of file staticmappath.cpp.

◆ toString()

QString StaticMapPath::toString ( ) const
nodiscard

Returns all locations and path preferences in format to URL query.

Definition at line 164 of file staticmappath.cpp.

◆ weight()

quint8 StaticMapPath::weight ( ) const
nodiscard

Returns weight of the path.

Definition at line 203 of file staticmappath.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.