[Kmymoney-devel] Some experimentd trying to move loading methods out of the GUI

Alvaro Soliverez asoliverez at gmail.com
Mon Oct 19 19:56:42 CEST 2009


Michaël,
can you send the class to the list, so we have an example?

All, this is somewhat related to the issue we had in the saveFile method.
Moving those methods to the engine will have multiple benefits, as we can
see.
In my case, I'm interested on Akonadi for calendar and the FinanceStack and
a datasource for Plasma (a quick entry plasmoid, anyone?). And from an
architecture point of view, it's best to keep the layers separate.
So, with Michaël's help we could check which methods need to be changed, and
then work on them to split GUI and engine tasks.
What's your thought on this?

Regards,
Alvaro

On Mon, Oct 19, 2009 at 2:38 PM, Michaël Lhomme <papylhomme at gmail.com>wrote:

> Hello,
>
> as I already discussed a bit with Thomas and Alvaro, I'm working on an
> Akonadi resource to display schedules as todos. The most difficult part was
> to use existing loading methods (in kmymoneyview) without loading the KMM
> GUI.
>
> The solution I chose is to create a small class dedicated on data loading.
> I extracted the main method KMyMoneyView::readFile and related methods
> (checkAccountName, loadDefaultCurrency, loadDefaultCurrencies,
> loadAncientCurrency, loadAncientCurrencies and ungetString). Then I replaced
> every "messagebox" and "return false" statements by exceptions. This made
> the trick for the compilation.
>
> The next problem was linkage : KGncReader depends on various dialogs,
> depending themselves on other part of the application, and so on. Finally I
> ended up including every KMM libs, and declaring a main pointer to the
> application in my resource (KMyMoney2App* kmymoney2). It's working but it's
> really ugly ;)
>
> And voila, I hope my experience could help.
>
> Regards,
>
> Michaël Lhomme
>
> _______________________________________________
> KMyMoney-devel mailing list
> KMyMoney-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kmymoney-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20091019/06ae85c0/attachment.htm 


More information about the KMyMoney-devel mailing list