Hey Johannes, 2010/1/28 Johannes Kepler <[email protected]>: > that's a little bit more information than i needed ;) > > would it be wise to make a subclass from WCartesianChart (say > WVirtualCartesianChart) and put all the things you described (WPaintedWidget, > chartArea(), JavaScript) into this class. > or inherit from WAbstractChart and make calculating, drawing and rendering in > a completely different way than it is done in WCartesianChart?
I think you will also need to use composition, since WCartesianChart is a WPaintedWidget. And specialize WCartesianChart to customize its rendering. (Not by coincidence coming to Fosdem ?) > an other thing is that WAbstractItemModel which is used for rendering the > chart has to be newly calculated and replaced after every scrolling in the > case you have a lot of data which can not be hold by the model at one time. > therefore the chart has to manipulate the model on itself. is that > wise/possible? Well, WAbstractItemModel does not really hold any data, it's just an interface. I would rather then suggest that you have a custom implementation of the model that does not need everything in memory ? We just need to make sure that the chart only attempts to fetch relevant data from the model. This is only doable if there is a way to calculate X range -> relevant row indexes. I haven't thought about this yet, but we could add virtual methods so that a user can specify this (in any case it is an optimisation to render less?). The default implementation would just return the range (0, model->rowCount()). Regards, koen ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
