Marble

BookmarkSyncManager.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2013 Utku Aydın <utkuaydin34@gmail.com>
4//
5
6#ifndef BOOKMARKSYNCMANAGER_H
7#define BOOKMARKSYNCMANAGER_H
8
9#include "MergeItem.h"
10#include "marble_export.h"
11
12#include <QObject>
13
14namespace Marble {
15
16class CloudSyncManager;
17class BookmarkManager;
18
19class MARBLE_EXPORT BookmarkSyncManager : public QObject
20{
21 Q_OBJECT
22
23 Q_PROPERTY( bool bookmarkSyncEnabled READ isBookmarkSyncEnabled WRITE setBookmarkSyncEnabled NOTIFY bookmarkSyncEnabledChanged )
24
25public:
26 explicit BookmarkSyncManager( CloudSyncManager *cloudSyncManager );
27 ~BookmarkSyncManager() override;
28
29 /**
30 * Last time Marble synced everything up
31 */
32 QDateTime lastSync() const;
33
34 /**
35 * Checks if the user enabled bookmark synchronization.
36 * @return true if bookmark synchronization enabled
37 */
38 bool isBookmarkSyncEnabled() const;
39
40 /**
41 * Setter for enabling/disabling bookmark synchronization.
42 * @param enabled Status of bookmark synchronization
43 */
44 void setBookmarkSyncEnabled( bool enabled );
45
46 void setBookmarkManager(BookmarkManager *manager);
47
48Q_SIGNALS:
49 void bookmarkSyncEnabledChanged(bool enabled);
50 void uploadProgress( qint64 sent, qint64 total );
51 void downloadProgress( qint64 received, qint64 total );
52 void mergeConflict( MergeItem *item );
53 void syncComplete();
54
55public Q_SLOTS:
56 /**
57 * Initiates running of synchronization "method chain".
58 */
59 void startBookmarkSync();
60
61 /**
62 *
63 * @param item
64 */
65 void resolveConflict( MergeItem *item );
66
67private:
68 Q_PRIVATE_SLOT(d, void saveDownloadedToCache( const QByteArray &kml ) )
69 Q_PRIVATE_SLOT(d, void parseTimestamp() )
70 Q_PRIVATE_SLOT(d, void copyLocalToCache() )
71
72 Q_PRIVATE_SLOT(d, void continueSynchronization() )
73 Q_PRIVATE_SLOT(d, void completeSynchronization() )
74 Q_PRIVATE_SLOT(d, void completeMerge() )
75 Q_PRIVATE_SLOT(d, void completeUpload() )
76
77private:
78 class Private;
79 Private *d;
80};
81
82}
83
84#endif // BOOKMARKSYNCMANAGER_H
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:54:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.