KTextEditor::InlineNote

Search for usage in LXR

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::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 278 of file ktexteditor.cpp.

Member Function Documentation

◆ font()

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 327 of file ktexteditor.cpp.

◆ index()

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 332 of file ktexteditor.cpp.

◆ lineHeight()

int InlineNote::lineHeight ( ) const

The height of the line containing this note.

Definition at line 337 of file ktexteditor.cpp.

◆ position()

KTextEditor::Cursor InlineNote::position ( ) const

The cursor position of this note.

Definition at line 342 of file ktexteditor.cpp.

◆ provider()

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

The provider which created this note.

Definition at line 317 of file ktexteditor.cpp.

◆ underMouse()

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 288 of file ktexteditor.cpp.

◆ view()

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

The View this note is shown in.

Definition at line 322 of file ktexteditor.cpp.

◆ width()

qreal InlineNote::width ( ) const

Returns the width of this note in pixels.

Definition at line 283 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-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.