Skip to content

RoadModel

#include <roadmodel.h>

Inherits from QAbstractListModel

Public Types

Name
enum RoadRoles { PathRole = Qt::UserRole}

Public Functions

Name
RoadModel(QObject * parent =nullptr)
~RoadModel() override
void addPath(const RoadPath & path)
int rowCount(const QModelIndex & index ={}) const override
QVariant data(const QModelIndex & index, int role =Qt::DisplayRole) const override

Protected Functions

Name
QHash< int, QByteArray > roleNames() const override

Public Types Documentation

enum RoadRoles

Enumerator Value Description
PathRole Qt::UserRole

Public Functions Documentation

function RoadModel

1
2
3
explicit RoadModel(
    QObject * parent =nullptr
)

function ~RoadModel

1
~RoadModel() override

function addPath

1
2
3
void addPath(
    const RoadPath & path
)

function rowCount

1
2
3
int rowCount(
    const QModelIndex & index ={}
) const override

function data

1
2
3
4
QVariant data(
    const QModelIndex & index,
    int role =Qt::DisplayRole
) const override

Protected Functions Documentation

function roleNames

1
QHash< int, QByteArray > roleNames() const override

Updated on 2023-07-03 at 11:02:07 +0000