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.

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.

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 276 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 325 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 330 of file ktexteditor.cpp.

int InlineNote::lineHeight ( ) const

The height of the line containing this note.

Definition at line 335 of file ktexteditor.cpp.

KTextEditor::Cursor InlineNote::position ( ) const

The cursor position of this note.

Definition at line 340 of file ktexteditor.cpp.

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

The provider which created this note.

Definition at line 315 of file ktexteditor.cpp.

bool KTextEditor::InlineNote::underMouse ( ) const

Returns whether the mouse cursor is currently over this note.

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

Definition at line 286 of file ktexteditor.cpp.

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

The View this note is shown in.

Definition at line 320 of file ktexteditor.cpp.

qreal InlineNote::width ( ) const

Returns the width of this note in pixels.

Definition at line 281 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-2021 The KDE developers.
Generated on Sun Sep 26 2021 22:58:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.