Using a dataengine inside Skrooge

Guillaume DE BURE guillaume.debure at gmail.com
Fri Sep 10 21:08:09 CEST 2010


Le vendredi 10 septembre 2010 20:58:13, Aaron J. Seigo a écrit :
> On Friday, September 10, 2010, Guillaume DE BURE wrote:
> > I've implemented very roughly the dataengine, it is able to read data
> > through SQL Select instructions, store it using setData. Now, I do I
> > access it from widgets ? I mean, are the techbase tutorials still
> > applicable in this case ?
> 
> yes. this is a major concept behind DataEngines: although different inside, 
> the visualizations (e.g. a widget) uses all them the same way. :)
Oh cool, that should be quite simple, then :)

> 
> > extragear/office/skgdataengine. Per default, it is disabled in Skrooge's
> 
> extragear/office/skrooge/skgdataengine .. in case anyone else goes looking :)
Oops, yes, sorry for the typo :p

> 
> it looksing good... some small suggestions/issue:
> 
> * it's missing a sourceRequestEvent method; in the case of this DataEngine its 
> implementation would be very simple: return updateSourceRequest(source);
> 
> * perhaps make "Accounts" and "Incomes & Expenditures" static const QString's 
> in the .cpp file so that you don't have to worry about typos in the strings 
> that are duplicated in sources() and updateSourceEvent(const QString &); 
> common source of errors in DataEngines.

Ah thanks :) Correcting right now...


-- 
Skrooge, a personal finances manager for KDE 4.x
http://skrooge.org


More information about the Plasma-devel mailing list