32 explicit NoteRepository(std::unique_ptr<IStorageStrategy> strategy);
35 void addSchema(
const Schema& schema);
36 const QList<Schema>& getSchemas()
const;
37 void removeSchema(
int index);
38 void updateSchema(
int index,
const Schema& schema);
41 void addNote(
const Note& note);
42 QList<Note>& getNotes();
43 void removeNote(
int index);
44 void updateNote(
int index,
const Note& note);
45 void sortNotes(SortType type);
48 void addUsageTime(
int seconds);
49 QMap<QString, int> getUsageStats()
const;
52 bool save(
const QString& filePath);
53 bool load(
const QString& filePath);
58 void setStrategy(std::unique_ptr<IStorageStrategy> newStrategy);
61 QList<Schema> m_schemas;
63 QMap<QString, int> m_usageStats;
64 std::unique_ptr<IStorageStrategy> m_strategy;
void setStrategy(std::unique_ptr< IStorageStrategy > newStrategy)
Змінює стратегію збереження "на льоту".
Definition note_repository.cpp:112