mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 17:50:04 +00:00
Use lambas for single-statement signals within radar product layer
This commit is contained in:
parent
a6f50d74e0
commit
5bbfb1ecd9
2 changed files with 3 additions and 26 deletions
|
|
@ -146,11 +146,11 @@ void RadarProductLayer::initialize()
|
||||||
connect(p->radarProductView_.get(),
|
connect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::ColorTableUpdated,
|
&view::RadarProductView::ColorTableUpdated,
|
||||||
this,
|
this,
|
||||||
&RadarProductLayer::UpdateColorTableNextFrame);
|
[=]() { p->colorTableNeedsUpdate_ = true; });
|
||||||
connect(p->radarProductView_.get(),
|
connect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::SweepComputed,
|
&view::RadarProductView::SweepComputed,
|
||||||
this,
|
this,
|
||||||
&RadarProductLayer::UpdateSweepNextFrame);
|
[=]() { p->sweepNeedsUpdate_ = true; });
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::UpdateSweep()
|
void RadarProductLayer::UpdateSweep()
|
||||||
|
|
@ -302,7 +302,7 @@ void RadarProductLayer::deinitialize()
|
||||||
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "deinitialize()";
|
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "deinitialize()";
|
||||||
|
|
||||||
gl.glDeleteVertexArrays(1, &p->vao_);
|
gl.glDeleteVertexArrays(1, &p->vao_);
|
||||||
gl.glDeleteBuffers(2, p->vbo_.data());
|
gl.glDeleteBuffers(3, p->vbo_.data());
|
||||||
|
|
||||||
p->uMVPMatrixLocation_ = GL_INVALID_INDEX;
|
p->uMVPMatrixLocation_ = GL_INVALID_INDEX;
|
||||||
p->uMapScreenCoordLocation_ = GL_INVALID_INDEX;
|
p->uMapScreenCoordLocation_ = GL_INVALID_INDEX;
|
||||||
|
|
@ -312,15 +312,6 @@ void RadarProductLayer::deinitialize()
|
||||||
p->vao_ = GL_INVALID_INDEX;
|
p->vao_ = GL_INVALID_INDEX;
|
||||||
p->vbo_ = {GL_INVALID_INDEX};
|
p->vbo_ = {GL_INVALID_INDEX};
|
||||||
p->texture_ = GL_INVALID_INDEX;
|
p->texture_ = GL_INVALID_INDEX;
|
||||||
|
|
||||||
disconnect(p->radarProductView_.get(),
|
|
||||||
&view::RadarProductView::ColorTableUpdated,
|
|
||||||
this,
|
|
||||||
&RadarProductLayer::UpdateColorTableNextFrame);
|
|
||||||
disconnect(p->radarProductView_.get(),
|
|
||||||
&view::RadarProductView::SweepComputed,
|
|
||||||
this,
|
|
||||||
&RadarProductLayer::UpdateSweepNextFrame);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::UpdateColorTable()
|
void RadarProductLayer::UpdateColorTable()
|
||||||
|
|
@ -356,16 +347,6 @@ void RadarProductLayer::UpdateColorTable()
|
||||||
gl.glUniform1f(p->uDataMomentScaleLocation_, scale);
|
gl.glUniform1f(p->uDataMomentScaleLocation_, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::UpdateColorTableNextFrame()
|
|
||||||
{
|
|
||||||
p->colorTableNeedsUpdate_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void RadarProductLayer::UpdateSweepNextFrame()
|
|
||||||
{
|
|
||||||
p->sweepNeedsUpdate_ = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static glm::vec2
|
static glm::vec2
|
||||||
LatLongToScreenCoordinate(const QMapbox::Coordinate& coordinate)
|
LatLongToScreenCoordinate(const QMapbox::Coordinate& coordinate)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,10 +34,6 @@ private:
|
||||||
void UpdateColorTable();
|
void UpdateColorTable();
|
||||||
void UpdateSweep();
|
void UpdateSweep();
|
||||||
|
|
||||||
private slots:
|
|
||||||
void UpdateColorTableNextFrame();
|
|
||||||
void UpdateSweepNextFrame();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<RadarProductLayerImpl> p;
|
std::unique_ptr<RadarProductLayerImpl> p;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue