libcuteradio
A Qt/C++ library and QML module to access the cuteRadio Data API.
 All Classes Functions Enumerations Properties Groups Pages
List of all members
CuteRadio::StationsModel Class Reference

A model for retrieving station stations. More...

Inheritance diagram for CuteRadio::StationsModel:
CuteRadio::ResourcesModel CuteRadio::Model

Additional Inherited Members

- Public Slots inherited from CuteRadio::ResourcesModel
void cancel ()
 Cancels the current request.
void reload ()
 Clears any existing data and retreives a new list of cuteRadio resources using the existing properties.
- Signals inherited from CuteRadio::ResourcesModel
void accessTokenChanged ()
 Emitted when the accessToken changes.
void statusChanged (CuteRadio::ResourcesRequest::Status s)
 Emitted when the status changes.
- Public Member Functions inherited from CuteRadio::ResourcesModel
void setNetworkAccessManager (QNetworkAccessManager *manager)
 Sets the QNetworkAccessManager instance to be used when making requests to the cuteRadio Data API.
- Properties inherited from CuteRadio::ResourcesModel
QString accessToken
 The access token to be used when making requests to the cuteRadio Data API.
QString resource
 The resource type to be retrieved by the model.
QVariantMap filters
 A map of key/value pairs used to filter requests.
CuteRadio::ResourcesRequest::Status status
 The current status of the model.
QVariant result
 The current result of the model.
CuteRadio::ResourcesRequest::Error error
 The error type of the model.
QString errorString
 A description of the error of the model.

Detailed Description

A model for retrieving station stations.

StationsModel is used for retrieving stations (including favourites and played stations), and extends ResourcesModel by providing the following data roles:

Role Role name Description
Qt::DisplayRole/TitleRole title The display title of the station.
IdRole id The station id.
DescriptionRole description The station description.
GenreRole genre The station genre.
CountryRole country The station country.
LanguageRole language The station language.
SourceRole source The station stream source.
PlayCountRole playCount The number of times the station has been played.
LastPlayedRole lastPlayed The datetime at which the station was last played.
CreatorIdRole creatorId The id of the user that created the station.
ApprovedRole approved Whether the station has been approved by moderator/admin.
FavouriteRole favourite Whether the station is in the authenticated user's favourites.