QtDataSync  4.2.0
A simple offline-first synchronisation framework, to synchronize data of Qt applications between devices
qqmleventcursor.h
1 #ifndef QQMLEVENTCURSOR_H
2 #define QQMLEVENTCURSOR_H
3 
4 #include <QtDataSync/EventCursor>
5 
6 #ifdef DOXYGEN_RUN
8 
16 class EventLog
17 #else
18 namespace QtDataSync {
19 
20 class QQmlEventCursor : public QObject
21 #endif
22 {
23  Q_OBJECT
24 
25 public:
27  explicit QQmlEventCursor(QObject *parent = nullptr);
28 
30  Q_INVOKABLE QtDataSync::EventCursor *first(QObject *parent = nullptr);
32  Q_INVOKABLE QtDataSync::EventCursor *first(const QString &setupName, QObject *parent = nullptr);
34  Q_INVOKABLE QtDataSync::EventCursor *last(QObject *parent = nullptr);
36  Q_INVOKABLE QtDataSync::EventCursor *last(const QString &setupName, QObject *parent = nullptr);
38  Q_INVOKABLE QtDataSync::EventCursor *create(quint64 index, QObject *parent = nullptr);
40  Q_INVOKABLE QtDataSync::EventCursor *create(quint64 index, const QString &setupName, QObject *parent = nullptr);
42  Q_INVOKABLE QtDataSync::EventCursor *load(const QByteArray &data, QObject *parent = nullptr);
44  Q_INVOKABLE QtDataSync::EventCursor *load(const QByteArray &data, const QString &setupName, QObject *parent = nullptr);
45 };
46 
47 }
48 
49 #endif // QQMLEVENTCURSOR_H
Q_INVOKABLE QtDataSync::EventCursor * first(QObject *parent=nullptr)
Create a cursor positioned on the oldest change event.
The QML import for the QtDataSync QML module.
The primary namespace of the QtDataSync library.
The QML bindings for the static methods of of QtDataSync::EventCursor.
A cursor style class to read from the global change event log.
Definition: eventcursor.h:19
Q_INVOKABLE QtDataSync::EventCursor * load(const QByteArray &data, QObject *parent=nullptr)
Create a cursor positioned on the index provided by the previously stored data, if still valid...
Q_INVOKABLE QtDataSync::EventCursor * create(quint64 index, QObject *parent=nullptr)
Create a cursor positioned on the given index, if it is a valid index.
Q_INVOKABLE QtDataSync::EventCursor * last(QObject *parent=nullptr)
Create a cursor positioned on the newest change event.