[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: [Technical Question] - How to trigger the applets actions menu from a second window of a Panel?
From: Michail Vourlakos <mvourlakos () gmail ! com>
Date: 2016-11-29 20:59:10
Message-ID: b110cd57-2c81-63d9-1cd5-0bcc609ffe9c () gmail ! com
[Download RAW message or body]
> ----
>
> Plasma::Applet *applet = 0;
> foreach (QObject *appletObject, m_appletInterfaces) {
> if (AppletInterface *ai = qobject_cast<AppletInterface
> *>(appletObject)) {
> if (ai->isVisible() && ai->contains(ai->mapFromItem(this,
> event->posF()))) {
> applet = ai->applet();
> break;
> } else {
> ai = 0;
> }
> }
> }
>
> ---
>
> for the m_appletsInterfaces I can use the plasmoid.applets variable to
> get them but AppletInterface is not exposed in plasma library and I
> need it in order to get its applet() ///Plasma::Applet
>
>
no worries about that, I solved this by accessing the
PlasmaQuick::AppletQuickItem's ...
[Attachment #3 (text/html)]
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<blockquote
cite="mid:e86aeb3f-3120-a3ef-7f15-14f8ccbe6419@gmail.com"
type="cite">
<p><tt><font size="+2">----</font></tt></p>
<p><tt><font size="+2"> Plasma::Applet *applet = 0;<br>
foreach (QObject *appletObject, m_appletInterfaces) {<br>
if (AppletInterface *ai =
qobject_cast<AppletInterface *>(appletObject)) {<br>
if (ai->isVisible() &&
ai->contains(ai->mapFromItem(this, event->posF())))
{<br>
applet = ai->applet();<br>
break;<br>
} else {<br>
ai = 0;<br>
}<br>
}<br>
}</font></tt></p>
<p><tt><font size="+2">---<br>
</font></tt></p>
<p><tt><font size="+2">for the m_appletsInterfaces I can use the
plasmoid.applets variable to get them but AppletInterface is
not exposed in plasma library and I need it in order to get
its applet() ///Plasma::Applet</font></tt></p>
<br>
</blockquote>
<br>
<font size="+2"><tt>no worries about that, I solved this by accessing
the PlasmaQuick::AppletQuickItem's ...<br>
<br>
<br>
</tt></font>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic