WIP: [traffxml] traff_assessment_tool, based on openlr_assessment_tool

Skeleton without any traff functionality so far
Contains some obsolete code, commented out with #ifdef openlr_obsolete

Signed-off-by: mvglasow <michael -at- vonglasow.com>
This commit is contained in:
mvglasow
2025-06-05 21:33:18 +03:00
parent dd7ed98c1a
commit 2592bcf042
17 changed files with 1762 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
#pragma once
#include <QtWidgets/QStyledItemDelegate>
class QAbstractItemModel;
class QComboBox;
class QTableView;
class QWidget;
namespace traffxml
{
class ComboBoxDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
ComboBoxDelegate(QObject * parent = 0);
QWidget * createEditor(QWidget * parent, QStyleOptionViewItem const & option,
QModelIndex const & index) const Q_DECL_OVERRIDE;
void setEditorData(QWidget * editor, QModelIndex const & index) const Q_DECL_OVERRIDE;
void setModelData(QWidget * editor, QAbstractItemModel * model,
QModelIndex const & index) const Q_DECL_OVERRIDE;
void updateEditorGeometry(QWidget * editor, QStyleOptionViewItem const & option,
QModelIndex const & index) const Q_DECL_OVERRIDE;
};
class TrafficPanel : public QWidget
{
Q_OBJECT
public:
explicit TrafficPanel(QAbstractItemModel * trafficModel, QWidget * parent);
private:
void CreateTable(QAbstractItemModel * trafficModel);
void FillTable();
signals:
public slots:
// void OnCheckBoxClicked(int row, int state);
private:
QTableView * m_table = Q_NULLPTR;
};
} // namespace traffxml