<div class="gmail_quote">2011/2/24 Marco Martin <span dir="ltr"><<a href="mailto:notmart@gmail.com">notmart@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Thursday 24 February 2011, Luiz Romário Santana Rios wrote:<br>
> ><br>
> > --<br>
<div class="im">> > Luiz Romário Santana Rios<br>
><br>
> So, I took a look at the docs, and it looks rather simple to do that<br>
> button. You tell me if I'm doing it right:<br>
><br>
> - Create an icon widget.<br>
> + Just a Plasma.IconWidget, right? The only problem is that QIcon<br>
> doesn't seem to be supported by QML, so I can't set the icon property.<br>
<br>
</div>with a qml-only plasmoid you can<br>
icon: QIcon("preferences-activities")<br>
<div class="im"><br>
> - Declare a QObject based on QDBusInterface to QML.<br>
> + Since QML elements only support default constructors, create a new<br>
> class that composes QDBusInterface and turn each argument of the<br>
> constructor into a property.<br>
> + Create an asyncCall method that just calls QDBusInterface's asyncCall<br>
> and make it Q_EXPORTABLE.<br>
> - Instantiate a DBus Interface of plasma on the QML.<br>
> + Just pass the constructor parameters as properties (How do I know<br>
> which plasma shell [plasma-desktop, plasma-netbook] is running?).<br>
> - Make an asyncCall onClicked.<br>
> + onClicked: iface.asyncCall("local.PlasmaApp.toggleDashborad()"), I<br>
> guess.<br>
<br>
</div>what about putting this in the activities dataengine?</blockquote><div>Is there such a dataengine? Or you're planning on creating it?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
</blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
it would be an operation of the service associated to the source "Current"<br>
<br>
this hoewver would make the activities service depending on plasma-desktop, a<br>
thing that i really don't like.<br></blockquote><div>That would make the plasmoid depend on plasma. The DBus interface is still there, isn't it?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
probably the service should figure out the bus name of its running process and<br>
we then require that a plasma shell shows a toggleActivityManager() (if it<br>
supports actvities)<br>
<br>
to figure the bus name it could be constructed the same way, so org.kde<br>
.appname of the kapplication, - pid.<br>
<div><div></div><div class="h5"><br>
<br>
Cheers,<br>
Marco Martin<br>
_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Luiz Romário Santana Rios<br>