KTextEditor::InlineNote

KTextEditor::InlineNote Class Reference

#include <KTextEditor/InlineNote>

Public Member Functions

 InlineNote (const KateInlineNoteData &data)
 
QFont font () const
 
int index () const
 
int lineHeight () const
 
KTextEditor::Cursor position () const
 
InlineNoteProviderprovider () const
 
bool underMouse () const
 
const KTextEditor::Viewview () const
 
qreal width () const
 

Detailed Description

Describes an inline note.

This class contains all the information required to deal with a particular inline note. It is instantiated and populated with information internally by KTextEditor based on the list of notes returned by InlineNoteProvider::inlineNotes(), and then passed back to the user of the API.

Note
Users of the InlineNoteInterface API should never create a InlineNote themselves. Maybe it helps to think of a InlineNote as if it were a QModelIndex. Only the internal KTextEditor implementation creates them.
Since
5.50

Definition at line 39 of file inlinenote.h.

Constructor & Destructor Documentation

InlineNote::InlineNote ( const KateInlineNoteData data)

Constructs an inline note.

User code never calls this constructor, since notes are created internally only from the columns returned by InlineNoteProvider::inlineNotes(), and then passed around as handles grouping useful information.

Definition at line 288 of file ktexteditor.cpp.

Member Function Documentation

QFont InlineNote::font ( ) const

The font of the text surrounding this note.

This can be used to obtain the QFontMetrics or similar font information.

Definition at line 337 of file ktexteditor.cpp.

int InlineNote::index ( ) const

The index of this note, i.e.

its index in the vector returned by the provider for a given line

Definition at line 342 of file ktexteditor.cpp.

int InlineNote::lineHeight ( ) const

The height of the line containing this note.

Definition at line 347 of file ktexteditor.cpp.

KTextEditor::Cursor InlineNote::position ( ) const

The cursor position of this note.

Definition at line 352 of file ktexteditor.cpp.

KTextEditor::InlineNoteProvider * InlineNote::provider ( ) const

The provider which created this note.

Definition at line 327 of file ktexteditor.cpp.

bool KTextEditor::InlineNote::underMouse ( ) const

Returns whether the mouse cursor is currently over this note.

Note
This flag is useful when in InlineNoteProvider::paintInlineNote().

Definition at line 298 of file ktexteditor.cpp.

const KTextEditor::View * InlineNote::view ( ) const

The View this note is shown in.

Definition at line 332 of file ktexteditor.cpp.

qreal InlineNote::width ( ) const

Returns the width of this note in pixels.

Definition at line 293 of file ktexteditor.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Aug 14 2020 22:57:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.