2016-12-11 18:09:39 +02:00
|
|
|
#ifndef APPLICATION_H
|
|
|
|
#define APPLICATION_H
|
|
|
|
|
|
|
|
#include <stable.h>
|
|
|
|
|
|
|
|
#include "database.h"
|
|
|
|
#include "services/folderservice.h"
|
2016-12-13 00:33:33 +02:00
|
|
|
#include "services/noteservice.h"
|
2016-12-11 18:09:39 +02:00
|
|
|
#include "models/foldermodel.h"
|
2016-12-13 00:33:33 +02:00
|
|
|
#include "models/notecollection.h"
|
|
|
|
#include "services/notecache.h"
|
|
|
|
#include "models/notemodel.h"
|
2016-12-14 23:50:26 +02:00
|
|
|
#include "models/qmlnote.h"
|
2016-12-11 18:09:39 +02:00
|
|
|
|
|
|
|
namespace jop {
|
|
|
|
|
|
|
|
class Application : public QGuiApplication {
|
|
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Application(int &argc, char **argv);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
QQuickView view_;
|
|
|
|
Database db_;
|
|
|
|
FolderService folderService_;
|
2016-12-13 00:33:33 +02:00
|
|
|
NoteCollection noteCollection_;
|
|
|
|
NoteService noteService_;
|
2016-12-11 18:09:39 +02:00
|
|
|
FolderModel folderModel_;
|
2016-12-13 00:33:33 +02:00
|
|
|
NoteModel noteModel_;
|
|
|
|
int selectedFolderId() const;
|
2016-12-14 23:50:26 +02:00
|
|
|
int selectedNoteId() const;
|
2016-12-13 00:33:33 +02:00
|
|
|
NoteCache noteCache_;
|
2016-12-14 23:50:26 +02:00
|
|
|
QmlNote selectedQmlNote_;
|
2016-12-11 18:09:39 +02:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
void view_currentFolderChanged();
|
2016-12-14 23:50:26 +02:00
|
|
|
void view_currentNoteChanged();
|
2016-12-11 18:09:39 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // APPLICATION_H
|