• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KTextEditor

KTextEditor::AnnotationViewInterface

KTextEditor::AnnotationViewInterface Class Reference
[View Extension Interfaces]

#include <annotationinterface.h>

Inheritance diagram for KTextEditor::AnnotationViewInterface:

Inheritance graph
[legend]

List of all members.


Detailed Description

Annotation interface for the View.

Introduction

The AnnotationViewInterface allows to do two things:
  • (1) show/hide the annotation border along with the possibility to add actions into its context menu.
  • (2) set a separate AnnotationModel for the View: Not that this interface inherits the AnnotationInterface.

For a more detailed explanation about whether you want an AnnotationModel in the Document or the View, read the detailed documentation about the AnnotationInterface.

Accessing the AnnotationViewInterface

The AnnotationViewInterface is an extension interface for a View, i.e. the View inherits the interface provided that the used KTextEditor library implements the interface. Use qobject_cast to access the interface:
 // view is of type KTextEditor::View*
 KTextEditor::AnnotationViewInterface *iface =
     qobject_cast<KTextEditor::AnnotationViewInterface*>( view );

 if( iface ) {
     // the implementation supports the interface
     // do stuff
     iface->setAnnotationBorderVisible( true );
 }

Since:
4.1

Definition at line 209 of file annotationinterface.h.


Public Member Functions

virtual void annotationActivated (KTextEditor::View *view, int line)=0
virtual void annotationBorderVisibilityChanged (KTextEditor::View *view, bool visible)=0
virtual void annotationContextMenuAboutToShow (KTextEditor::View *view, QMenu *menu, int line)=0
virtual bool isAnnotationBorderVisible () const =0
virtual void setAnnotationBorderVisible (bool visible)=0
virtual ~AnnotationViewInterface ()

Constructor & Destructor Documentation

virtual KTextEditor::AnnotationViewInterface::~AnnotationViewInterface (  )  [inline, virtual]

Definition at line 212 of file annotationinterface.h.


Member Function Documentation

virtual void KTextEditor::AnnotationViewInterface::annotationActivated ( KTextEditor::View *  view,
int  line 
) [pure virtual]

This signal is emitted when an entry on the annotation border was activated, for example by clicking or double-clicking it.

This follows the KDE wide setting for activation via click or double-clcik

Parameters:
view the view to which the activated border belongs to
line the document line that the activated posistion belongs to

virtual void KTextEditor::AnnotationViewInterface::annotationBorderVisibilityChanged ( KTextEditor::View *  view,
bool  visible 
) [pure virtual]

This signal is emitted when the annotation border is shown or hidden.

Parameters:
view the view to which the border belongs to
visible the current visibility state

virtual void KTextEditor::AnnotationViewInterface::annotationContextMenuAboutToShow ( KTextEditor::View *  view,
QMenu *  menu,
int  line 
) [pure virtual]

This signal is emitted before a context menu is shown on the annotation border for the given line and view.

Note:
Kate Part implementation detail: In Kate Part, the menu has an entry to hide the annotation border.
Parameters:
view the view that the annotation border belongs to
menu the context menu that will be shown
line the annotated line for which the context menu is shown
See also:
setAnnotationContextMenu()

virtual bool KTextEditor::AnnotationViewInterface::isAnnotationBorderVisible (  )  const [pure virtual]

Checks whether the View's annotation border is visible.

virtual void KTextEditor::AnnotationViewInterface::setAnnotationBorderVisible ( bool  visible  )  [pure virtual]

This function can be used to show or hide the annotation border The annotation border is hidden by default.

Parameters:
visible if true the annotation border is shown, otherwise hidden


The documentation for this class was generated from the following file:
  • annotationinterface.h

KTextEditor

Skip menu "KTextEditor"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal