mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 03:40:05 +00:00
Location markers part2 clang-format fixes
This commit is contained in:
parent
e62ef3a7f3
commit
cac89129af
9 changed files with 79 additions and 76 deletions
|
|
@ -903,7 +903,7 @@ bool GeoIcons::RunMousePicking(
|
||||||
const QPointF& mouseGlobalPos,
|
const QPointF& mouseGlobalPos,
|
||||||
const glm::vec2& mouseCoords,
|
const glm::vec2& mouseCoords,
|
||||||
const common::Coordinate& /* mouseGeoCoords */,
|
const common::Coordinate& /* mouseGeoCoords */,
|
||||||
std::shared_ptr<types::EventHandler>& eventHandler )
|
std::shared_ptr<types::EventHandler>& eventHandler)
|
||||||
{
|
{
|
||||||
std::unique_lock lock {p->iconMutex_};
|
std::unique_lock lock {p->iconMutex_};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,11 @@ namespace manager
|
||||||
static const std::string logPrefix_ = "scwx::qt::manager::marker_manager";
|
static const std::string logPrefix_ = "scwx::qt::manager::marker_manager";
|
||||||
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
||||||
|
|
||||||
static const std::string kNameName_ = "name";
|
static const std::string kNameName_ = "name";
|
||||||
static const std::string kLatitudeName_ = "latitude";
|
static const std::string kLatitudeName_ = "latitude";
|
||||||
static const std::string kLongitudeName_ = "longitude";
|
static const std::string kLongitudeName_ = "longitude";
|
||||||
static const std::string kIconName_ = "icon";
|
static const std::string kIconName_ = "icon";
|
||||||
static const std::string kIconColorName_ = "icon-color";
|
static const std::string kIconColorName_ = "icon-color";
|
||||||
|
|
||||||
static const std::string defaultIconName = "images/location-marker";
|
static const std::string defaultIconName = "images/location-marker";
|
||||||
|
|
||||||
|
|
@ -68,7 +68,6 @@ public:
|
||||||
class MarkerManager::Impl::MarkerRecord
|
class MarkerManager::Impl::MarkerRecord
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MarkerRecord(const types::MarkerInfo& info) :
|
MarkerRecord(const types::MarkerInfo& info) :
|
||||||
markerInfo_ {info}
|
markerInfo_ {info}
|
||||||
{
|
{
|
||||||
|
|
@ -93,7 +92,6 @@ public:
|
||||||
util::color::ToArgbString(record->markerInfo_.iconColor)}};
|
util::color::ToArgbString(record->markerInfo_.iconColor)}};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
friend MarkerRecord tag_invoke(boost::json::value_to_tag<MarkerRecord>,
|
friend MarkerRecord tag_invoke(boost::json::value_to_tag<MarkerRecord>,
|
||||||
const boost::json::value& jv)
|
const boost::json::value& jv)
|
||||||
{
|
{
|
||||||
|
|
@ -102,7 +100,7 @@ public:
|
||||||
|
|
||||||
const boost::json::object& jo = jv.as_object();
|
const boost::json::object& jo = jv.as_object();
|
||||||
|
|
||||||
std::string iconName = defaultIconName;
|
std::string iconName = defaultIconName;
|
||||||
boost::gil::rgba8_pixel_t iconColor = defaultIconColor;
|
boost::gil::rgba8_pixel_t iconColor = defaultIconColor;
|
||||||
|
|
||||||
if (jo.contains(kIconName_) && jo.at(kIconName_).is_string())
|
if (jo.contains(kIconName_) && jo.at(kIconName_).is_string())
|
||||||
|
|
@ -112,7 +110,8 @@ public:
|
||||||
|
|
||||||
if (jo.contains(kIconColorName_) && jo.at(kIconName_).is_string())
|
if (jo.contains(kIconColorName_) && jo.at(kIconName_).is_string())
|
||||||
{
|
{
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
iconColor = util::color::ToRgba8PixelT(
|
iconColor = util::color::ToRgba8PixelT(
|
||||||
boost::json::value_to<std::string>(jv.at(kIconColorName_)));
|
boost::json::value_to<std::string>(jv.at(kIconColorName_)));
|
||||||
}
|
}
|
||||||
|
|
@ -181,7 +180,6 @@ void MarkerManager::Impl::ReadMarkerSettings()
|
||||||
{
|
{
|
||||||
// For each marker entry
|
// For each marker entry
|
||||||
auto& markerArray = markerJson.as_array();
|
auto& markerArray = markerJson.as_array();
|
||||||
//std::vector<std::string> fileNames {};
|
|
||||||
markerRecords_.reserve(markerArray.size());
|
markerRecords_.reserve(markerArray.size());
|
||||||
idToIndex_.reserve(markerArray.size());
|
idToIndex_.reserve(markerArray.size());
|
||||||
for (auto& markerEntry : markerArray)
|
for (auto& markerEntry : markerArray)
|
||||||
|
|
@ -206,13 +204,13 @@ void MarkerManager::Impl::ReadMarkerSettings()
|
||||||
}
|
}
|
||||||
|
|
||||||
util::TextureAtlas& textureAtlas = util::TextureAtlas::Instance();
|
util::TextureAtlas& textureAtlas = util::TextureAtlas::Instance();
|
||||||
textureAtlas.BuildAtlas(2048, 2048); // Should this code be moved to ResourceManager?
|
textureAtlas.BuildAtlas(
|
||||||
|
2048, 2048); // Should this code be moved to ResourceManager?
|
||||||
|
|
||||||
logger_->debug("{} location marker entries", markerRecords_.size());
|
logger_->debug("{} location marker entries", markerRecords_.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Q_EMIT self_->MarkersUpdated();
|
Q_EMIT self_->MarkersUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -457,7 +455,8 @@ void MarkerManager::add_icon(const std::string& name, bool startup)
|
||||||
if (!startup)
|
if (!startup)
|
||||||
{
|
{
|
||||||
util::TextureAtlas& textureAtlas = util::TextureAtlas::Instance();
|
util::TextureAtlas& textureAtlas = util::TextureAtlas::Instance();
|
||||||
textureAtlas.BuildAtlas(2048, 2048); // Should this code be moved to ResourceManager?
|
textureAtlas.BuildAtlas(
|
||||||
|
2048, 2048); // Should this code be moved to ResourceManager?
|
||||||
Q_EMIT IconAdded(name);
|
Q_EMIT IconAdded(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,11 @@ public:
|
||||||
|
|
||||||
size_t marker_count();
|
size_t marker_count();
|
||||||
std::optional<types::MarkerInfo> get_marker(types::MarkerId id);
|
std::optional<types::MarkerInfo> get_marker(types::MarkerId id);
|
||||||
std::optional<size_t> get_index(types::MarkerId id);
|
std::optional<size_t> get_index(types::MarkerId id);
|
||||||
void set_marker(types::MarkerId id, const types::MarkerInfo& marker);
|
void set_marker(types::MarkerId id, const types::MarkerInfo& marker);
|
||||||
types::MarkerId add_marker(const types::MarkerInfo& marker);
|
types::MarkerId add_marker(const types::MarkerInfo& marker);
|
||||||
void remove_marker(types::MarkerId id);
|
void remove_marker(types::MarkerId id);
|
||||||
void move_marker(size_t from, size_t to);
|
void move_marker(size_t from, size_t to);
|
||||||
|
|
||||||
void add_icon(const std::string& name, bool startup = false);
|
void add_icon(const std::string& name, bool startup = false);
|
||||||
std::optional<types::MarkerIconInfo> get_icon(const std::string& name);
|
std::optional<types::MarkerIconInfo> get_icon(const std::string& name);
|
||||||
|
|
@ -39,7 +39,7 @@ public:
|
||||||
void set_marker_settings_path(const std::string& path);
|
void set_marker_settings_path(const std::string& path);
|
||||||
|
|
||||||
static std::shared_ptr<MarkerManager> Instance();
|
static std::shared_ptr<MarkerManager> Instance();
|
||||||
static const std::string& getDefaultIconName();
|
static const std::string& getDefaultIconName();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void MarkersInitialized(size_t count);
|
void MarkersInitialized(size_t count);
|
||||||
|
|
@ -51,7 +51,6 @@ signals:
|
||||||
void IconsReady();
|
void IconsReady();
|
||||||
void IconAdded(std::string name);
|
void IconAdded(std::string name);
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class Impl;
|
class Impl;
|
||||||
std::unique_ptr<Impl> p;
|
std::unique_ptr<Impl> p;
|
||||||
|
|
|
||||||
|
|
@ -133,7 +133,8 @@ QVariant MarkerModel::data(const QModelIndex& index, int role) const
|
||||||
{
|
{
|
||||||
std::optional<types::MarkerIconInfo> icon =
|
std::optional<types::MarkerIconInfo> icon =
|
||||||
p->markerManager_->get_icon(markerInfo->iconName);
|
p->markerManager_->get_icon(markerInfo->iconName);
|
||||||
if (icon) {
|
if (icon)
|
||||||
|
{
|
||||||
return util::modulateColors(icon->qIcon,
|
return util::modulateColors(icon->qIcon,
|
||||||
QSize(iconSize_, iconSize_),
|
QSize(iconSize_, iconSize_),
|
||||||
QColor(markerInfo->iconColor[0],
|
QColor(markerInfo->iconColor[0],
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ struct MarkerInfo
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
MarkerId id{0};
|
MarkerId id {0};
|
||||||
std::string name;
|
std::string name;
|
||||||
double latitude;
|
double latitude;
|
||||||
double longitude;
|
double longitude;
|
||||||
|
|
@ -39,37 +39,38 @@ struct MarkerInfo
|
||||||
boost::gil::rgba8_pixel_t iconColor;
|
boost::gil::rgba8_pixel_t iconColor;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MarkerIconInfo {
|
struct MarkerIconInfo
|
||||||
|
{
|
||||||
explicit MarkerIconInfo(types::ImageTexture texture,
|
explicit MarkerIconInfo(types::ImageTexture texture,
|
||||||
std::int32_t hotX,
|
std::int32_t hotX,
|
||||||
std::int32_t hotY) :
|
std::int32_t hotY) :
|
||||||
name{types::GetTextureName(texture)},
|
name {types::GetTextureName(texture)},
|
||||||
path{types::GetTexturePath(texture)},
|
path {types::GetTexturePath(texture)},
|
||||||
hotX{hotX},
|
hotX {hotX},
|
||||||
hotY{hotY},
|
hotY {hotY},
|
||||||
qIcon{QIcon(QString::fromStdString(path))},
|
qIcon {QIcon(QString::fromStdString(path))},
|
||||||
image{}
|
image {}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit MarkerIconInfo(const std::string& path,
|
explicit MarkerIconInfo(const std::string& path,
|
||||||
std::int32_t hotX,
|
std::int32_t hotX,
|
||||||
std::int32_t hotY,
|
std::int32_t hotY,
|
||||||
std::shared_ptr<boost::gil::rgba8_image_t> image) :
|
std::shared_ptr<boost::gil::rgba8_image_t> image) :
|
||||||
name{path},
|
name {path},
|
||||||
path{path},
|
path {path},
|
||||||
hotX{hotX},
|
hotX {hotX},
|
||||||
hotY{hotY},
|
hotY {hotY},
|
||||||
qIcon{QIcon(QString::fromStdString(path))},
|
qIcon {QIcon(QString::fromStdString(path))},
|
||||||
image{image}
|
image {image}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string name;
|
std::string name;
|
||||||
std::string path;
|
std::string path;
|
||||||
std::int32_t hotX;
|
std::int32_t hotX;
|
||||||
std::int32_t hotY;
|
std::int32_t hotY;
|
||||||
QIcon qIcon;
|
QIcon qIcon;
|
||||||
std::optional<std::shared_ptr<boost::gil::rgba8_image_t>> image;
|
std::optional<std::shared_ptr<boost::gil::rgba8_image_t>> image;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,14 +46,12 @@ static const std::unordered_map<ImageTexture, TextureInfo> imageTextureInfo_ {
|
||||||
{ImageTexture::LocationMarker,
|
{ImageTexture::LocationMarker,
|
||||||
{"images/location-marker", ":/res/textures/images/location-marker.svg"}},
|
{"images/location-marker", ":/res/textures/images/location-marker.svg"}},
|
||||||
{ImageTexture::LocationPin,
|
{ImageTexture::LocationPin,
|
||||||
{"images/location-pin",
|
{"images/location-pin", ":/res/icons/font-awesome-6/location-pin.svg"}},
|
||||||
":/res/icons/font-awesome-6/location-pin.svg"}},
|
|
||||||
{ImageTexture::LocationStar,
|
{ImageTexture::LocationStar,
|
||||||
{"images/location-star",
|
{"images/location-star",
|
||||||
":/res/icons/font-awesome-6/star-solid-white.svg"}},
|
":/res/icons/font-awesome-6/star-solid-white.svg"}},
|
||||||
{ImageTexture::LocationTent,
|
{ImageTexture::LocationTent,
|
||||||
{"images/location-tent",
|
{"images/location-tent", ":/res/icons/font-awesome-6/tent-solid.svg"}},
|
||||||
":/res/icons/font-awesome-6/tent-solid.svg"}},
|
|
||||||
{ImageTexture::MapboxLogo,
|
{ImageTexture::MapboxLogo,
|
||||||
{"images/mapbox-logo", ":/res/textures/images/mapbox-logo.svg"}},
|
{"images/mapbox-logo", ":/res/textures/images/mapbox-logo.svg"}},
|
||||||
{ImageTexture::MapTilerLogo,
|
{ImageTexture::MapTilerLogo,
|
||||||
|
|
|
||||||
|
|
@ -30,10 +30,7 @@ static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
||||||
class EditMarkerDialog::Impl
|
class EditMarkerDialog::Impl
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Impl(EditMarkerDialog* self) :
|
explicit Impl(EditMarkerDialog* self) : self_ {self} {}
|
||||||
self_{self}
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void show_color_dialog();
|
void show_color_dialog();
|
||||||
void show_icon_file_dialog();
|
void show_icon_file_dialog();
|
||||||
|
|
@ -46,15 +43,15 @@ public:
|
||||||
void handle_rejected();
|
void handle_rejected();
|
||||||
|
|
||||||
EditMarkerDialog* self_;
|
EditMarkerDialog* self_;
|
||||||
QPushButton* deleteButton_;
|
QPushButton* deleteButton_;
|
||||||
QIcon get_colored_icon(const types::MarkerIconInfo& marker,
|
QIcon get_colored_icon(const types::MarkerIconInfo& marker,
|
||||||
const std::string& color);
|
const std::string& color);
|
||||||
|
|
||||||
std::shared_ptr<manager::MarkerManager> markerManager_ =
|
std::shared_ptr<manager::MarkerManager> markerManager_ =
|
||||||
manager::MarkerManager::Instance();
|
manager::MarkerManager::Instance();
|
||||||
types::MarkerId editId_;
|
types::MarkerId editId_;
|
||||||
bool adding_;
|
bool adding_;
|
||||||
std::string setIconOnAdded_{""};
|
std::string setIconOnAdded_ {""};
|
||||||
};
|
};
|
||||||
|
|
||||||
QIcon EditMarkerDialog::Impl::get_colored_icon(
|
QIcon EditMarkerDialog::Impl::get_colored_icon(
|
||||||
|
|
@ -66,9 +63,9 @@ QIcon EditMarkerDialog::Impl::get_colored_icon(
|
||||||
}
|
}
|
||||||
|
|
||||||
EditMarkerDialog::EditMarkerDialog(QWidget* parent) :
|
EditMarkerDialog::EditMarkerDialog(QWidget* parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
p {std::make_unique<Impl>(this)},
|
p {std::make_unique<Impl>(this)},
|
||||||
ui(new Ui::EditMarkerDialog)
|
ui(new Ui::EditMarkerDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
|
@ -98,7 +95,7 @@ void EditMarkerDialog::setup(double latitude, double longitude)
|
||||||
// By default use foreground color as marker color, mainly so the icons
|
// By default use foreground color as marker color, mainly so the icons
|
||||||
// are vissable in the dropdown menu.
|
// are vissable in the dropdown menu.
|
||||||
QColor color = QWidget::palette().color(QWidget::foregroundRole());
|
QColor color = QWidget::palette().color(QWidget::foregroundRole());
|
||||||
p->editId_ = p->markerManager_->add_marker(types::MarkerInfo(
|
p->editId_ = p->markerManager_->add_marker(types::MarkerInfo(
|
||||||
"",
|
"",
|
||||||
latitude,
|
latitude,
|
||||||
longitude,
|
longitude,
|
||||||
|
|
@ -114,8 +111,7 @@ void EditMarkerDialog::setup(double latitude, double longitude)
|
||||||
|
|
||||||
void EditMarkerDialog::setup(types::MarkerId id)
|
void EditMarkerDialog::setup(types::MarkerId id)
|
||||||
{
|
{
|
||||||
std::optional<types::MarkerInfo> marker =
|
std::optional<types::MarkerInfo> marker = p->markerManager_->get_marker(id);
|
||||||
p->markerManager_->get_marker(id);
|
|
||||||
if (!marker)
|
if (!marker)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
@ -143,7 +139,7 @@ void EditMarkerDialog::setup(types::MarkerId id)
|
||||||
|
|
||||||
types::MarkerInfo EditMarkerDialog::get_marker_info() const
|
types::MarkerInfo EditMarkerDialog::get_marker_info() const
|
||||||
{
|
{
|
||||||
QString colorName = ui->iconColorLineEdit->text();
|
QString colorName = ui->iconColorLineEdit->text();
|
||||||
boost::gil::rgba8_pixel_t color =
|
boost::gil::rgba8_pixel_t color =
|
||||||
util::color::ToRgba8PixelT(colorName.toStdString());
|
util::color::ToRgba8PixelT(colorName.toStdString());
|
||||||
|
|
||||||
|
|
@ -270,7 +266,6 @@ void EditMarkerDialog::Impl::set_icon_color(const std::string& color)
|
||||||
|
|
||||||
auto* iconComboBox = self_->ui->iconComboBox;
|
auto* iconComboBox = self_->ui->iconComboBox;
|
||||||
|
|
||||||
|
|
||||||
self_->ui->iconComboBox->clear();
|
self_->ui->iconComboBox->clear();
|
||||||
for (auto& markerIcon : markerManager_->get_icons())
|
for (auto& markerIcon : markerManager_->get_icons())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -32,10 +32,9 @@ public:
|
||||||
private:
|
private:
|
||||||
class Impl;
|
class Impl;
|
||||||
std::unique_ptr<Impl> p;
|
std::unique_ptr<Impl> p;
|
||||||
Ui::EditMarkerDialog* ui;
|
Ui::EditMarkerDialog* ui;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
} // namespace ui
|
} // namespace ui
|
||||||
} // namespace qt
|
} // namespace qt
|
||||||
} // namespace scwx
|
} // namespace scwx
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@
|
||||||
#include <condition_variable>
|
#include <condition_variable>
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
|
|
||||||
namespace scwx
|
namespace scwx
|
||||||
{
|
{
|
||||||
namespace qt
|
namespace qt
|
||||||
|
|
@ -37,7 +36,6 @@ static const boost::gil::rgba8_pixel_t defaultIconColor =
|
||||||
util::color::ToRgba8PixelT("#ffff0000");
|
util::color::ToRgba8PixelT("#ffff0000");
|
||||||
static const std::string defaultIconName = "images/location-marker";
|
static const std::string defaultIconName = "images/location-marker";
|
||||||
|
|
||||||
|
|
||||||
void CompareFiles(const std::string& file1, const std::string& file2)
|
void CompareFiles(const std::string& file1, const std::string& file2)
|
||||||
{
|
{
|
||||||
std::ifstream ifs1 {file1};
|
std::ifstream ifs1 {file1};
|
||||||
|
|
@ -57,7 +55,8 @@ void CopyFile(const std::string& from, const std::string& to)
|
||||||
CompareFiles(from, to);
|
CompareFiles(from, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
using TestFunction = void (std::shared_ptr<manager::MarkerManager>, MarkerModel &);
|
using TestFunction = void(std::shared_ptr<manager::MarkerManager>,
|
||||||
|
MarkerModel&);
|
||||||
|
|
||||||
void RunTest(const std::string& filename, TestFunction testFunction)
|
void RunTest(const std::string& filename, TestFunction testFunction)
|
||||||
{
|
{
|
||||||
|
|
@ -126,7 +125,10 @@ TEST(MarkerModelTest, AddRemove)
|
||||||
|
|
||||||
RunTest(ONE_MARKERS_FILE,
|
RunTest(ONE_MARKERS_FILE,
|
||||||
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel&)
|
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel&)
|
||||||
{ manager->add_marker(types::MarkerInfo("Null", 0, 0, defaultIconName, defaultIconColor)); });
|
{
|
||||||
|
manager->add_marker(types::MarkerInfo(
|
||||||
|
"Null", 0, 0, defaultIconName, defaultIconColor));
|
||||||
|
});
|
||||||
RunTest(
|
RunTest(
|
||||||
EMPTY_MARKERS_FILE,
|
EMPTY_MARKERS_FILE,
|
||||||
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel& model)
|
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel& model)
|
||||||
|
|
@ -150,11 +152,16 @@ TEST(MarkerModelTest, AddFive)
|
||||||
RunTest(FIVE_MARKERS_FILE,
|
RunTest(FIVE_MARKERS_FILE,
|
||||||
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel&)
|
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel&)
|
||||||
{
|
{
|
||||||
manager->add_marker(types::MarkerInfo("Null", 0, 0, defaultIconName, defaultIconColor));
|
manager->add_marker(types::MarkerInfo(
|
||||||
manager->add_marker(types::MarkerInfo("North", 90, 0, defaultIconName, defaultIconColor));
|
"Null", 0, 0, defaultIconName, defaultIconColor));
|
||||||
manager->add_marker(types::MarkerInfo("South", -90, 0, defaultIconName, defaultIconColor));
|
manager->add_marker(types::MarkerInfo(
|
||||||
manager->add_marker(types::MarkerInfo("East", 0, 90, defaultIconName, defaultIconColor));
|
"North", 90, 0, defaultIconName, defaultIconColor));
|
||||||
manager->add_marker(types::MarkerInfo("West", 0, -90, defaultIconName, defaultIconColor));
|
manager->add_marker(types::MarkerInfo(
|
||||||
|
"South", -90, 0, defaultIconName, defaultIconColor));
|
||||||
|
manager->add_marker(types::MarkerInfo(
|
||||||
|
"East", 0, 90, defaultIconName, defaultIconColor));
|
||||||
|
manager->add_marker(types::MarkerInfo(
|
||||||
|
"West", 0, -90, defaultIconName, defaultIconColor));
|
||||||
});
|
});
|
||||||
|
|
||||||
std::filesystem::remove(TEMP_MARKERS_FILE);
|
std::filesystem::remove(TEMP_MARKERS_FILE);
|
||||||
|
|
@ -168,10 +175,14 @@ TEST(MarkerModelTest, AddFour)
|
||||||
RunTest(FIVE_MARKERS_FILE,
|
RunTest(FIVE_MARKERS_FILE,
|
||||||
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel&)
|
[](std::shared_ptr<manager::MarkerManager> manager, MarkerModel&)
|
||||||
{
|
{
|
||||||
manager->add_marker(types::MarkerInfo("North", 90, 0, defaultIconName, defaultIconColor));
|
manager->add_marker(types::MarkerInfo(
|
||||||
manager->add_marker(types::MarkerInfo("South", -90, 0, defaultIconName, defaultIconColor));
|
"North", 90, 0, defaultIconName, defaultIconColor));
|
||||||
manager->add_marker(types::MarkerInfo("East", 0, 90, defaultIconName, defaultIconColor));
|
manager->add_marker(types::MarkerInfo(
|
||||||
manager->add_marker(types::MarkerInfo("West", 0, -90, defaultIconName, defaultIconColor));
|
"South", -90, 0, defaultIconName, defaultIconColor));
|
||||||
|
manager->add_marker(types::MarkerInfo(
|
||||||
|
"East", 0, 90, defaultIconName, defaultIconColor));
|
||||||
|
manager->add_marker(types::MarkerInfo(
|
||||||
|
"West", 0, -90, defaultIconName, defaultIconColor));
|
||||||
});
|
});
|
||||||
|
|
||||||
std::filesystem::remove(TEMP_MARKERS_FILE);
|
std::filesystem::remove(TEMP_MARKERS_FILE);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue