mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-06 04:24:29 +00:00
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:
50
traffxml/traff_assessment_tool/traffic_panel.hpp
Normal file
50
traffxml/traff_assessment_tool/traffic_panel.hpp
Normal 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
|
||||
Reference in New Issue
Block a user