[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: [Technical Question] - How to trigger the applets actions menu from a second window of a Panel? (e.g
From: Michail Vourlakos <mvourlakos () gmail ! com>
Date: 2016-11-29 16:51:46
Message-ID: e86aeb3f-3120-a3ef-7f15-14f8ccbe6419 () gmail ! com
[Download RAW message or body]
Hello everyone,
A couple of days ago, in a discussion with plasma developers it was
decided that Now Dock should better support window masking (for
animations etc.) in a separate window than the main panel one. What is
doing in the following 0.5 version is a technique based on a plasma
mobile technique in which all the presentation of the plasmoids for the
panel are done in a secondary window except on widgets unlocked state
for which a reparenting is taken into place and the plasmoids are moved
to original panel window in order for the user to be able to add,
remove, move plasmoids etc... This has worked flawlessly and the
animations and masking (transparent areas are allowing the mouse events
to go to underneath windows) are working great.
But one small problem arose with this approach. The plasmoids when they
are in the secondary window (in locked widgets state that is) do not
show their menu with right-click. As it appears, I should provide that
functionality from my c++ code but I have a problem, the code which is
doing its magic is from containmentinterface.cpp:
----
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
any ideas ???
regards,
michail
[Attachment #3 (text/html)]
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><tt><font size="+2">Hello everyone,</font></tt></p>
<p><tt><font size="+2"><br>
</font></tt></p>
<p><tt><font size="+2">A couple of days ago, in a discussion with
plasma developers it was decided that Now Dock should better
support window masking (for animations etc.) in a separate
window than the main panel one. What is doing in the following
0.5 version is a technique based on a plasma mobile technique
in which all the presentation of the plasmoids for the panel
are done in a secondary window except on widgets unlocked
state for which a reparenting is taken into place and the
plasmoids are moved to original panel window in order for the
user to be able to add, remove, move plasmoids etc... This has
worked flawlessly and the animations and masking (transparent
areas are allowing the mouse events to go to underneath
windows) are working great.</font></tt></p>
<p><tt><font size="+2"><br>
</font></tt></p>
<p><tt><font size="+2">But one small problem arose with this
approach. The plasmoids when they are in the secondary window
(in locked widgets state that is) do not show their menu with
right-click. As it appears, I should provide that
functionality from my c++ code but I have a problem, the code
which is doing its magic is from containmentinterface.cpp:</font></tt></p>
<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>
<p><tt><font size="+2"><br>
</font></tt></p>
<p><tt><font size="+2">any ideas ???</font></tt></p>
<p><tt><font size="+2"><br>
</font></tt></p>
<p><tt><font size="+2">regards,</font></tt></p>
<p><tt><font size="+2">michail</font></tt><br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</p>
<p>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</p>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic