[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

@@ -13,6 +13,7 @@
#include "base/assert.hpp"
#include "base/scope_guard.hpp"
#include <QDockWidget>
#include <QItemSelection>
#include <QMessageBox>
@@ -300,12 +301,14 @@ QVariant GetDescription(TraffMessage const & message)
TrafficModel::TrafficModel(Framework & framework, DataSource const & dataSource,
std::unique_ptr<TrafficDrawerDelegateBase> drawerDelegate, // TODO do we need that?
std::unique_ptr<PointsControllerDelegateBase> pointsDelegate, // TODO do we need that?
MainWindow & mainWindow,
QObject * parent)
: QAbstractTableModel(parent)
, m_framework(framework)
, m_dataSource(dataSource)
, m_drawerDelegate(std::move(drawerDelegate))
, m_pointsDelegate(std::move(pointsDelegate))
, m_mainWindow(mainWindow)
{
framework.GetTrafficManager().SetTrafficUpdateCallbackFn([this, &framework](bool final) {
/*
@@ -330,6 +333,10 @@ TrafficModel::TrafficModel(Framework & framework, DataSource const & dataSource,
editSession.ClearGroup(UserMark::Type::COLORED);
editSession.SetIsVisible(UserMark::Type::COLORED, false);
// restore QDockWidget title
if (m_mainWindow.GetDockWidget())
m_mainWindow.GetDockWidget()->setTitleBarWidget(nullptr);
LOG(LINFO, ("Messages:", m_messages.size()));
});
});