[traff_assessment_tool] Show animation while feed is loading

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-10-20 23:44:48 +03:00
parent 6a694c5d3e
commit 1b74062447
4 changed files with 25 additions and 2 deletions

View File

@@ -317,10 +317,11 @@ void MainWindow::CreateTrafficPanel()
{
if (!m_trafficModel)
{
// TODO simplify the call, everything depends on m_framework
// TODO simplify the call, almost everything depends on m_framework
m_trafficModel = new TrafficModel(m_framework, m_framework.GetDataSource(),
std::make_unique<TrafficDrawerDelegate>(m_framework),
std::make_unique<PointsControllerDelegate>(m_framework));
std::make_unique<PointsControllerDelegate>(m_framework),
*this);
connect(m_mapWidget, &MapWidget::TrafficMarkupClick,
m_trafficModel, &TrafficModel::OnClick);
@@ -339,7 +340,13 @@ void MainWindow::CreateTrafficPanel()
m_dockWidget->adjustSize();
m_dockWidget->setMinimumWidth(400);
m_progressBar = new QProgressBar(m_dockWidget);
m_progressBar->setMinimum(0);
m_progressBar->setMaximum(0);
}
m_dockWidget->setTitleBarWidget(m_progressBar);
m_dockWidget->show();
}
@@ -350,6 +357,9 @@ void MainWindow::DestroyTrafficPanel()
delete m_dockWidget;
m_dockWidget = nullptr;
delete m_progressBar;
m_progressBar = nullptr;
delete m_trafficModel;
m_trafficModel = nullptr;