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
44protected:
45 void insertBookmarks(QMenu &menu);
46
47private:
48 void toggleBookmark();
49 void clearBookmarks();
50
51 void gotoLine(int line);
52
53 void bookmarkMenuAboutToShow();
54
55 void goNext();
56 void goPrevious();
57
58 void marksChanged();
59
60private:
61 KTextEditor::ViewPrivate *m_view;
62 KToggleAction *m_bookmarkToggle;
63 QAction *m_bookmarkClear;
64 QAction *m_goNext;
65 QAction *m_goPrevious;
66
67 Sorting m_sorting;
68 QMenu *m_bookmarksMenu;
69
70 uint _tries;
71};
72
73#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-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:01:56 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.