KGAPI2::StaticMapUrl
#include <staticmapurl.h>
Public Member Functions | |
StaticMapUrl () | |
StaticMapUrl (const KContacts::Address &address, const QSize &size, quint32 zoom, bool sensor) | |
StaticMapUrl (const KContacts::Geo &geo, const QSize &size, quint32 zoom, bool sensor) | |
StaticMapUrl (const QString &location, const QSize &size, quint32 zoom, bool sensor) | |
StaticMapUrl (const StaticMapUrl &other) | |
virtual | ~StaticMapUrl () |
ImageFormat | format () const |
bool | isValid () const |
KContacts::Address | locationAddress () const |
KContacts::Geo | locationGeo () const |
QString | locationString () const |
LocationType | locationType () const |
MapType | mapType () const |
QList< StaticMapMarker > | markers () const |
StaticMapUrl & | operator= (const StaticMapUrl &other) |
QList< StaticMapPath > | paths () const |
Scale | scale () const |
bool | sensorUsed () const |
void | setFormat (const ImageFormat format) |
void | setLocation (const KContacts::Address &address) |
void | setLocation (const KContacts::Geo &geo) |
void | setLocation (const QString &location) |
void | setMapType (const MapType type) |
void | setMarker (const StaticMapMarker &marker) |
void | setMarkers (const QList< StaticMapMarker > &markers) |
void | setPath (const StaticMapPath &path) |
void | setPaths (const QList< StaticMapPath > &paths) |
void | setScale (const Scale scale) |
void | setSensorUsed (const bool sensor) |
void | setSize (const QSize &size) |
void | setVisibleLocation (const KContacts::Address &address) |
void | setVisibleLocation (const KContacts::Geo &geo) |
void | setVisibleLocation (const QString &location) |
void | setZoomLevel (const quint32 zoom) |
QSize | size () const |
QUrl | url () const |
KContacts::Address | visibleLocationAddress () const |
KContacts::Geo | visibleLocationGeo () const |
QString | visibleLocationString () const |
LocationType | visibleLocationType () const |
qint8 | zoomLevel () const |
Detailed Description
A class to build a URL from StaticMapMarkers and StaticMapPaths to fetch a map tile.
- Since
- 0.4
Definition at line 29 of file staticmapurl.h.
Member Enumeration Documentation
◆ ImageFormat
enum KGAPI2::StaticMapUrl::ImageFormat |
Definition at line 34 of file staticmapurl.h.
◆ LocationType
enum KGAPI2::StaticMapUrl::LocationType |
Definition at line 32 of file staticmapurl.h.
◆ MapType
enum KGAPI2::StaticMapUrl::MapType |
Definition at line 36 of file staticmapurl.h.
◆ Scale
enum KGAPI2::StaticMapUrl::Scale |
Definition at line 38 of file staticmapurl.h.
Constructor & Destructor Documentation
◆ StaticMapUrl() [1/5]
|
explicit |
Constructs an empty StaticMapUrl.
Definition at line 79 of file staticmapurl.cpp.
◆ StaticMapUrl() [2/5]
StaticMapUrl::StaticMapUrl | ( | const QString & | location, |
const QSize & | size, | ||
quint32 | zoom, | ||
bool | sensor ) |
Constructs a new StaticMapUrl.
- Parameters
-
location Location of map center in QString size Requested size of the map image zoom Zoom level of map sensor Sensor specifies whether the application requesting the static map is using a sensor to determine the user's location.
Definition at line 104 of file staticmapurl.cpp.
◆ StaticMapUrl() [3/5]
StaticMapUrl::StaticMapUrl | ( | const KContacts::Address & | address, |
const QSize & | size, | ||
quint32 | zoom, | ||
bool | sensor ) |
Constructs a new StaticMapUrl.
- Parameters
-
address Location of map center in KContacts::Address size Requested size of the map image zoom Zoom level of map sensor Sensor specifies whether the application requesting the static map is using a sensor to determine the user's location.
Definition at line 113 of file staticmapurl.cpp.
◆ StaticMapUrl() [4/5]
StaticMapUrl::StaticMapUrl | ( | const KContacts::Geo & | geo, |
const QSize & | size, | ||
quint32 | zoom, | ||
bool | sensor ) |
Constructs a new StaticMapUrl.
- Parameters
-
geo Location of map center in KContacts::Geo size Requested size of the map image zoom Zoom level of map sensor Sensor specifies whether the application requesting the static map is using a sensor to determine the user's location.
Definition at line 122 of file staticmapurl.cpp.
◆ StaticMapUrl() [5/5]
StaticMapUrl::StaticMapUrl | ( | const StaticMapUrl & | other | ) |
Copy constructor.
Definition at line 84 of file staticmapurl.cpp.
◆ ~StaticMapUrl()
|
virtual |
Destructor.
Definition at line 89 of file staticmapurl.cpp.
Member Function Documentation
◆ format()
|
nodiscard |
Returns map image format.
Definition at line 136 of file staticmapurl.cpp.
◆ isValid()
bool StaticMapUrl::isValid | ( | ) | const |
Returns whether map url is valid.
Definition at line 146 of file staticmapurl.cpp.
◆ locationAddress()
|
nodiscard |
Returns map center in KContacts::Address.
Returns empty KContacts::Address if location is not defined in KContacts::Address
Definition at line 187 of file staticmapurl.cpp.
◆ locationGeo()
|
nodiscard |
Returns map center in KContacts::Geo.
Returns invalid KContacts::Geo if location is not defined in KContacts::Geo
Definition at line 201 of file staticmapurl.cpp.
◆ locationString()
|
nodiscard |
Returns map center in QString.
Returns empty QString if location is not defined in QString
Definition at line 173 of file staticmapurl.cpp.
◆ locationType()
|
nodiscard |
Returns in which format the location is stored.
Definition at line 131 of file staticmapurl.cpp.
◆ mapType()
|
nodiscard |
Returns type of map.
Definition at line 214 of file staticmapurl.cpp.
◆ markers()
|
nodiscard |
Returns list of markers.
Returns empty QList if no marker were added
Definition at line 224 of file staticmapurl.cpp.
◆ operator=()
StaticMapUrl & StaticMapUrl::operator= | ( | const StaticMapUrl & | other | ) |
Assignment operator.
Definition at line 94 of file staticmapurl.cpp.
◆ paths()
|
nodiscard |
Returns list paths.
Returns empty QList if no path were added
Definition at line 241 of file staticmapurl.cpp.
◆ scale()
|
nodiscard |
Returns scale of map.
Definition at line 268 of file staticmapurl.cpp.
◆ sensorUsed()
|
nodiscard |
Returns whether the application uses a sensor to determine user's location.
Definition at line 278 of file staticmapurl.cpp.
◆ setFormat()
void StaticMapUrl::setFormat | ( | const ImageFormat | format | ) |
Sets map image format (default is PNG)
- Parameters
-
format
Definition at line 141 of file staticmapurl.cpp.
◆ setLocation() [1/3]
void StaticMapUrl::setLocation | ( | const KContacts::Address & | address | ) |
Defines center of the map.
- Parameters
-
address Location (required when no markers are present) of center of the map in KContacts::Address
Definition at line 192 of file staticmapurl.cpp.
◆ setLocation() [2/3]
void StaticMapUrl::setLocation | ( | const KContacts::Geo & | geo | ) |
Defines center of the map.
- Parameters
-
geo Location (required when no markers are present) of center of the map in KContacts::Geo
Definition at line 206 of file staticmapurl.cpp.
◆ setLocation() [3/3]
void StaticMapUrl::setLocation | ( | const QString & | location | ) |
Defines center of the map.
Definition at line 178 of file staticmapurl.cpp.
◆ setMapType()
void StaticMapUrl::setMapType | ( | const MapType | type | ) |
Sets type of map (roadmap by default)
- Parameters
-
type
Definition at line 219 of file staticmapurl.cpp.
◆ setMarker()
void StaticMapUrl::setMarker | ( | const StaticMapMarker & | marker | ) |
◆ setMarkers()
void StaticMapUrl::setMarkers | ( | const QList< StaticMapMarker > & | markers | ) |
◆ setPath()
void StaticMapUrl::setPath | ( | const StaticMapPath & | path | ) |
◆ setPaths()
void StaticMapUrl::setPaths | ( | const QList< StaticMapPath > & | paths | ) |
◆ setScale()
void StaticMapUrl::setScale | ( | const Scale | scale | ) |
◆ setSensorUsed()
void StaticMapUrl::setSensorUsed | ( | const bool | sensor | ) |
Sets whether the application uses a sensor to determine the user's location.
- Parameters
-
sensor
Definition at line 283 of file staticmapurl.cpp.
◆ setSize()
void StaticMapUrl::setSize | ( | const QSize & | size | ) |
Sets size of requested map tile.
- Parameters
-
size Maximum size is 640x640
Definition at line 263 of file staticmapurl.cpp.
◆ setVisibleLocation() [1/3]
void StaticMapUrl::setVisibleLocation | ( | const KContacts::Address & | address | ) |
Sets visible location.
You can use this instead of using center and zoom parameters.
Visible specifies location that should remain visible on the map, though no markers or other indicators will be displayed. Use this parameter to ensure that certain features or map location are shown on the static map.
- Parameters
-
address
Definition at line 307 of file staticmapurl.cpp.
◆ setVisibleLocation() [2/3]
void StaticMapUrl::setVisibleLocation | ( | const KContacts::Geo & | geo | ) |
Sets visible location.
You can use this instead of using center and zoom parameters.
Visible specifies location that should remain visible on the map, though no markers or other indicators will be displayed. Use this parameter to ensure that certain features or map location are shown on the static map.
- Parameters
-
geo
Definition at line 321 of file staticmapurl.cpp.
◆ setVisibleLocation() [3/3]
void StaticMapUrl::setVisibleLocation | ( | const QString & | location | ) |
Sets visible location.
You can use this instead of using center and zoom parameters.
Specifies location that should remain visible on the map, though no markers or other indicators will be displayed. Use this parameter to ensure that certain features or map location are shown on the static map.
- Parameters
-
location
Definition at line 293 of file staticmapurl.cpp.
◆ setZoomLevel()
void StaticMapUrl::setZoomLevel | ( | const quint32 | zoom | ) |
Sets zoom level of the map.
- Parameters
-
zoom Zoom parameter can be in range 0 to 21 where 21 is maximum zoom level.
Definition at line 339 of file staticmapurl.cpp.
◆ size()
|
nodiscard |
Returns size of map tile.
Definition at line 258 of file staticmapurl.cpp.
◆ url()
|
nodiscard |
Returns constructed url from all defined parameters.
Definition at line 344 of file staticmapurl.cpp.
◆ visibleLocationAddress()
|
nodiscard |
Returns visible area in KContacts::Address.
Returns empty KContacts::Address if visible area is not defined in KContacts::Address
Definition at line 302 of file staticmapurl.cpp.
◆ visibleLocationGeo()
|
nodiscard |
Returns visible area in KContacts::Geo.
Returns empty KContacts::Geo if visible area is not defined in KContacts::Geo
Definition at line 316 of file staticmapurl.cpp.
◆ visibleLocationString()
|
nodiscard |
Returns visible area in QString.
Returns empty QString if visible area is not defined in QString
Definition at line 288 of file staticmapurl.cpp.
◆ visibleLocationType()
|
nodiscard |
Returns type of visible location.
Definition at line 329 of file staticmapurl.cpp.
◆ zoomLevel()
|
nodiscard |
Returns zoom level of map.
Returns -1 if zoom level is not defined
Definition at line 334 of file staticmapurl.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 4 2024 12:05:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.