1 | /* |
2 | SPDX-FileCopyrightText: 2002, 2003, 2004 Anders Lund <anders.lund@lund.tdcadsl.dk> |
3 | SPDX-FileCopyrightText: 2002 John Firebaugh <jfirebaugh@kde.org> |
4 | |
5 | SPDX-License-Identifier: LGPL-2.0-or-later |
6 | */ |
7 | |
8 | #ifndef KATE_BOOKMARKS_H |
9 | #define KATE_BOOKMARKS_H |
10 | |
11 | #include <QObject> |
12 | |
13 | namespace KTextEditor |
14 | { |
15 | class ViewPrivate; |
16 | } |
17 | |
18 | class KToggleAction; |
19 | class KActionCollection; |
20 | class ; |
21 | class QAction; |
22 | |
23 | class KateBookmarks : public QObject |
24 | { |
25 | public: |
26 | enum Sorting { Position, Creation }; |
27 | explicit KateBookmarks(KTextEditor::ViewPrivate *parent, Sorting sort = Position); |
28 | ~KateBookmarks() override; |
29 | |
30 | void createActions(KActionCollection *); |
31 | |
32 | KateBookmarks::Sorting sorting() |
33 | { |
34 | return m_sorting; |
35 | } |
36 | void setSorting(Sorting s) |
37 | { |
38 | m_sorting = s; |
39 | } |
40 | |
41 | protected: |
42 | void (QMenu &); |
43 | |
44 | private: |
45 | void toggleBookmark(); |
46 | void clearBookmarks(); |
47 | |
48 | void gotoLine(int line); |
49 | |
50 | void (); |
51 | |
52 | void goNext(); |
53 | void goPrevious(); |
54 | |
55 | void marksChanged(); |
56 | |
57 | private: |
58 | KTextEditor::ViewPrivate *m_view; |
59 | KToggleAction *m_bookmarkToggle; |
60 | QAction *m_bookmarkClear; |
61 | QAction *m_goNext; |
62 | QAction *m_goPrevious; |
63 | |
64 | Sorting m_sorting; |
65 | QMenu *; |
66 | |
67 | uint _tries; |
68 | }; |
69 | |
70 | #endif |
71 | |