[Kmymoney-devel] Payees view

Cristian Oneţ onet.cristian at gmail.com
Tue Mar 2 13:33:38 CET 2010

On Tue, Mar 2, 2010 at 2:10 PM, Alvaro Soliverez <asoliverez at gmail.com> wrote:
> On Tue, Mar 2, 2010 at 7:25 AM, Cristian Oneţ <onet.cristian at gmail.com> wrote:
>> On Tue, Mar 2, 2010 at 11:53 AM, Alvaro Soliverez <asoliverez at gmail.com> wrote:
>>> Hello all,
>>> I've just commited a major change to the payees view, to port it to a
>>> Qt4 widget.
>>> There are probably some issues still to be solved, so please keep your
>>> eyes open.
>>> As usual, feedback is welcome!
>> I'll keep an eye for any issues :).
>> So now that we've done this for a few lists I see that the way the
>> code was written and then ported requires a lot of dynamic_casts in
>> order to get to the specific item which stores the business logic
>> specific data (for instance an id). I think the code would be much
>> cleaner without these routine casts so I propose the following simple
>> steps to get rid of them:
>> 1. Don't use an implementation specific item.
>> 2. Store the data that was previously a member of the implementation
>> specific item in the QTree(List)WidgetItem using the setData and data
>> functions and a user role definition for each implementation specific
>> data
>> Any thoughts?
> I agree. We should move all that data to the models, which is my next
> step in the port.
> Can I use the accounts model as an example? Any recommendations?
Sure. Which brings me to another question. Can we add the
Q_DECLARE_METATYPE to all the MyMoney* objects so we can use them with
QVariant? That would be really useful for the further development of
the models? Thomas?


More information about the KMyMoney-devel mailing list