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