Another Data Engine/QML Question

Eric Mesa ericsbinaryworld at gmail.com
Fri Jan 27 06:06:21 UTC 2012


Alright, I'm almost where I want to be with this plasmoid.  I just have one
question about the way I'm accessing the data engine.  Right now I have
this code:

PlasmaCore.DataSource {
         id: viewsSource
         engine: "flickrviewsengine2"
         interval: 0
         Component.onCompleted: connectedSources = sources
         onSourceAdded: connectSource(source)
     }

So when my plasmoid first starts up, it doesn't load until it has caused
the data engine to grab all the data.  Then I am able to access the
engines' data via these buttons I've created:

Button{
      id: v1500
      bLabel: "1500"
      onButtonClick: currentGroup = viewsSource.data["1500"]["Group 1500"]
    }

(there are a bunch of them - one per group)

If I wanted, instead, to have the data engine grab its data as I click on
each of the buttons, so that the plasmoid could fully load first - how
would I change my code?

Thanks,
--
Eric Mesa
http://www.ericsbinaryworld.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120127/801ce9f3/attachment-0001.html>


More information about the Plasma-devel mailing list