-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtodonote.h
65 lines (59 loc) · 1.48 KB
/
todonote.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef TODONOTE_H
#define TODONOTE_H
#include "note.h"
class QTreeView;
class TodoModel;
class TodoProxyModel;
class QScrollArea;
class TextEdit;
class QDomDocument;
class QLayout;
class QDataWidgetMapper;
class QDateTimeEdit;
class QLabel;
class QCheckBox;
class QMenu;
class TodoNote : public Note
{
Q_OBJECT
public:
TodoNote(const QFileInfo& fileinfo, Note::Type type_new);
~TodoNote();
void load(); //Reading note's content
void save(bool forced = false); //Saving note's content
void copy() const; //Coping note's content to clipboard
QWidget* widget();
void retranslate(const QLocale& locale);
bool isDocumentSupported() const;
QTextDocument* document() const;
private slots:
void taskChanged(const QModelIndex& proxy_index);
void contextMenuRequested(const QPoint& pos);
void insertTask();
void insertSubTask();
void removeTask();
void hideCompletedTasks();
//bool QAbstractItemView::isIndexHidden ( const QModelIndex & index ) const;
void noteDateLimitChanged(const QDateTime&);
void noteLimitChanged(bool);
private:
QDomDocument* domDocument;
QTreeView* tree_view;
TodoModel* model;
TodoProxyModel* proxy_model;
QScrollArea* area;
TextEdit* text_edit;
QWidget* extra_widget;
QLayout* main_layout;
QLayout* grid_layout;
QLayout* extra_layout;
QDataWidgetMapper* mapper;
QLabel* lb_date_start;
QLabel* lb_date_stop;
QDateTimeEdit* dt_date_limit;
QLabel* lb_date_0;
QLabel* lb_date_1;
QCheckBox* cb_date_limit;
QMenu* menu_context;
};
#endif // TODONOTE_H