Changeset View
Changeset View
Standalone View
Standalone View
src/view/inlinenotedata.h
- This file was added.
1 | /* This file is part of the KDE libraries | ||||
---|---|---|---|---|---|
2 | | ||||
3 | Copyright 2018 Sven Brauch <mail@svenbrauch.de> | ||||
4 | Copyright 2018 Michal Srb <michalsrb@gmail.com> | ||||
5 | Copyright 2018 Dominik Haumann <dhaumann@kde.org> | ||||
6 | | ||||
7 | This library is free software; you can redistribute it and/or | ||||
8 | modify it under the terms of the GNU Lesser General Public | ||||
9 | License as published by the Free Software Foundation; either | ||||
10 | version 2.1 of the License, or (at your option) version 3, or any | ||||
11 | later version accepted by the membership of KDE e.V. (or its | ||||
12 | successor approved by the membership of KDE e.V.), which shall | ||||
13 | act as a proxy defined in Section 6 of version 3 of the license. | ||||
14 | | ||||
15 | This library is distributed in the hope that it will be useful, | ||||
16 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||||
18 | Library General Public License for more details. | ||||
19 | | ||||
20 | You should have received a copy of the GNU Library General Public License | ||||
21 | along with this library; see the file COPYING.LIB. If not, write to | ||||
22 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||||
23 | Boston, MA 02110-1301, USA. | ||||
24 | */ | ||||
25 | #ifndef KATE_INLINENOTE_DATA_H | ||||
26 | #define KATE_INLINENOTE_DATA_H | ||||
27 | | ||||
28 | #include <ktexteditor/cursor.h> | ||||
29 | #include <QFont> | ||||
30 | | ||||
31 | namespace KTextEditor { | ||||
32 | class InlineNoteProvider; | ||||
33 | class View; | ||||
34 | } | ||||
35 | | ||||
36 | /** | ||||
37 | * Internal data container for KTextEditor::InlineNote interface. | ||||
38 | */ | ||||
39 | class KateInlineNoteData | ||||
40 | { | ||||
41 | public: | ||||
42 | KateInlineNoteData() = default; | ||||
43 | KateInlineNoteData(KTextEditor::InlineNoteProvider* provider, | ||||
44 | const KTextEditor::View* view, | ||||
45 | const KTextEditor::Cursor& position, | ||||
46 | int index, | ||||
47 | bool hasFocus, | ||||
48 | const QFont& font, | ||||
49 | int lineHeight); | ||||
50 | | ||||
51 | KTextEditor::InlineNoteProvider* m_provider = nullptr; | ||||
52 | const KTextEditor::View* m_view = nullptr; | ||||
53 | KTextEditor::Cursor m_position; | ||||
54 | int m_index = -1; | ||||
55 | bool m_hasFocus = false; | ||||
56 | QFont m_font; | ||||
57 | int m_lineHeight = -1; | ||||
58 | }; | ||||
59 | | ||||
60 | #endif |