KTextEditor
#include <view.h>
Public Member Functions | |
virtual | ~CoordinatesToCursorInterface () |
virtual KTextEditor::Cursor | coordinatesToCursor (const QPoint &coord) const =0 |
Detailed Description
Pixel coordinate to Cursor extension interface for the View.
Introduction
The CoordinatesToCursorInterface makes it possible to map a pixel coordinate to a cursor position. To map a cursor position to pixel coordinates use one of
Accessing the CoordinatesToCursorInterface
The CoordinatesToCursorInterface 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:
- See also
- KTextEditor::View
- Since
- 4.2
- Note
- KDE5: merge into KTextEditor::View (or name it ViewportInterface and add accessors to the QScrollBars and convenience functions like cursorToCoordinate(), scollLines(int count), etc.
Constructor & Destructor Documentation
|
virtual |
Virtual destructor.
Definition at line 299 of file ktexteditor.cpp.
Member Function Documentation
|
pure virtual |
Get the text-cursor in the document from the screen coordinates, relative to the view widget.
To map a cursor to pixel coordinates (the reverse transformation) use KTextEditor::View::cursorToCoordinate().
- Parameters
-
coord coordinates relative to the view widget
- Returns
- cursor in the View, that points onto the character under the given coordinate. May be KTextEditor::Cursor::invalid().
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:52:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.