Warning, /plasma/plasma-desktop/design/tooltips is written in an unsupported language. File is not indexed.
0001 Tooltips 0002 ========== 0003 0004 Overview 0005 -------- 0006 libplasma provides facilities to manage tooltips that display extended information in a visually pleasing and consistent manner for QGraphicsWidgets. These tooltip windows are themed using Plasma::Theme. 0007 0008 Timeline 0009 -------- 0010 Introduced in: libplasma 2.1 (KDE 4.2.0) 0011 0012 Component Type 0013 -------------- 0014 ToolTipManager is a QObject subclass in libplasma. 0015 ToolTip is an internal QWidget subclass in libplasma. 0016 0017 Registering Tooltips 0018 -------------------- 0019 ToolTipManger is quite simple to use: simply call setWidgetToolTipContent using the struct ToolTipContent. This causes the widget to be registered if it isn't already. Alternatively, for widgets that fill the data on demand, call registerWidget directly. 0020 0021 Widgets are unregistered automatically upon destruction, but can also be manually unregistered by calling ToolTipMnager::unregisterWidget. 0022 0023 An event filter is registered on each registered widget and hover events that occur trigger calls to showToolTip and hideToolTip. The hover events are not, however, filtered out. 0024 0025 Note: If another event filter is placed on registered widget that filters out these events, it may be necessary to manually call showToolTip and hideToolTip. 0026 0027 ToolTip Updates 0028 --------------- 0029 Updating tooltip data is supported by means of invoking slots on the associated widget if they exist. In particular, just prior to being shown the toolTipAboutToShow method is invoked and when hiding the toolTipHidden method is invoked. 0030 0031 ToolTip Visualization 0032 --------------------- 0033 The internal (non-exported) ToolTip class is used to actually display the tooltips. These are associated with widgets and created as necessary. 0034 0035 ToolTip displays are only created when data is set, and are deleted if an empty ToolTipData struct is passed in. This keeps memory usage due to ToolTip objects down. 0036 0037 Future Work 0038 ----------- 0039 N/A