KTextEditor::MarkInterfaceV2 Class Referenceabstract

#include <markinterface.h>

Inheritance diagram for KTextEditor::MarkInterfaceV2:

Public Member Functions

virtual QIcon markIcon (MarkTypes markType) const =0
virtual void setMarkIcon (MarkTypes markType, const QIcon &icon)=0
- Public Member Functions inherited from KTextEditor::MarkInterface
virtual ~MarkInterface ()
virtual void addMark (int line, uint markType)=0
virtual void clearMark (int line)=0
virtual void clearMarks ()=0
virtual uint editableMarks () const =0
virtual uint mark (int line)=0
virtual void markChanged (KTextEditor::Document *document, KTextEditor::Mark mark, KTextEditor::MarkInterface::MarkChangeAction action)=0
virtual QString markDescription (MarkTypes mark) const =0
virtual QPixmap markPixmap (MarkTypes mark) const =0
virtual const QHash< int, KTextEditor::Mark * > & marks ()=0
virtual void marksChanged (KTextEditor::Document *document)=0
virtual void removeMark (int line, uint markType)=0
virtual void setEditableMarks (uint markMask)=0
virtual void setMark (int line, uint markType)=0
virtual void setMarkDescription (MarkTypes mark, const QString &text)=0
virtual void setMarkPixmap (MarkTypes mark, const QPixmap &pixmap)=0

Additional Inherited Members

- Public Types inherited from KTextEditor::MarkInterface
enum  MarkChangeAction { MarkAdded = 0, MarkRemoved = 1 }
enum  MarkTypes {
  markType01 = 0x1, markType02 = 0x2, markType03 = 0x4, markType04 = 0x8,
  markType05 = 0x10, markType06 = 0x20, markType07 = 0x40, markType08 = 0x80,
  markType09 = 0x100, markType10 = 0x200, markType11 = 0x400, markType12 = 0x800,
  markType13 = 0x1000, markType14 = 0x2000, markType15 = 0x4000, markType16 = 0x8000,
  markType17 = 0x10000, markType18 = 0x20000, markType19 = 0x40000, markType20 = 0x80000,
  markType21 = 0x100000, markType22 = 0x200000, markType23 = 0x400000, markType24 = 0x800000,
  markType25 = 0x1000000, markType26 = 0x2000000, markType27 = 0x4000000, markType28 = 0x8000000,
  markType29 = 0x10000000, markType30 = 0x20000000, markType31 = 0x40000000, markType32 = 0x80000000,
  Bookmark = markType01, BreakpointActive = markType02, BreakpointReached = markType03, BreakpointDisabled = markType04,
  Execution = markType05, Warning = markType06, Error = markType07, SearchMatch = markType32
- Signals inherited from KTextEditor::MarkInterface
void markClicked (KTextEditor::Document *document, KTextEditor::Mark mark, bool &handled)
void markContextMenuRequested (KTextEditor::Document *document, KTextEditor::Mark mark, QPoint pos, bool &handled)
void markToolTipRequested (KTextEditor::Document *document, KTextEditor::Mark mark, QPoint position, bool &handled)
- Static Public Member Functions inherited from KTextEditor::MarkInterface
static int reservedMarkersCount ()

Detailed Description

Mark extension interface for the Document, version 2.


The MarkInterfaceV2 allows to do the same as MarkInterface and additionally

  • (1) set an icon for a mark type instead of just a pixmap

Accessing the Interface

The MarkInterfaceV2 is supposed to be an extension interface for a Document, i.e. the Document inherits the interface provided that the KTextEditor library in use implements the interface. Use qobject_cast to access the interface:

// doc is of type KTextEditor::Document*
auto iface = qobject_cast<KTextEditor::MarkInterfaceV2*>(doc);
if (iface) {
// the implementation supports the interface
// do stuff
} else {
// the implementation does not support the interface

Definition at line 423 of file markinterface.h.

Member Function Documentation

virtual QIcon KTextEditor::MarkInterfaceV2::markIcon ( MarkTypes  markType) const
pure virtual

Get the mark's icon.

markTypemark type. If the icon does not exist the resulting is null (check with QIcon::isNull()).
See also

Implemented in KTextEditor.

virtual void KTextEditor::MarkInterfaceV2::setMarkIcon ( MarkTypes  markType,
const QIcon icon 
pure virtual

Set the mark's icon to icon.

markTypemark type to which the icon will be attached
iconnew icon
See also

The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Nov 26 2020 22:56:16 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.