A base class to pass style parameters to Map.
More...
|
void | updateNotify () |
| Notify that the style parameter has been updated.
|
|
|
| StyleParameter (QObject *parent=nullptr) |
| Default constructor.
|
|
bool | operator== (const StyleParameter &other) const |
| Comparison operator.
|
|
bool | isReady () const |
| Check if the style parameter is ready.
|
|
bool | hasProperty (const char *propertyName) const |
| Check for property existence.
|
|
void | updateProperty (const char *propertyName, const QVariant &value) |
| Update property value.
|
|
QVariantMap | toVariantMap () const |
| Return a map of all properties.
|
|
QString | styleId () const |
| Return style identifier.
|
|
void | setStyleId (const QString &id) |
| Set style identifier.
|
|
|
const int | m_initialPropertyCount = staticMetaObject.propertyCount() |
| Number of properties in the base class.
|
|
bool | m_ready {} |
| Ready status of the style parameter.
|
|
QString | m_styleId |
| Style identifier of the parameter.
|
|
A base class to pass style parameters to Map.
Should usually not be used directly, but rather through one of its subclasses such as SourceParameter or LayerParameter.
◆ hasProperty()
bool QMapLibre::StyleParameter::hasProperty |
( |
const char * | propertyName | ) |
const |
Check for property existence.
- Parameters
-
propertyName | Name of the property to check. |
- Returns
true
if the property exists, false
otherwise.
◆ isReady()
bool QMapLibre::StyleParameter::isReady |
( |
| ) |
const |
|
inlinenodiscard |
Check if the style parameter is ready.
- Returns
true
if the style parameter is ready, false
otherwise.
◆ ready
Signal emitted when the style parameter is ready.
- Parameters
-
parameter | The style parameter that is ready. |
◆ setStyleId()
void QMapLibre::StyleParameter::setStyleId |
( |
const QString & | id | ) |
|
Set style identifier.
- Parameters
-
id | The style identifier to set. |
◆ styleId()
QString QMapLibre::StyleParameter::styleId |
( |
| ) |
const |
|
nodiscard |
Return style identifier.
- Returns
- A style identifier as
QString
.
◆ toVariantMap()
QVariantMap QMapLibre::StyleParameter::toVariantMap |
( |
| ) |
const |
|
nodiscard |
Return a map of all properties.
- Returns
- A map of all properties as
QVariantMap
.
◆ updated
Signal emitted when the style parameter is updated.
- Parameters
-
parameter | The style parameter that is updated. |
◆ updateProperty()
void QMapLibre::StyleParameter::updateProperty |
( |
const char * | propertyName, |
|
|
const QVariant & | value ) |
Update property value.
- Parameters
-
propertyName | Name of the property to update. |
value | The new value of the property. |