KTextEditor

kateannotationitemdelegate.h
1/*
2 SPDX-FileCopyrightText: 2017-18 Friedrich W. H. Kossebau <kossebau@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KATE_ANNOTATIONITEMDELEGATE_H
8#define KATE_ANNOTATIONITEMDELEGATE_H
9
10#include <ktexteditor/abstractannotationitemdelegate.h>
11
12namespace KTextEditor
13{
14class ViewPrivate;
15}
16class KateViewInternal;
17
18class KateAnnotationItemDelegate : public KTextEditor::AbstractAnnotationItemDelegate
19{
20public:
21 explicit KateAnnotationItemDelegate(QObject *parent);
22 ~KateAnnotationItemDelegate() override;
23
24public:
25 void paint(QPainter *painter, const KTextEditor::StyleOptionAnnotationItem &option, KTextEditor::AnnotationModel *model, int line) const override;
26 bool helpEvent(QHelpEvent *event,
30 int line) override;
31 void hideTooltip(KTextEditor::View *view) override;
32 QSize sizeHint(const KTextEditor::StyleOptionAnnotationItem &option, KTextEditor::AnnotationModel *model, int line) const override;
33
34private:
35 mutable qreal m_maxCharWidth = 0.0;
36 mutable QFontMetricsF m_cachedDataContentFontMetrics;
37};
38
39#endif
A delegate for rendering line annotation information and handling events.
An model for providing line annotation information.
The style option set for an annotation item, as painted by AbstractAnnotationItemDelegate.
A text widget with KXMLGUIClient that represents a Document.
Definition view.h:244
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...
virtual bool event(QEvent *e)
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.