56 Commits

Author SHA1 Message Date
Le Tan
901c477705 utilize ExtraSelection for special highlighting
1. Highlight current line;
2. Highlight selected word;
3. Highlight searched word;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-12 21:00:06 +08:00
Le Tan
3005d9bf5c implement Find/Replace logics
Supports Find/Replace in both edit and preview modes.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-08 21:09:00 +08:00
Le Tan
768c1632b0 save and restore the sate of the main splitter
Add a config "main_splitter_state" to store the state of the main
splitter.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-02 10:00:59 +08:00
Le Tan
41abbb21d0 refactor VMainWindow
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-01 15:46:57 +08:00
Le Tan
eaab820d8b add find and replace dialog
Logic is not implemented yet.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2017-01-01 14:43:28 +08:00
Le Tan
3b442f55a9 highlight curren cursor line
Add configuration "highlight_cursor_line" in vnote.ini.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-25 20:31:59 +08:00
Le Tan
1aa264adc8 support locating current note
Support locating the notebook and directory of current note.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-24 13:09:19 +08:00
Le Tan
d2f61bc605 add shortcuts
1. `Ctrl + W`, `Ctrl + R`, `Ctrl + Q`, `Ctrl + S` for edit and view mode;
2. `Ctrl + E` to toggle expand view;
3. `Ctrl + N` to create note in current directory;
4. `Ctrl + H` in edit mode to delete previous char;
5. `Ctrl + W` in edit mode to delete till the start of previous word;
6. `Ctrl + U` in edit mode to delete till the start of current line;
7. `Tab`, `Shift + Tab` to indent or unindent selected lines;
8. `Ctrl + B`, `Ctrl + I` to make selected text bold or italic;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-18 22:26:01 +08:00
Le Tan
e069305b23 menu and actions text normalization
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-13 21:41:17 +08:00
Le Tan
5ff46d6237 implement insert image menu action
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-12 23:14:53 +08:00
Le Tan
66c1d543c2 synchronize current header in read and edit mode
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-12 21:58:53 +08:00
Le Tan
a884991150 refactor: add VMdEdit to inherit VEdit for markdown edit
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-11 14:42:01 +08:00
Le Tan
6a745df2eb combine save and discard tool buttons
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-10 18:08:03 +08:00
Le Tan
68e6a214e9 combine view panel actions in toolbar
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-10 17:24:33 +08:00
Le Tan
67c1f69a5b disable context menu on QMainWindow to prevent hiding the toolbar
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-10 11:28:10 +08:00
Le Tan
edca922f5e support avatar
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-10 11:21:08 +08:00
Le Tan
8f866f34ff stylesheet
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-09 21:08:38 +08:00
Le Tan
9413ef875b modify stylesheet
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-08 22:42:34 +08:00
Le Tan
e32ee1fa90 refactor: VNotebookSelector
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-07 13:08:06 +08:00
Le Tan
9a197b5087 refactor: add VNotebookSelector for notebook management
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-04 22:26:48 +08:00
Le Tan
02d5300821 support copy and paste directory
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-12-03 11:42:11 +08:00
Le Tan
e7c42ba5be refactor: add VFile and VDirectory
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-30 22:58:00 +08:00
Le Tan
8e8d69c85f refactor: VNote and VNotebook
regression: notebook renaming logics does not work for now

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-26 12:45:29 +08:00
Le Tan
7c69f80f17 split setupUI() in VMainWindow
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-24 22:23:50 +08:00
Le Tan
3722e6cb71 close all files before closing app
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-21 22:07:01 +08:00
Le Tan
0298b8bfe1 change the look of the notebook combobox
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-20 16:15:27 +08:00
Le Tan
e77c10df36 add icon for notebook and directory items
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-20 13:22:35 +08:00
Le Tan
3ae3462597 save/restore window state and geometry
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-20 11:12:15 +08:00
Le Tan
c7259c307e add delete note button in tool bar
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-15 22:17:15 +08:00
Le Tan
a6c2416cc8 add note info button in tool bar
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-15 14:48:16 +08:00
Le Tan
62c75427e7 complete rename logics
1. Handle directory rename correctly;
2. Handle file rename correctly;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-14 22:40:38 +08:00
Le Tan
5e97ca8060 display current file in window title
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-13 16:15:13 +08:00
Le Tan
dcc7e6a0f7 add vnote.qss for style sheet
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-13 08:05:43 +08:00
Le Tan
201d14116f set app icon for windows
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-11 22:07:15 +08:00
Le Tan
550a3707a5 remove buttons in directory tree
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-10 23:02:09 +08:00
Le Tan
849fdf05bd support synchronization between preview page and outline
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-08 23:21:22 +08:00
Le Tan
ab91f755c0 add dock widget to display outline
1. Support displaying outline of Markdown in read mode;
2. Support navigating by outline using Marked;

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-07 21:53:33 +08:00
Le Tan
915c25e1a5 support spliting edit windows
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-06 13:03:16 +08:00
Le Tan
1bc95bcea0 disable newNoteAct if FileList's directory is not set
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-03 21:39:46 +08:00
Le Tan
a69bd43e5a disable editNoteAct instead of set it invisible
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-03 21:31:38 +08:00
Le Tan
a6647bb113 add toolbuttons for changing view
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-03 21:21:02 +08:00
Le Tan
2bbffb9002 change icons from png to svg
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-11-02 22:09:31 +08:00
Le Tan
047c26b598 support pasting image in markdown
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-31 22:43:59 +08:00
Le Tan
ec7850685e update a more friendly toolbar
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-30 22:43:30 +08:00
Le Tan
a6774fdf49 handle nokebook renaming correctly
We do not allow modifying the path of an existing notebook.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-30 18:02:41 +08:00
Le Tan
49020d9fb2 do not inherit QListWidget in VFileList
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-30 17:44:21 +08:00
Le Tan
53bce98db6 support changing rendering background color
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-28 21:06:26 +08:00
Le Tan
0c3fc3b006 support changing background color of editor
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-27 22:41:41 +08:00
Le Tan
8960358feb expand tab to spaces
Add configuration "tab_stop_width" and "is_expand_tab". Expand tab to
tab_stop_width spaces if is_expand_tab is true.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-27 10:23:38 +08:00
Le Tan
1f80fb8583 add VFileListPanel as a wrapper of VFileList
Signed-off-by: Le Tan <tamlokveer@gmail.com>
2016-10-26 18:09:07 +08:00