PDA

View Full Version : Widget Library/Repository



strandtc
1st March 2006, 06:49
I have done a couple quick searchs, and havn't found anything yet...

Does anyone run a widget library/repository site? For example.. if I write a widget that does xyz... someone else might find it useful. And I know there are widgets that I wouldn't mind using that other people have probably already written.

Some examples... I'm writting a widget that will recieve Netflow v5 udp packets, store the data in them, and produce statistics about dataflows. I'm also writting a widget that will listen to gpsd, and will emit signals when gps metrics change (postion, heading, etc). I'm also working on some more traditional stuff, like bitmap based buttons... bitmap based gauges (essentually a dial, but looks alot better), etc.

Just wondering if such a thing exists.

wysota
1st March 2006, 08:23
I have done a couple quick searchs, and havn't found anything yet...
Does anyone run a widget library/repository site?
Trolltech had (has?) one. We're planning to make one too. I have already written somewhere on this forum -- if anyone has some code she/he wants to share, please send it to me and I'll place it when the repository is ready. My offer still stands.


I'm writting a widget that will recieve Netflow v5 udp packets
store the data in them, and produce statistics about dataflows.
Hmm... the widget receives those packets? Did you think about splitting that functionality so that the network part is done outside the widget and just communicate with it?


I'm also writting a widget that will listen to gpsd, and will emit signals when gps metrics change (postion, heading, etc).
Same as above...


I'm also working on some more traditional stuff, like bitmap based buttons... What's wrong with QPushButton?

high_flyer
1st March 2006, 11:43
Trolltech had (has?) one.
ftp://ftp.trolltech.com/contrib/

wysota
1st March 2006, 12:45
ftp://ftp.trolltech.com/contrib/
http://www.trolltech.com/freesoftware/index.html

strandtc
1st March 2006, 19:03
The links posted are useful.. but not quite what I was thinking.

I was thinking more like a database driven website that users could upload some code (objects, examples, etc) then catagorize, and add additional keywords.

So when developer x is looking for widgets what have to do with y, they do a simple keyword search. You could also include additional searchable items, like what the parent class is or signals and slots provided.

In regards to the widgets I mentioned... I'll briefly describe what I'm talking about.
For example... object: gpsReciever Object is created, recieves telemetry data from gps unit in string format, stores important metrics, and signals on state changes. This is a self contained object that can be put into any number of programs. All you have to do is to add a few connect statments, so that when speed, heading, position changes, it updates your form/dialog/etc.

Same with the network data processing widget... why have multiple objects, where you have to write more code at a higher level to get 1 section of functionality to work? The udp packet reading is done with a QSocketDevice, and QSocketNotifier.

QPushButton doesn't do what I'm looking for. For example.. I have pixButton class I created, that loads 3 images. It can be either a toggle or pushbutton. The first 2 images are an idle and toggled image. So far.. nothing special. The pixButton has a 3rd state. You can set the button to an alert state, which makes the button flash between the 3rd image, and the normal state (idle or toggle) at a configurable flash rate. The alert and toggle signals are not the same.

Now I gotta admit.. I'm a hack when it comes to programming. The programming I'm doing is a means to an end on a project I'm doing.

Just a suggestion if someone find it interesting (code repository).

-Chris


Trolltech had (has?) one. We're planning to make one too. I have already written somewhere on this forum -- if anyone has some code she/he wants to share, please send it to me and I'll place it when the repository is ready. My offer still stands.


Hmm... the widget receives those packets? Did you think about splitting that functionality so that the network part is done outside the widget and just communicate with it?


Same as above...

What's wrong with QPushButton?

high_flyer
1st March 2006, 19:37
In regards to the widgets I mentioned...

This is a self contained object
I think what wysota was trying to hint, is that objects like a gpsRecieve, is better as a non gui component, and widgets are gui components.
wysota - correct me if I was wrong about my asumption.