[Qt-interest] What to use as a base class for histogram classes?

Arnold Krille arnold at arnoldarts.de
Mon Sep 21 23:16:21 CEST 2009


On Monday 21 September 2009 20:47:15 James Matta wrote:
> I am working on writing a data analysis tool for my research and I need to
> be able to display 1D and 2D histograms (see attachments for examples).
> Users need to be able to do things like click within the histogram and have
> the position recorded (so that they can give initial values for peak fits,
> identify channel number/ number of counts etc more finely than the scale
> might give, highlight regions of interest, etc.)
>
> My first thought was to subclass out of QPainter or QPaintDevice or one of
> their subclasses; but, I am uncertain of whether or not this is the best
> choice, or even if it is a good choice. I would appreciate any advice that
> you might have on the subject.

While I did look at qwt for this, the widgets available there didn't fit my 
bill.
So I sat down and wrote my own 1D and 2D spectrum widgets. Mine are actual 
views for the model-view-concept.
Only draw-back for you: Mine don't (yet) support recording of user-clicks. 
Zoom and log-scale for y/z are implemented.
Check https://svn.fzd.de/trac/epos/browser/trunk/epos/libgui and have a look 
at chartview.[h|cpp] and xyspecview.[h|cpp]. Its LGPLv3...

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090921/ccb6eed2/attachment.bin 


More information about the Qt-interest-old mailing list