Skip to content

OSMLabelModel

#include <osmlabelmodel.h>

Inherits from QAbstractListModel

Public Types

Name
enum Roles { TextRole = Qt::UserRole, PositionRole, AlphaRole, HiddenRole, IsWayRole}

Public Signals

Name
void controllerChanged()
void cameraChanged()
void screenSizeChanged()

Public Functions

Name
OSMLabelModel(QObject * parent =nullptr)
~OSMLabelModel() override
int rowCount(const QModelIndex & index ={}) const override
QVariant data(const QModelIndex & index, int role =Qt::DisplayRole) const override
OSMController * controller() const
void setController(OSMController * controller)
Qt3DRender::QCamera * camera() const
void setCamera(Qt3DRender::QCamera * camera)
QSize screenSize() const
void setScreenSize(const QSize & screenSize)
OSMLabelModel()
void resetLabels()
void updateLabels()

Protected Functions

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

Public Properties

Name
OSMController * controller
Qt3DRender::QCamera * camera
QSize screenSize

Public Attributes

Name
KDBindings::Property< OSMLoader * > loader
KDBindings::Property< std::vector< LabelData > > labels
Qt3DRender::QCamera * camera
QSize screenSize

Public Types Documentation

enum Roles

Enumerator Value Description
TextRole Qt::UserRole
PositionRole
AlphaRole
HiddenRole
IsWayRole

Public Signals Documentation

signal controllerChanged

1
void controllerChanged()

signal cameraChanged

1
void cameraChanged()

signal screenSizeChanged

1
void screenSizeChanged()

Public Functions Documentation

function OSMLabelModel

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

function ~OSMLabelModel

1
~OSMLabelModel() override

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

function controller

1
OSMController * controller() const

function setController

1
2
3
void setController(
    OSMController * controller
)

function camera

1
Qt3DRender::QCamera * camera() const

function setCamera

1
2
3
void setCamera(
    Qt3DRender::QCamera * camera
)

function screenSize

1
QSize screenSize() const

function setScreenSize

1
2
3
void setScreenSize(
    const QSize & screenSize
)

function OSMLabelModel

1
OSMLabelModel()

function resetLabels

1
void resetLabels()

function updateLabels

1
void updateLabels()

Protected Functions Documentation

function roleNames

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

Public Property Documentation

property controller

1
OSMController * controller;

property camera

1
Qt3DRender::QCamera * camera;

property screenSize

1
QSize screenSize;

Public Attributes Documentation

variable loader

1
KDBindings::Property< OSMLoader * > loader { nullptr };

variable labels

1
KDBindings::Property< std::vector< LabelData > > labels {};

variable camera

1
Qt3DRender::QCamera * camera;

variable screenSize

1
QSize screenSize;

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