29 |
29 |
30 // Forward declarations |
30 // Forward declarations |
31 class QAbstractItemModel; |
31 class QAbstractItemModel; |
32 class QStandardItemModel; |
32 class QStandardItemModel; |
33 class AgendaUtil; |
33 class AgendaUtil; |
|
34 class AgendaEntry; |
34 |
35 |
35 NOTES_TEST_CLASS(TestNotesModel) |
36 NOTES_TEST_CLASS(TestNotesModel) |
36 |
37 |
37 class NOTESMODEL_EXPORT NotesModel : public QObject |
38 class NOTESMODEL_EXPORT NotesModel : public QObject |
38 { |
39 { |
55 void addEntryToModel(ulong id); |
56 void addEntryToModel(ulong id); |
56 void removeEntryFromModel(ulong id); |
57 void removeEntryFromModel(ulong id); |
57 |
58 |
58 private: |
59 private: |
59 void modifyEntryInModel(ulong id, int row); |
60 void modifyEntryInModel(ulong id, int row); |
60 void appendNotesToModel(QList<ulong> &ids); |
61 void appendNotesToModel(QList<AgendaEntry> &agendaEntryList); |
61 void appendInCompTodosToModel(QList<ulong> &ids); |
62 void appendInCompTodosToModel(QList<AgendaEntry> &agendaEntryList); |
62 void appendCompTodosToModel(QList<ulong> &ids); |
63 void appendCompTodosToModel(QList<AgendaEntry> &agendaEntryList); |
63 bool insertNoteToModel(QModelIndex &index, ulong id); |
64 bool insertNoteToModel(QModelIndex &index, ulong id); |
64 bool insertInCompTodoToModel(QModelIndex &index, ulong id); |
65 bool insertInCompTodoToModel(QModelIndex &index, ulong id); |
65 bool insertCompTodoToModel(QModelIndex &index, ulong id); |
66 bool insertCompTodoToModel(QModelIndex &index, ulong id); |
|
67 QString dateFormatString(); |
|
68 QString timeFormatString(); |
66 |
69 |
67 private: |
70 private: |
68 QStandardItemModel *mSourceModel; |
71 QStandardItemModel *mSourceModel; |
69 AgendaUtil *mAgendaUtil; |
72 AgendaUtil *mAgendaUtil; |
70 |
73 |