plasma-framework/declarativeimports/core
Artur Duque de Souza f1e61647b6 QML Bindings for Plasma::ToolTips
Implementation of a proxy to make it easy to declare tooltips in QML,
that will use Plasma::ToolTipManager to display tooltips in any item
that is declared in QML.

The syntax is:

import org.kde.plasma.core 0.1 as PlasmaCore

PlasmaCore.ToolTip {
    target: id_of_the_target
    mainText: "hello"
    subText: "world"
    image: "konqueror"
}

The syntax looks pretty straightforward and simple. "id_of_the_target"
is the id of the element which will show the tooltip in case it's hovered.

If the target is a QGraphicsWidget, the code path is really simple but if
it's a QDeclarativeItem, then we create a wrapper (that is a QGraphicsWidget)
and setup that in a way that we set this wrapper as the target on Plasma's
API. For libplasma2 we may want to change this so it's more generic (and
also put this together with the components).

Right now there is two open issues for me:

 1) we should use "image" or "icon"? Allowing the use of a image that is
a string that identifies the icon for KIconLoader seems simpler and more
beautiful to me, but it would be nice to specify a random QPixmap. Besides
being able to use the bindings for QIcon it doesn't look very good. Marco,
do you have any thoughts on this issue?

 2) for touch oriented UIs, the tooltip as it is right now is not very
useful. Is there any "touch" scenario where we may want to use them?

CCMAIL:mart@kde.org
Signed-off-by: Artur Duque de Souza <asouza@kde.org>
2011-04-27 19:45:48 -03:00
..
CMakeLists.txt Separate the DeclarativeItemContainer so it can be used by others 2011-04-27 19:45:48 -03:00
corebindingsplugin.cpp bindings for Plasma::Dialog 2011-02-24 18:29:56 +01:00
corebindingsplugin.h -pedantic 2010-10-16 13:53:51 +00:00
dataengineconsumer_p.h move the core, graphicslayouts and graphicswidgets imports in runtime 2010-10-12 19:51:57 +00:00
dataengineconsumer.cpp move the core, graphicslayouts and graphicswidgets imports in runtime 2010-10-12 19:51:57 +00:00
datamodel.cpp revert old deferred role update hack 2011-04-17 20:46:36 +02:00
datamodel.h revert old deferred role update hack 2011-04-17 20:46:36 +02:00
datasource_p.h minor ws clean 2011-04-12 22:13:23 +02:00
datasource.cpp Do not allow the adition of a source that is already connected 2011-04-24 19:18:14 -03:00
declarativeitemcontainer_p.h Separate the DeclarativeItemContainer so it can be used by others 2011-04-27 19:45:48 -03:00
declarativeitemcontainer.cpp Separate the DeclarativeItemContainer so it can be used by others 2011-04-27 19:45:48 -03:00
dialog.cpp Separate the DeclarativeItemContainer so it can be used by others 2011-04-27 19:45:48 -03:00
dialog.h bind the dialog's window flags 2011-03-21 21:38:48 +01:00
framesvgitem_p.h re-set the prefix after setting the path 2011-03-27 12:38:01 +02:00
framesvgitem.cpp re-set the prefix after setting the path 2011-03-27 12:38:01 +02:00
qmldir move the core, graphicslayouts and graphicswidgets imports in runtime 2010-10-12 19:51:57 +00:00
svgitem_p.h update is not a slot, make one 2011-03-18 13:32:49 +01:00
svgitem.cpp update is not a slot, make one 2011-03-18 13:32:49 +01:00
theme_p.h build++ 2011-04-27 03:49:03 +02:00
theme.cpp build++ 2011-04-27 03:49:03 +02:00
tooltip.cpp QML Bindings for Plasma::ToolTips 2011-04-27 19:45:48 -03:00
tooltip.h QML Bindings for Plasma::ToolTips 2011-04-27 19:45:48 -03:00