mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 16:00:08 +00:00
Creating Radar Product Model
This commit is contained in:
parent
8a450a76bb
commit
8abee4cda1
3 changed files with 64 additions and 0 deletions
|
|
@ -73,6 +73,8 @@ set(SRC_MAP source/scwx/qt/map/color_table_layer.cpp
|
|||
source/scwx/qt/map/overlay_layer.cpp
|
||||
source/scwx/qt/map/radar_product_layer.cpp
|
||||
source/scwx/qt/map/radar_range_layer.cpp)
|
||||
set(HDR_MODEL source/scwx/qt/model/radar_product_model.hpp)
|
||||
set(SRC_MODEL source/scwx/qt/model/radar_product_model.cpp)
|
||||
set(HDR_REQUEST source/scwx/qt/request/nexrad_file_request.hpp)
|
||||
set(SRC_REQUEST source/scwx/qt/request/nexrad_file_request.cpp)
|
||||
set(HDR_SETTINGS source/scwx/qt/settings/general_settings.hpp
|
||||
|
|
@ -140,6 +142,8 @@ set(PROJECT_SOURCES ${HDR_MAIN}
|
|||
${UI_MAIN}
|
||||
${HDR_MAP}
|
||||
${SRC_MAP}
|
||||
${HDR_MODEL}
|
||||
${SRC_MODEL}
|
||||
${HDR_REQUEST}
|
||||
${SRC_REQUEST}
|
||||
${HDR_SETTINGS}
|
||||
|
|
@ -172,6 +176,8 @@ source_group("Source Files\\manager" FILES ${SRC_MANAGER})
|
|||
source_group("UI Files\\main" FILES ${UI_MAIN})
|
||||
source_group("Header Files\\map" FILES ${HDR_MAP})
|
||||
source_group("Source Files\\map" FILES ${SRC_MAP})
|
||||
source_group("Header Files\\model" FILES ${HDR_MODEL})
|
||||
source_group("Source Files\\model" FILES ${SRC_MODEL})
|
||||
source_group("Header Files\\request" FILES ${HDR_REQUEST})
|
||||
source_group("Source Files\\request" FILES ${SRC_REQUEST})
|
||||
source_group("Header Files\\settings" FILES ${HDR_SETTINGS})
|
||||
|
|
|
|||
30
scwx-qt/source/scwx/qt/model/radar_product_model.cpp
Normal file
30
scwx-qt/source/scwx/qt/model/radar_product_model.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <scwx/qt/model/radar_product_model.hpp>
|
||||
#include <scwx/util/logger.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace model
|
||||
{
|
||||
|
||||
static const std::string logPrefix_ = "scwx::qt::model::radar_product_model";
|
||||
static const auto logger_ = scwx::util::Logger::Create(logPrefix_);
|
||||
|
||||
class RadarProductModelImpl
|
||||
{
|
||||
public:
|
||||
explicit RadarProductModelImpl() {}
|
||||
|
||||
~RadarProductModelImpl() {}
|
||||
};
|
||||
|
||||
RadarProductModel::RadarProductModel(QObject* parent) :
|
||||
QAbstractTableModel(parent), p(std::make_unique<RadarProductModelImpl>())
|
||||
{
|
||||
}
|
||||
RadarProductModel::~RadarProductModel() = default;
|
||||
|
||||
} // namespace model
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
28
scwx-qt/source/scwx/qt/model/radar_product_model.hpp
Normal file
28
scwx-qt/source/scwx/qt/model/radar_product_model.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QAbstractTableModel>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace model
|
||||
{
|
||||
|
||||
class RadarProductModelImpl;
|
||||
|
||||
class RadarProductModel : QAbstractTableModel
|
||||
{
|
||||
public:
|
||||
explicit RadarProductModel(QObject* parent = nullptr);
|
||||
~RadarProductModel();
|
||||
|
||||
private:
|
||||
std::unique_ptr<RadarProductModelImpl> p;
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue