KTextEditor::TextHintProvider
#include <texthintinterface.h>
Public Member Functions | |
TextHintProvider () | |
virtual | ~TextHintProvider () |
virtual QString | textHint (KTextEditor::View *view, const KTextEditor::Cursor &position)=0 |
Detailed Description
Class to provide text hints for a View.
The class TextHintProvider is used in combination with TextHintInterface. TextHintProvider allows to provide text hint information for text under the mouse cursor.
To use this class, derive your provider from TextHintProvider and register it with TextHintInterface::registerTextHintProvider(). When not needed anymore, make sure to remove your provider by calling TextHintInterface::unregisterTextHintProvider(), otherwise the View will contain a dangling pointer to your potentially deleted provider.
Detailed information about how to use the TextHintInterface can be found in the documentation about the TextHintInterface.
- See also
- TextHintInterface
since
5.0
Definition at line 41 of file texthintinterface.h.
Constructor & Destructor Documentation
◆ TextHintProvider()
|
default |
Default constructor.
◆ ~TextHintProvider()
|
virtualdefault |
Virtual destructor to allow inheritance.
Member Function Documentation
◆ textHint()
|
pure virtual |
This function is called whenever the users hovers over text such that the text hint delay passes.
Then, textHint() is called for each registered TextHintProvider.
Return the text hint (possibly Qt richtext) for view
at position
.
If you do not have any contents to show, just return an empty QString().
- Parameters
-
view the view that requests the text hint position text cursor under the mouse position
- Returns
- text tool tip to be displayed, may be Qt richtext
The documentation for this class was generated from the following files:
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.