marble
CloudRouteModel.cpp
Go to the documentation of this file.
148 if( d->m_items.at( index.row() ).preview().isNull() && !d->m_requestedPreviews.contains( timestamp ) ) {
void setDownloadingItem(const QPersistentModelIndex &index)
Marks the route at given index as being downloaded.
Definition: CloudRouteModel.cpp:125
void updateProgress(qint64 currentSize, qint64 totalSize)
Definition: CloudRouteModel.cpp:173
QImage fromData(const uchar *data, int size, const char *format)
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Definition: CloudRouteModel.cpp:74
void setRoleNames(const QHash< int, QByteArray > &roleNames)
const QHash< int, QByteArray > & roleNames() const
bool isCached(const QModelIndex &index) const
Checks if specified route exists in the local cache.
Definition: CloudRouteModel.cpp:114
QPixmap fromImage(const QImage &image, QFlags< Qt::ImageConversionFlag > flags)
Definition: RouteItem.h:20
QPersistentModelIndex downloadingItem() const
Getter for the item currently being downloaded.
Definition: CloudRouteModel.cpp:120
bool isDownloading(const QModelIndex &index) const
Checks if route is being downloaded.
Definition: CloudRouteModel.cpp:130
void beginResetModel()
const char * name() const
bool isValid() const
CloudRouteModel(QObject *parent=0)
Definition: CloudRouteModel.cpp:52
void setItems(const QVector< RouteItem > &items)
Sets the list of routes that will show up in CloudRoutesDialog.
Definition: CloudRouteModel.cpp:105
void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
int row() const
QByteArray readAll()
QIcon preview(const QModelIndex &index) const
Checks whether a preview for the route available and returns or downloads the preview.
Definition: CloudRouteModel.cpp:145
bool exists() const
void setPreview(QNetworkReply *reply)
Definition: CloudRouteModel.cpp:159
qint64 totalSize() const
Total size of the item currently being downloaded.
Definition: CloudRouteModel.cpp:135
QVariant data(int role) const
bool isNull() const
int rowCount(const QModelIndex &parent=QModelIndex()) const
Definition: CloudRouteModel.cpp:93
qint64 downloadedSize() const
Returns how much of the route are downloaded as bytes.
Definition: CloudRouteModel.cpp:140
void endResetModel()
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString toString() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.