[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-panel-devel
Subject:    Re: how to access data from dataEngine::query in javascript?
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2010-06-29 16:06:05
Message-ID: 201006290906.05993.aseigo () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On June 29, 2010, Thomas Fjellstrom wrote:
> Basically the way the DataEngine is setup right now is each "Host Source"
> is given a single Data Source, with a type of "source", and a QStringList
> "hosts" property listing the hosts owned by this source. After that each
> host that the host source provides is its own source with a number of
> other properties (address, type, mac, name, isUp).

so there are discovery mechanisms (zeroconf, e.g.) and hosts, correct? given 
discovery mechs d1, d2 and d3 and hosts h1..h6, the DataEngine looks something 
like this:

d1
	hosts  = h1, h2
d2
	hosts = h4, h5
d3
	hosts = h6, h7
h1
	address =
	type =
	mac =
	name =
	isUp =
h2
	address =
	type =
	mac =
	name =
	isUp =
h3
	address =
	type =
	mac =
	name =
	isUp =
h4
	address =
	type =
	mac =
	name =
	isUp =
h5
	address =
	type =
	mac =
	name =
	isUp =
h6
	address =
	type =
	mac =
	name =
	isUp =


is there any reason not just just skip the d1, d2 and d3 sources and just list 
the hosts directly? does the visualiation need to list "all hosts that were 
found using libvirt" such that it warrants the above structure?

to me, it would seem more natural to just list the hosts and the visualization 
can initially iterate over all sources() and then connect to the sourceAdded 
and sourceRemoved signals to be notified when hosts come and go.

that would resolve your issue fairly neatly?

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks

["signature.asc" (application/pgp-signature)]

_______________________________________________
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