RadarProductView does not need QMapboxGL

This commit is contained in:
Dan Paulat 2021-10-31 08:58:49 -05:00
parent 7747e869ba
commit d7e60a0d8c
7 changed files with 25 additions and 86 deletions

View file

@ -62,22 +62,6 @@
<element xmi:type="uml:Operation" href="scwx.uml#_Ra89oC9-EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_RbGHkS9-EeyWgvKLGfX-VA"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_xEHjwC9-EeyWgvKLGfX-VA" type="Operation_ClassOperationLabel">
<element xmi:type="uml:Operation" href="scwx.uml#_xD_A4C9-EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_xEHjwS9-EeyWgvKLGfX-VA"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_1nCVUC9-EeyWgvKLGfX-VA" type="Operation_ClassOperationLabel">
<element xmi:type="uml:Operation" href="scwx.uml#_1m6ZgC9-EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_1nCVUS9-EeyWgvKLGfX-VA"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_7lxkoC9-EeyWgvKLGfX-VA" type="Operation_ClassOperationLabel">
<element xmi:type="uml:Operation" href="scwx.uml#_7lnzoC9-EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_7lxkoS9-EeyWgvKLGfX-VA"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_8_nscC9-EeyWgvKLGfX-VA" type="Operation_ClassOperationLabel">
<element xmi:type="uml:Operation" href="scwx.uml#_8_fJkC9-EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_8_nscS9-EeyWgvKLGfX-VA"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_91ztkC9-EeyWgvKLGfX-VA" type="Operation_ClassOperationLabel">
<element xmi:type="uml:Operation" href="scwx.uml#_91rKsC9-EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_910UoC9-EeyWgvKLGfX-VA"/>
@ -90,6 +74,10 @@
<element xmi:type="uml:Operation" href="scwx.uml#__jCEYC9-EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="__jMccS9-EeyWgvKLGfX-VA"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_c8L5wDqCEey_nYE4G1Fl-w" type="Operation_ClassOperationLabel">
<element xmi:type="uml:Operation" href="scwx.uml#_c77bEDqCEey_nYE4G1Fl-w"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_c8L5wTqCEey_nYE4G1Fl-w"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_BfOrUC9_EeyWgvKLGfX-VA" type="Operation_ClassOperationLabel">
<element xmi:type="uml:Operation" href="scwx.uml#_BfETQC9_EeyWgvKLGfX-VA"/>
<layoutConstraint xmi:type="notation:Location" xmi:id="_BfOrUS9_EeyWgvKLGfX-VA"/>
@ -110,7 +98,7 @@
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yt5RoQKhEeyIXMJVZXHk6Q"/>
</children>
<element xmi:type="uml:Class" href="scwx.uml#_Yt2OQAKhEeyIXMJVZXHk6Q"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yt4qgQKhEeyIXMJVZXHk6Q" x="480" y="200"/>
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yt4qgQKhEeyIXMJVZXHk6Q" x="480" y="200" height="181"/>
</children>
<children xmi:type="notation:Shape" xmi:id="_a0fKoAKhEeyIXMJVZXHk6Q" type="Class_Shape">
<children xmi:type="notation:DecorationNode" xmi:id="_a0fKogKhEeyIXMJVZXHk6Q" type="Class_NameLabel"/>

View file

@ -52,33 +52,6 @@
<packagedElement xmi:type="uml:Class" xmi:id="_Yt2OQAKhEeyIXMJVZXHk6Q" name="RadarProductView">
<ownedOperation xmi:type="uml:Operation" xmi:id="_Ra89oC9-EeyWgvKLGfX-VA" name="RadarView">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_fn3IQC9-EeyWgvKLGfX-VA" type="_UwnjsAKhEeyIXMJVZXHk6Q"/>
<ownedParameter xmi:type="uml:Parameter" xmi:id="_rTMG8C9-EeyWgvKLGfX-VA">
<type xmi:type="uml:Class" href="QMapbox.uml#_nmyGoC9-EeyWgvKLGfX-VA"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_xD_A4C9-EeyWgvKLGfX-VA" name="bearing">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_zQLLoC9-EeyWgvKLGfX-VA" direction="return">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_1m6ZgC9-EeyWgvKLGfX-VA" name="scale">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_34s18C9-EeyWgvKLGfX-VA" direction="return">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_7lnzoC9-EeyWgvKLGfX-VA" name="data_moments8">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_YqZKYC9_EeyWgvKLGfX-VA" direction="return">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_hkT78C-AEeyWgvKLGfX-VA"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_hkrIUC-AEeyWgvKLGfX-VA" value="*"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_8_fJkC9-EeyWgvKLGfX-VA" name="data_moments16">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_ckm9MC9_EeyWgvKLGfX-VA" direction="return">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
<lowerValue xmi:type="uml:LiteralInteger" xmi:id="_f8PK4C-AEeyWgvKLGfX-VA"/>
<upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_f8lJIC-AEeyWgvKLGfX-VA" value="*"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_91rKsC9-EeyWgvKLGfX-VA" name="vertices">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_cVaOIC-AEeyWgvKLGfX-VA" direction="return">
@ -94,6 +67,17 @@
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="__jCEYC9-EeyWgvKLGfX-VA" name="Initialize"/>
<ownedOperation xmi:type="uml:Operation" xmi:id="_c77bEDqCEey_nYE4G1Fl-w" name="GetMomentData">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_kEgAQDqCEey_nYE4G1Fl-w" direction="return">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
</ownedParameter>
<ownedParameter xmi:type="uml:Parameter" xmi:id="_qfEP8DqCEey_nYE4G1Fl-w" direction="return">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
</ownedParameter>
<ownedParameter xmi:type="uml:Parameter" xmi:id="_rf4zwDqCEey_nYE4G1Fl-w" direction="return">
<type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
</ownedParameter>
</ownedOperation>
<ownedOperation xmi:type="uml:Operation" xmi:id="_BfETQC9_EeyWgvKLGfX-VA" name="LoadColorTable">
<ownedParameter xmi:type="uml:Parameter" xmi:id="_ZiBNADQAEeyGO_jIbsSKUw" type="_8fCdAC-AEeyWgvKLGfX-VA"/>
</ownedOperation>
@ -144,6 +128,6 @@
<C_Cpp:CppRoot xmi:id="_AdZxAC92EeyWgvKLGfX-VA" base_package="_8VbnMAKgEeyIXMJVZXHk6Q"/>
<C_Cpp:Ptr xmi:id="__CcVQC99EeyWgvKLGfX-VA" base_parameter="_9metkC99EeyWgvKLGfX-VA"/>
<C_Cpp:Ptr xmi:id="_sVLIYC9-EeyWgvKLGfX-VA" base_parameter="_fn3IQC9-EeyWgvKLGfX-VA"/>
<C_Cpp:Ptr xmi:id="_ta_g8C9-EeyWgvKLGfX-VA" base_parameter="_rTMG8C9-EeyWgvKLGfX-VA"/>
<C_Cpp:Ptr xmi:id="_a-OFQDQAEeyGO_jIbsSKUw" base_parameter="_ZiBNADQAEeyGO_jIbsSKUw"/>
<C_Cpp:Ptr xmi:id="_lr6qADqCEey_nYE4G1Fl-w" base_parameter="_kEgAQDqCEey_nYE4G1Fl-w"/>
</xmi:XMI>

View file

@ -1,2 +1,2 @@
#Sat Oct 30 22:49:04 CDT 2021
#Sun Oct 31 14:43:42 CDT 2021
_label_asdf=asdf2

View file

@ -104,8 +104,7 @@ void MapWidget::changeStyle()
void MapWidget::AddLayers()
{
std::shared_ptr<view::RadarProductView> radarProductView =
std::make_shared<view::RadarProductView>(p->radarProductManager_,
p->map_);
std::make_shared<view::RadarProductView>(p->radarProductManager_);
radarProductView->Initialize();

View file

@ -199,7 +199,7 @@ void RadarProductLayer::render(
p->shaderProgram_.Use();
const float scale = p->radarProductView_->scale() * 2.0f *
const float scale = std::pow(2.0, params.zoom) * 2.0f *
mbgl::util::tileSize / mbgl::util::DEGREES_MAX;
const float xScale = scale / params.width;
const float yScale = scale / params.height;

View file

@ -24,10 +24,8 @@ class RadarProductViewImpl
{
public:
explicit RadarProductViewImpl(
std::shared_ptr<manager::RadarProductManager> radarProductManager,
std::shared_ptr<QMapboxGL> map) :
std::shared_ptr<manager::RadarProductManager> radarProductManager) :
radarProductManager_(radarProductManager),
map_(map),
plotTime_(),
colorTable_ {boost::gil::rgba8_pixel_t(0, 128, 0, 255),
boost::gil::rgba8_pixel_t(255, 192, 0, 255),
@ -37,7 +35,6 @@ public:
~RadarProductViewImpl() = default;
std::shared_ptr<manager::RadarProductManager> radarProductManager_;
std::shared_ptr<QMapboxGL> map_;
std::vector<float> vertices_;
std::vector<uint8_t> dataMoments8_;
@ -49,9 +46,8 @@ public:
};
RadarProductView::RadarProductView(
std::shared_ptr<manager::RadarProductManager> radarProductManager,
std::shared_ptr<QMapboxGL> map) :
p(std::make_unique<RadarProductViewImpl>(radarProductManager, map))
std::shared_ptr<manager::RadarProductManager> radarProductManager) :
p(std::make_unique<RadarProductViewImpl>(radarProductManager))
{
connect(radarProductManager.get(),
&manager::RadarProductManager::Level2DataLoaded,
@ -60,26 +56,6 @@ RadarProductView::RadarProductView(
}
RadarProductView::~RadarProductView() = default;
double RadarProductView::bearing() const
{
return p->map_->bearing();
}
double RadarProductView::scale() const
{
return p->map_->scale();
}
const std::vector<uint8_t>& RadarProductView::data_moments8() const
{
return p->dataMoments8_;
}
const std::vector<uint16_t>& RadarProductView::data_moments16() const
{
return p->dataMoments16_;
}
const std::vector<float>& RadarProductView::vertices() const
{
return p->vertices_;

View file

@ -7,8 +7,6 @@
#include <memory>
#include <vector>
#include <QMapboxGL>
namespace scwx
{
namespace qt
@ -24,16 +22,10 @@ class RadarProductView : public QObject
public:
explicit RadarProductView(
std::shared_ptr<manager::RadarProductManager> radarProductManager,
std::shared_ptr<QMapboxGL> map);
std::shared_ptr<manager::RadarProductManager> radarProductManager);
~RadarProductView();
double bearing() const;
double scale() const;
const std::vector<uint8_t>& data_moments8() const;
const std::vector<uint16_t>& data_moments16() const;
const std::vector<float>& vertices() const;
const std::vector<boost::gil::rgba8_pixel_t>& color_table() const;
void Initialize();