-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore and reorganise style parameters
- Loading branch information
Showing
51 changed files
with
2,141 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (C) 2023 MapLibre contributors | ||
|
||
// SPDX-License-Identifier: BSD-2-Clause | ||
|
||
#include "image_style_change_p.hpp" | ||
|
||
#include <QMapLibre/Map> | ||
|
||
namespace QMapLibre { | ||
|
||
// StyleAddImage | ||
StyleAddImage::StyleAddImage(const StyleParameter *parameter) | ||
: m_id(parameter->property("id").toString()), | ||
m_sprite(QImage(parameter->property("sprite").toString())) {} | ||
|
||
void StyleAddImage::apply(Map *map) { | ||
map->addImage(m_id, m_sprite); | ||
} | ||
|
||
// StyleRemoveImage | ||
StyleRemoveImage::StyleRemoveImage(QString id) | ||
: m_id(std::move(id)) {} | ||
|
||
StyleRemoveImage::StyleRemoveImage(const StyleParameter *parameter) | ||
: m_id(parameter->property("id").toString()) {} | ||
|
||
void StyleRemoveImage::apply(Map *map) { | ||
map->removeImage(m_id); | ||
} | ||
|
||
} // namespace QMapLibre |
Oops, something went wrong.