diff --git a/harbour-nextcloudnotes.pro b/harbour-nextcloudnotes.pro index c35f7a9..9b6c178 100644 --- a/harbour-nextcloudnotes.pro +++ b/harbour-nextcloudnotes.pro @@ -18,7 +18,6 @@ DEFINES += APP_VERSION=\\\"$$VERSION\\\" HEADERS += src/note.h \ src/notesapi.h \ - src/notesinterface.h \ src/notesmodel.h \ src/notesstore.h diff --git a/src/notesapi.h b/src/notesapi.h index 228139c..88925f9 100644 --- a/src/notesapi.h +++ b/src/notesapi.h @@ -10,8 +10,6 @@ #include #include -#include "notesinterface.h" - #define STATUS_ENDPOINT "/status.php" #define LOGIN_ENDPOINT "/index.php/login/v2" #define NOTES_ENDPOINT "/index.php/apps/notes/api/v0.2/notes" @@ -19,7 +17,7 @@ #define EXCLUDE_QUERY "exclude=" #define POLL_INTERVALL 5000 -class NotesApi : public QObject, public NotesInterface +class NotesApi : public QObject { Q_OBJECT diff --git a/src/notesinterface.h b/src/notesinterface.h deleted file mode 100644 index 1d584e9..0000000 --- a/src/notesinterface.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef NOTESINTERFACE_H -#define NOTESINTERFACE_H - -//#include -#include - -class NotesInterface -{ - //Q_CLASSINFO("author", "Scharel Clemens") - //Q_CLASSINFO("url", "https://github.com/scharel/harbour-nextcloudnotes") - - Q_PROPERTY(QString account READ account WRITE setAccount NOTIFY accountChanged) - -public: - explicit NotesInterface() { - } - - virtual QString account() const = 0; - virtual void setAccount(const QString& account) = 0; - - virtual const QList noteIds() = 0; - virtual bool noteExists(const int id) = 0; - virtual int noteModified(const int id) = 0; - -public slots: - Q_INVOKABLE virtual bool getAllNotes(const QStringList& exclude = QStringList()) = 0; - Q_INVOKABLE virtual bool getNote(const int id, const QStringList& exclude = QStringList()) = 0; - Q_INVOKABLE virtual bool createNote(const QJsonObject& note) = 0; - Q_INVOKABLE virtual bool updateNote(const int id, const QJsonObject& note) = 0; - Q_INVOKABLE virtual bool deleteNote(const int id) = 0; - -signals: - virtual void accountChanged(const QString& account) = 0; - virtual void allNotesChanged(const QList& ids) = 0; - virtual void noteCreated(const int id, const QJsonObject& note) = 0; - virtual void noteUpdated(const int id, const QJsonObject& note) = 0; - virtual void noteDeleted(const int id) = 0; - -}; - -#endif // NOTESINTERFACE_H diff --git a/src/notesmodel.h b/src/notesmodel.h index c96ff6e..b7029a0 100644 --- a/src/notesmodel.h +++ b/src/notesmodel.h @@ -6,7 +6,6 @@ #include #include #include "note.h" -#include "notesinterface.h" #include "notesapi.h" #include "notesstore.h" @@ -36,7 +35,7 @@ private: bool m_favoritesOnTop; }; -class NotesModel : public QAbstractListModel, public NotesInterface { +class NotesModel : public QAbstractListModel { Q_OBJECT public: diff --git a/src/notesstore.h b/src/notesstore.h index c25f9c1..090f5a0 100644 --- a/src/notesstore.h +++ b/src/notesstore.h @@ -7,9 +7,7 @@ #include #include -#include "notesinterface.h" - -class NotesStore : public QObject, public NotesInterface +class NotesStore : public QObject { Q_OBJECT