KTextEditor

katebookmarks.h
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
13namespace KTextEditor
14{
15class ViewPrivate;
16}
17
18class KToggleAction;
20class QMenu;
21class QAction;
22
23class KateBookmarks : public QObject
24{
25public:
26 enum Sorting {
27 Position,
28 Creation
29 };
30 explicit KateBookmarks(KTextEditor::ViewPrivate *parent, Sorting sort = Position);
31 ~KateBookmarks() override;
32
33 void createActions(KActionCollection *);
34
35 KateBookmarks::Sorting sorting()
36 {
37 return m_sorting;
38 }
39 void setSorting(Sorting s)
40 {
41 m_sorting = s;
42 }
43
44 void setCycleThroughBookmarks(bool e)
45 {
46 m_cycleThroughBookmarks = e;
47 }
48
49protected:
50 void insertBookmarks(QMenu &menu);
51
52private:
53 void toggleBookmark();
54 void clearBookmarks();
55
56 void gotoLine(int line);
57
58 void bookmarkMenuAboutToShow();
59
60 void goNext();
61 void goPrevious();
62
63 void marksChanged();
64
65private:
66 KTextEditor::ViewPrivate *m_view;
67 KToggleAction *m_bookmarkToggle;
68 QAction *m_bookmarkClear;
69 QAction *m_goNext;
70 QAction *m_goPrevious;
71
72 Sorting m_sorting;
73 QMenu *m_bookmarksMenu;
74
75 uint _tries;
76 bool m_cycleThroughBookmarks = true;
77};
78
79#endif
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 28 2025 12:00:12 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.