FlightGear next
RecentLocationsModel Class Reference

#include <RecentLocationsModel.hxx>

Inherits QAbstractListModel.

Signals

void isEmptyChanged ()
 

Public Member Functions

 RecentLocationsModel (QObject *pr=nullptr)
 
QVariant data (const QModelIndex &index, int role) const override
 
int rowCount (const QModelIndex &parent) const override
 
QHash< int, QByteArray > roleNames () const override
 
QVariantMap mostRecent () const
 
void insert (QVariant location)
 
void saveToSettings ()
 
Q_INVOKABLE QVariantMap locationAt (int index) const
 
bool isEmpty () const
 

Properties

bool isEmpty
 

Detailed Description

Definition at line 8 of file RecentLocationsModel.hxx.

Constructor & Destructor Documentation

◆ RecentLocationsModel()

RecentLocationsModel::RecentLocationsModel ( QObject * pr = nullptr)

Definition at line 12 of file RecentLocationsModel.cxx.

Member Function Documentation

◆ data()

QVariant RecentLocationsModel::data ( const QModelIndex & index,
int role ) const
override

Definition at line 35 of file RecentLocationsModel.cxx.

◆ insert()

void RecentLocationsModel::insert ( QVariant location)

Definition at line 69 of file RecentLocationsModel.cxx.

◆ isEmpty()

bool RecentLocationsModel::isEmpty ( ) const

Definition at line 30 of file RecentLocationsModel.cxx.

◆ isEmptyChanged

void RecentLocationsModel::isEmptyChanged ( )
signal

◆ locationAt()

QVariantMap RecentLocationsModel::locationAt ( int index) const

Definition at line 25 of file RecentLocationsModel.cxx.

◆ mostRecent()

QVariantMap RecentLocationsModel::mostRecent ( ) const

Definition at line 60 of file RecentLocationsModel.cxx.

◆ roleNames()

QHash< int, QByteArray > RecentLocationsModel::roleNames ( ) const
override

Definition at line 52 of file RecentLocationsModel.cxx.

◆ rowCount()

int RecentLocationsModel::rowCount ( const QModelIndex & parent) const
override

Definition at line 47 of file RecentLocationsModel.cxx.

◆ saveToSettings()

void RecentLocationsModel::saveToSettings ( )

Definition at line 19 of file RecentLocationsModel.cxx.

Property Documentation

◆ isEmpty

bool RecentLocationsModel::isEmpty
read

Definition at line 12 of file RecentLocationsModel.hxx.


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