mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 00:20:06 +00:00
Adding MapTime name function
This commit is contained in:
parent
81eb3b1af3
commit
e1ec81e230
3 changed files with 27 additions and 0 deletions
|
|
@ -140,6 +140,7 @@ set(HDR_TYPES source/scwx/qt/types/alert_types.hpp
|
||||||
source/scwx/qt/types/text_event_key.hpp)
|
source/scwx/qt/types/text_event_key.hpp)
|
||||||
set(SRC_TYPES source/scwx/qt/types/alert_types.cpp
|
set(SRC_TYPES source/scwx/qt/types/alert_types.cpp
|
||||||
source/scwx/qt/types/github_types.cpp
|
source/scwx/qt/types/github_types.cpp
|
||||||
|
source/scwx/qt/types/map_types.cpp
|
||||||
source/scwx/qt/types/radar_product_record.cpp
|
source/scwx/qt/types/radar_product_record.cpp
|
||||||
source/scwx/qt/types/text_event_key.cpp)
|
source/scwx/qt/types/text_event_key.cpp)
|
||||||
set(HDR_UI source/scwx/qt/ui/about_dialog.hpp
|
set(HDR_UI source/scwx/qt/ui/about_dialog.hpp
|
||||||
|
|
|
||||||
22
scwx-qt/source/scwx/qt/types/map_types.cpp
Normal file
22
scwx-qt/source/scwx/qt/types/map_types.cpp
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
#include <scwx/qt/types/map_types.hpp>
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
|
||||||
|
namespace scwx
|
||||||
|
{
|
||||||
|
namespace qt
|
||||||
|
{
|
||||||
|
namespace types
|
||||||
|
{
|
||||||
|
|
||||||
|
static const std::unordered_map<MapTime, std::string> mapTimeName_ {
|
||||||
|
{MapTime::Live, "Live"}, {MapTime::Archive, "Archive"}};
|
||||||
|
|
||||||
|
std::string GetMapTimeName(MapTime mapTime)
|
||||||
|
{
|
||||||
|
return mapTimeName_.at(mapTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace types
|
||||||
|
} // namespace qt
|
||||||
|
} // namespace scwx
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace scwx
|
namespace scwx
|
||||||
{
|
{
|
||||||
namespace qt
|
namespace qt
|
||||||
|
|
@ -13,6 +15,8 @@ enum class MapTime
|
||||||
Archive
|
Archive
|
||||||
};
|
};
|
||||||
|
|
||||||
|
std::string GetMapTimeName(MapTime mapTime);
|
||||||
|
|
||||||
} // namespace types
|
} // namespace types
|
||||||
} // namespace qt
|
} // namespace qt
|
||||||
} // namespace scwx
|
} // namespace scwx
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue