[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Another Data Engine/QML Question
From: Eric Mesa <ericsbinaryworld () gmail ! com>
Date: 2012-01-27 6:06:21
Message-ID: CAKYHq8KZhW705TqFLH5geyUVw6aoF38ABay5iyJ+vh3nGvDSNg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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
[Attachment #5 (text/html)]
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:<div><br></div><div><div>PlasmaCore.DataSource {</div><div> id: \
viewsSource</div><div> engine: "flickrviewsengine2"</div><div> \
interval: 0</div><div> Component.onCompleted: connectedSources = \
sources</div><div> onSourceAdded: connectSource(source)</div> <div> \
}</div><div><br></div><div>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:</div> \
<div><br></div><div><div>Button{</div><div><span class="Apple-tab-span" \
style="white-space:pre"> </span> id: v1500</div><div><span \
class="Apple-tab-span" style="white-space:pre"> </span> bLabel: \
"1500"</div> <div><span class="Apple-tab-span" \
style="white-space:pre"> </span> onButtonClick: currentGroup = \
viewsSource.data["1500"]["Group 1500"]</div><div><span \
class="Apple-tab-span" style="white-space:pre"> </span> }</div> \
</div><div><br></div><div>(there are a bunch of them - one per \
group)</div><div><br></div><div>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? </div> \
<div><br></div><div>Thanks,</div>--<br>Eric Mesa<br><a \
href="http://www.ericsbinaryworld.com">http://www.ericsbinaryworld.com</a><br> </div>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic