QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
NTRIPSourceTableModel Class Reference

#include <NTRIPSourceTable.h>

+ Inheritance diagram for NTRIPSourceTableModel:
+ Collaboration diagram for NTRIPSourceTableModel:

Public Types

enum  Roles {
  MountpointRole = Qt::UserRole , FormatRole , NavSystemRole , CountryRole ,
  BitrateRole , DistanceKmRole , DetailsRole
}
 Roles follow the NTRIPMountpoint property order, as QRangeModel assigns them. More...
 

Signals

void countChanged ()
 

Public Member Functions

 NTRIPSourceTableModel (QObject *parent=nullptr)
 
int count () const
 
void parseSourceTable (const QString &raw, const QGeoCoordinate &from={})
 Publish the parsed rows and their distances in a single reset.
 
void updateDistances (const QGeoCoordinate &from)
 Recompute distances; one dataChanged for DistanceKmRole spans the rows whose distance changed.
 
void clear ()
 

Detailed Description

Read-only list model over the parsed source table in caster order; NTRIPSourceTableSortModel orders it by distance. QML binds to the NTRIPMountpoint property names.

Definition at line 59 of file NTRIPSourceTable.h.

Member Enumeration Documentation

◆ Roles

Roles follow the NTRIPMountpoint property order, as QRangeModel assigns them.

Enumerator
MountpointRole 
FormatRole 
NavSystemRole 
CountryRole 
BitrateRole 
DistanceKmRole 
DetailsRole 

Definition at line 66 of file NTRIPSourceTable.h.

Constructor & Destructor Documentation

◆ NTRIPSourceTableModel()

NTRIPSourceTableModel::NTRIPSourceTableModel ( QObject *  parent = nullptr)
explicit

Definition at line 86 of file NTRIPSourceTable.cc.

Member Function Documentation

◆ clear()

void NTRIPSourceTableModel::clear ( )

Definition at line 125 of file NTRIPSourceTable.cc.

References countChanged().

◆ count()

int NTRIPSourceTableModel::count ( ) const
inline

Definition at line 79 of file NTRIPSourceTable.h.

Referenced by NTRIPSourceTableController::fetch().

◆ countChanged

void NTRIPSourceTableModel::countChanged ( )
signal

◆ parseSourceTable()

void NTRIPSourceTableModel::parseSourceTable ( const QString &  raw,
const QGeoCoordinate &  from = {} 
)

Publish the parsed rows and their distances in a single reset.

Definition at line 90 of file NTRIPSourceTable.cc.

References countChanged(), and NTRIPMountpoint::fromSourceTableLine().

◆ updateDistances()

void NTRIPSourceTableModel::updateDistances ( const QGeoCoordinate &  from)

Recompute distances; one dataChanged for DistanceKmRole spans the rows whose distance changed.

Definition at line 106 of file NTRIPSourceTable.cc.

References DetailsRole, NTRIPMountpoint::distanceKm, DistanceKmRole, and NTRIPMountpoint::updateDistance().

Referenced by NTRIPSourceTableController::fetch().


The documentation for this class was generated from the following files: