• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • Marble
  • CloudRouteModel
Public Types | Public Slots | Public Member Functions | List of all members
Marble::CloudRouteModel Class Reference

#include <CloudRouteModel.h>

Inherits QAbstractListModel.

Public Types

enum  RouteRoles {
  Timestamp = Qt::UserRole + 1, Name, PreviewUrl, Distance,
  Duration, IsCached, IsDownloading, IsOnCloud
}
 

Public Slots

void setPreview (QNetworkReply *reply)
 
void updateProgress (qint64 currentSize, qint64 totalSize)
 

Public Member Functions

 CloudRouteModel (QObject *parent=0)
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
qint64 downloadedSize () const
 
QPersistentModelIndex downloadingItem () const
 
bool isCached (const QModelIndex &index) const
 
bool isDownloading (const QModelIndex &index) const
 
QIcon preview (const QModelIndex &index) const
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
void setDownloadingItem (const QPersistentModelIndex &index)
 
void setItems (const QVector< RouteItem > &items)
 
qint64 totalSize () const
 

Detailed Description

Definition at line 25 of file CloudRouteModel.h.

Member Enumeration Documentation

enum Marble::CloudRouteModel::RouteRoles
Enumerator
Timestamp 
Name 
PreviewUrl 
Distance 
Duration 
IsCached 
IsDownloading 
IsOnCloud 

Definition at line 30 of file CloudRouteModel.h.

Constructor & Destructor Documentation

Marble::CloudRouteModel::CloudRouteModel ( QObject *  parent = 0)
explicit

Definition at line 52 of file CloudRouteModel.cpp.

Member Function Documentation

QVariant Marble::CloudRouteModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

Definition at line 74 of file CloudRouteModel.cpp.

qint64 Marble::CloudRouteModel::downloadedSize ( ) const

Returns how much of the route are downloaded as bytes.

Returns
Downloaded bytes

Definition at line 140 of file CloudRouteModel.cpp.

QPersistentModelIndex Marble::CloudRouteModel::downloadingItem ( ) const

Getter for the item currently being downloaded.

Returns
Model for the item currently being downloaded

Definition at line 120 of file CloudRouteModel.cpp.

bool Marble::CloudRouteModel::isCached ( const QModelIndex &  index) const

Checks if specified route exists in the local cache.

Parameters
indexIndex of the route.
Returns
true, if exists.

Definition at line 114 of file CloudRouteModel.cpp.

bool Marble::CloudRouteModel::isDownloading ( const QModelIndex &  index) const

Checks if route is being downloaded.

Parameters
indexIndex of the route.
Returns
true, if downloading.

Definition at line 130 of file CloudRouteModel.cpp.

QIcon Marble::CloudRouteModel::preview ( const QModelIndex &  index) const

Checks whether a preview for the route available and returns or downloads the preview.

Parameters
indexIndex of the item whose preview is requested
Returns
Route's preview as QIcon

Definition at line 145 of file CloudRouteModel.cpp.

int Marble::CloudRouteModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Definition at line 93 of file CloudRouteModel.cpp.

void Marble::CloudRouteModel::setDownloadingItem ( const QPersistentModelIndex &  index)

Marks the route at given index as being downloaded.

Parameters
indexIndex of the route.

Definition at line 125 of file CloudRouteModel.cpp.

void Marble::CloudRouteModel::setItems ( const QVector< RouteItem > &  items)

Sets the list of routes that will show up in CloudRoutesDialog.

Parameters
itemsList of routes.

Definition at line 105 of file CloudRouteModel.cpp.

void Marble::CloudRouteModel::setPreview ( QNetworkReply *  reply)
slot

Definition at line 159 of file CloudRouteModel.cpp.

qint64 Marble::CloudRouteModel::totalSize ( ) const

Total size of the item currently being downloaded.

Returns
Total size of the item, -1 if no route is being downloaded

Definition at line 135 of file CloudRouteModel.cpp.

void Marble::CloudRouteModel::updateProgress ( qint64  currentSize,
qint64  totalSize 
)
slot

Definition at line 173 of file CloudRouteModel.cpp.


The documentation for this class was generated from the following files:
  • CloudRouteModel.h
  • CloudRouteModel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal