mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
[traff_assessment_tool] Refactor TrafficModel constructor
Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
@@ -298,16 +298,14 @@ QVariant GetDescription(TraffMessage const & message)
|
||||
}
|
||||
|
||||
// TrafficModel -------------------------------------------------------------------------------------
|
||||
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?
|
||||
TrafficModel::TrafficModel(Framework & framework,
|
||||
MainWindow & mainWindow,
|
||||
QObject * parent)
|
||||
: QAbstractTableModel(parent)
|
||||
, m_framework(framework)
|
||||
, m_dataSource(dataSource)
|
||||
, m_drawerDelegate(std::move(drawerDelegate))
|
||||
, m_pointsDelegate(std::move(pointsDelegate))
|
||||
, m_dataSource(framework.GetDataSource())
|
||||
, m_drawerDelegate(std::make_unique<TrafficDrawerDelegate>(framework))
|
||||
, m_pointsDelegate(std::make_unique<PointsControllerDelegate>(framework))
|
||||
, m_mainWindow(mainWindow)
|
||||
{
|
||||
framework.GetTrafficManager().SetTrafficUpdateCallbackFn([this, &framework](bool final) {
|
||||
|
||||
Reference in New Issue
Block a user