KTextEditor::TextHintInterface
Inherited by KTextEditor::ViewPrivate.
Public Member Functions | |
virtual void | registerTextHintProvider (KTextEditor::TextHintProvider *provider)=0 |
virtual void | setTextHintDelay (int delay)=0 |
virtual int | textHintDelay () const =0 |
virtual void | unregisterTextHintProvider (KTextEditor::TextHintProvider *provider)=0 |
Detailed Description
Text hint interface showing tool tips under the mouse for the View.
Introduction
The text hint interface provides a way to show tool tips for text located under the mouse. Possible applications include showing a value of a variable when debugging an application, or showing a complete path of an include directive.

To register as text hint provider, call registerTextHintProvider() with an instance that inherits TextHintProvider. Finally, make sure you remove your text hint provider by calling unregisterTextHintProvider().
Text hints are shown after the user hovers with the mouse for a delay of textHintDelay() milliseconds over the same word. To change the delay, call setTextHintDelay().
Accessing the TextHintInterface
The TextHintInterface is an extension interface for a View, i.e. the View inherits the interface. Use qobject_cast to access the interface:
- See also
- TextHintProvider
- Since
- 4.11
Definition at line 67 of file texthintinterface.h.
Member Function Documentation
◆ registerTextHintProvider()
|
pure virtual |
Register the text hint provider provider
.
Whenever the user hovers over text, provider
will be asked for a text hint. When the provider is about to be destroyed, make sure to call unregisterTextHintProvider() to avoid a dangling pointer.
- Parameters
-
provider text hint provider
◆ setTextHintDelay()
|
pure virtual |
Set the text hint delay to delay
milliseconds.
The delay specifies the time the user needs to hover over the text before the tool tip is shown. Therefore, delay
should not be too large, a value of 500 milliseconds is recommended and set by default.
If delay
is <= 0, the default delay will be set.
- Parameters
-
delay tool tip delay in milliseconds
◆ textHintDelay()
|
pure virtual |
Get the text hint delay in milliseconds.
By default, the text hint delay is set to 500 milliseconds. It can be changed by calling setTextHintDelay()
.
◆ unregisterTextHintProvider()
|
pure virtual |
Unregister the text hint provider provider
.
- Parameters
-
provider text hint provider to unregister
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Sep 27 2023 03:48:57 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.