Using a dataengine inside Skrooge

Aaron J. Seigo aseigo at kde.org
Fri Sep 10 20:58:13 CEST 2010


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. :)

> extragear/office/skgdataengine. Per default, it is disabled in Skrooge's

extragear/office/skrooge/skgdataengine .. in case anyone else goes looking :)

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.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100910/f92f3826/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20100910/f92f3826/attachment.sig 


More information about the Plasma-devel mailing list