marble
OwncloudSyncBackend.cpp
Go to the documentation of this file.
105 request.setHeader( QNetworkRequest::ContentTypeHeader, QString( "multipart/form-data; boundary=%0" ).arg( word ) );
158 QTime().secsTo( QTime::fromString( placemark->extendedData().value("duration").value().toString(), Qt::ISODate ) ) / 60.0;
177 data.append( QString( "Content-Disposition: form-data; name=\"kml\"; filename=\"%0.kml\"" ).arg( timestamp ).toUtf8() );
190 data.append( QString( "Content-Disposition: form-data; name=\"preview\"; filename=\"%0.jpg\"" ).arg( timestamp ).toUtf8() );
205 connect( d->m_routeUploadReply, SIGNAL(uploadProgress(qint64,qint64)), this, SIGNAL(routeUploadProgress(qint64,qint64)) );
212 connect( d->m_routeListReply, SIGNAL(downloadProgress(qint64,qint64)), this, SIGNAL(routeListDownloadProgress(qint64,qint64)) );
221 connect( d->m_routeDownloadReply, SIGNAL(downloadProgress(qint64,qint64)), this, SIGNAL(routeDownloadProgress(qint64,qint64)) );
294 connect( d->m_authReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(checkAuthError(QNetworkReply::NetworkError)) );
304 QString const status = tr( "Server '%1' could not be reached" ).arg( d->m_cloudSyncManager->owncloudServer() );
322 d->m_cloudSyncManager->setStatus( tr( "The Marble app is not installed on the ownCloud server" ), CloudSyncManager::Error);
324 d->m_cloudSyncManager->setStatus( tr( "The server is not an ownCloud server" ), CloudSyncManager::Error);
326 } else if ( result == "{\"message\":\"Current user is not logged in\"}" && statusCode == 401 ) {
328 d->m_cloudSyncManager->setStatus( tr( "Username or password are incorrect" ), CloudSyncManager::Error);
406 QString previewFilePath = QString( "%0/preview/%1.jpg").arg( d->m_cacheDir.absolutePath(), timestamp );
425 QString endpointUrl = QString( "%0/%1" ).arg( d->m_cloudSyncManager->apiUrl().toString() ).arg( endpoint );
429 QUrl OwncloudSyncBackend::endpointUrl( const QString &endpoint, const QString ¶meter ) const
431 QString endpointUrl = QString( "%0/%1/%2" ).arg( d->m_cloudSyncManager->apiUrl().toString() ).arg( endpoint ).arg( parameter );
437 bool fileRemoved = QFile( QString( "%0/%1.kml" ).arg( cacheDir.absolutePath(), timestamp ) ).remove();
438 bool previewRemoved = QFile( QString( "%0/preview/%1.jpg" ).arg( cacheDir.absolutePath(), timestamp ) ).remove();
QString & append(QChar ch)
virtual bool isEmpty() const
Indicates whether the bounding box is not initialised (and contains nothing).
Definition: GeoDataLatLonBox.cpp:768
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Definition: GeoDataParser.h:40
void uploadRoute(const QString ×tamp)
Definition: OwncloudSyncBackend.cpp:100
bool remove()
This file contains the headers for MarbleModel.
const char * GeoDataPlacemarkType
Definition: GeoDataTypes.cpp:66
const char * GeoDataDocumentType
Definition: GeoDataTypes.cpp:38
void routeUploadProgress(qint64 sent, qint64 total)
QScriptValue evaluate(const QString &program, const QString &fileName, int lineNumber)
void removedFromCache(const QString ×tamp)
void setProjection(int projection)
Set the Projection used for the map.
Definition: MarbleWidget.cpp:591
void setPreviewUrl(const QUrl &previewUrl)
Definition: RouteItem.cpp:86
void setIdentifier(const QString &identifier)
Definition: RouteItem.cpp:56
Definition: RouteItem.h:20
QTime fromString(const QString &string, Qt::DateFormat format)
QString tr(const char *sourceText, const char *disambiguation, int n)
void setDuration(const QString &duration)
Definition: RouteItem.cpp:106
void deleteRoute(const QString ×tamp)
Definition: OwncloudSyncBackend.cpp:224
void routeDownloaded()
void routeDownloadProgress(qint64 received, qint64 total)
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
Definition: GeoDataParser.h:36
RoutingModel * routingModel()
Provides access to the routing model which contains a list of routing instructions describing steps t...
Definition: RoutingManager.cpp:261
void resize(int w, int h)
QString number(int n, int base)
bool save(const QString &fileName, const char *format, int quality) const
OwncloudSyncBackend(CloudSyncManager *cloudSyncManager)
Definition: OwncloudSyncBackend.cpp:89
void loadRoute(const QString &filename)
Opens the given filename (kml format) and loads the route contained in it.
Definition: RoutingManager.cpp:337
QVector< GeoDataFolder * > folderList() const
A convenience function that returns all folders in this container.
Definition: GeoDataContainer.cpp:197
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QUrl endpointUrl(const QString &endpoint) const
Generates an endpoint URL by appending endpoint name to API URL.
Definition: OwncloudSyncBackend.cpp:423
GeoDataData value(const QString &key) const
return the value of GeoDataExtendedData associated with the given key
Definition: GeoDataExtendedData.cpp:66
Definition: GeoDataFolder.h:50
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
QScriptValue property(const QString &name, const ResolveFlags &mode) const
QByteArray & append(char ch)
Delegates data retrieval and model updates to the appropriate routing provider.
Definition: RoutingManager.h:37
void routeDeleted()
void downloadRouteList()
Definition: OwncloudSyncBackend.cpp:208
bool contains(QChar ch, Qt::CaseSensitivity cs) const
void centerOn(const qreal lon, const qreal lat, bool animated=false)
Center the view on a geographical point.
Definition: MarbleWidget.cpp:549
void setHeader(KnownHeaders header, const QVariant &value)
void downloadRoute(const QString ×tamp)
Definition: OwncloudSyncBackend.cpp:216
QString routeName(const QString ×tamp) const
Definition: OwncloudSyncBackend.cpp:258
QString absolutePath() const
A shared base class between GeoDataDocument/GeoSourceDocument.
Definition: GeoDocument.h:42
void routeListDownloaded(const QVector< RouteItem > &routeList)
QPixmap grabWidget(QWidget *widget, const QRect &rectangle)
int length() const
void removeFromCache(const QDir &cacheDir, const QString ×tamp)
Removes route with given timestamp from cache.
Definition: OwncloudSyncBackend.cpp:435
QString left(int n) const
This file contains the headers for MarbleWidget.
double toDouble(bool *ok) const
GeoDataExtendedData & extendedData() const
Return the ExtendedData assigned to the feature.
Definition: GeoDataFeature.cpp:743
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Definition: CloudSyncManager.h:24
virtual const char * nodeType() const
Provides type information for downcasting a GeoData.
Definition: GeoDataFeature.cpp:158
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString toString() const
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
void routeListDownloadProgress(qint64 received, qint64 total)
int secsTo(const QTime &t) const
bool isArray() const
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
QPixmap createPreview(const QString ×tamp) const
Definition: OwncloudSyncBackend.cpp:232
QList< RenderPlugin * > renderPlugins() const
Returns a list of all RenderPlugins on the widget, this includes float items.
Definition: MarbleWidget.cpp:1107
~OwncloudSyncBackend()
Definition: OwncloudSyncBackend.cpp:95
A class that defines a 2D bounding box for geographic data.
Definition: GeoDataLatLonBox.h:51
GeoDocument * releaseDocument()
retrieve the parsed document and reset the parser If parsing was successful, retrieve the resulting d...
Definition: GeoParser.cpp:205
QVector< GeoDataPlacemark * > placemarkList() const
A convenience function that returns all placemarks in this container.
Definition: GeoDataContainer.cpp:214
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.