Re: Charts
Inge Wallin <[email protected]> Mon, 28 Apr 2008 14:04:01 +0200
| Newsgroups | gmane.comp.kde.kplato |
|---|---|
| Organization | Lysator Academic Computer Society |
| Message-ID | <[email protected]> |
On Monday 28 April 2008 10:26:07 Cyrille Berger wrote: > Hi, > > On Monday 28 April 2008, Dag Andersen wrote: > > > I've been told by Cyrille from KOffice to implement KoShape from Flake > > > instead of the current charts view, is it the right way to do it ? > > > > I haven't used flake at all in kplato (yet) hence my knowledge is limited > > so take my opinions with a a grain (or two) of salt. Also, because of > > this there is *no* infrastructure in kplato to handle shapes. I don't > > know what is needed, though, so maybe that is not a big issue. > > AFAIK KoShape can be used as a wrapper around a widget. (Which could be a > > chart.) AFAICS you'll need to implement the basic stuff like data access > > and painting wether it's a shape or not. What you get from the shape is > > things like scaling and rotation, _and_ the chart will be available for > > use in other KOffice apps. > > I think the main idea is to use the Chart shape from KoChart in KPlato > instead of the current plotting widget. So rotating and scaling is not > really relevant ;) An idea: How difficult would it be to create a QWidget that can embed any flake shape (say KoFlakeShapeWidget). The widget would resize the shape when it is resized itself, and do other housekeeping too. Along with this, a KoFlakeToolWidget could be created to embed the appropriate tool. Of course, these two widgets would only be used in applications that cannot use flake directly. -Inge > So yes you need a small canvas that will only embedd one single Chart > shape, and you can give data to the shape using the interfaces in > koffice/interfaces . In fact, you might want to look at the kochart > application to get an idea of the minimal requirement to draw a shape, and > at kspread on how to feed the chart with data.