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 + 1 , IdentifierRole , FormatRole , FormatDetailsRole ,
  CarrierRole , NavSystemRole , NetworkRole , CountryRole ,
  LatitudeRole , LongitudeRole , NmeaRole , SolutionRole ,
  GeneratorRole , CompressionRole , AuthenticationRole , FeeRole ,
  BitrateRole , DistanceKmRole
}
 

Signals

void countChanged ()
 

Public Member Functions

 NTRIPSourceTableModel (QObject *parent=nullptr)
 
int count () const
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
QHash< int, QByteArray > roleNames () const override
 
void parseSourceTable (const QString &raw)
 
void updateDistances (const QGeoCoordinate &from)
 
void sortByDistance ()
 
void clear ()
 

Detailed Description

Single QAbstractListModel over the parsed source table. Replaces the former QObject-per-row + QmlObjectListModel double-wrapping. QML binds against the role names below (mountpoint, format, distanceKm, ...).

Definition at line 46 of file NTRIPSourceTable.h.

Member Enumeration Documentation

◆ Roles

Enumerator
MountpointRole 
IdentifierRole 
FormatRole 
FormatDetailsRole 
CarrierRole 
NavSystemRole 
NetworkRole 
CountryRole 
LatitudeRole 
LongitudeRole 
NmeaRole 
SolutionRole 
GeneratorRole 
CompressionRole 
AuthenticationRole 
FeeRole 
BitrateRole 
DistanceKmRole 

Definition at line 52 of file NTRIPSourceTable.h.

Constructor & Destructor Documentation

◆ NTRIPSourceTableModel()

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

Definition at line 62 of file NTRIPSourceTable.cc.

Member Function Documentation

◆ clear()

void NTRIPSourceTableModel::clear ( )

Definition at line 193 of file NTRIPSourceTable.cc.

References countChanged().

◆ count()

int NTRIPSourceTableModel::count ( ) const
inline

Definition at line 76 of file NTRIPSourceTable.h.

Referenced by NTRIPSourceTableController::fetch(), and rowCount().

◆ countChanged

void NTRIPSourceTableModel::countChanged ( )
signal

Referenced by clear(), and parseSourceTable().

◆ data()

◆ parseSourceTable()

void NTRIPSourceTableModel::parseSourceTable ( const QString &  raw)

Definition at line 141 of file NTRIPSourceTable.cc.

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

◆ roleNames()

◆ rowCount()

int NTRIPSourceTableModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 64 of file NTRIPSourceTable.cc.

References count().

◆ sortByDistance()

void NTRIPSourceTableModel::sortByDistance ( )

Definition at line 170 of file NTRIPSourceTable.cc.

References NTRIPMountpoint::distanceKm.

Referenced by updateDistances().

◆ updateDistances()

void NTRIPSourceTableModel::updateDistances ( const QGeoCoordinate &  from)

Definition at line 162 of file NTRIPSourceTable.cc.

References sortByDistance().


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