[Kmymoney-devel] toughts about porting the widgets to the qt model/view framework

Cristian Oneţ onet.cristian at gmail.com
Wed Dec 2 22:20:37 CET 2009


Hi,

Since I'm really bothered by this small annoyance:
"After the payee completer depletes all possible completions when typing a 
payee's name the typed text is selected so if the user continues to type all 
characters entered so far are lost"
I began to think about the possible solutions to fix this. I came up with the 
following two possibilities:
1. Find the smallest fix
2. Look at rewriting the widgets base on what we have now in KDE and Qt

I'm sure that option nr. 1 would be the most straight forward but, to be 
honest, I'm to tired of debugging the KMyMoneyCombo code. So let's assume that 
one would start writing model/view based widgets as replacements to the 
current widgets. The question is how would this work be integrated into 
KMyMoney?

We have reached a pretty stable state with a release scheduled in a month so 
we would not want to blow that by starting to mess with the widgets :). This 
means that we should be able to work on the new widgets but in the same time 
keep the old ones (and maybe fix them). We could do this in two ways:
1. Develop the new widgets in a separate branch of the source code
2. #ifdef with a CMake option between the new and the old code

The thing I don't know about option 1 is how can we do it in the KDE 
repository. Other than that it would be the cleanest way. The second solution 
is a bit ugly, maybe harder to maintain, but it has the advantage that we have 
the widgets side by side. Developers working on this part could compile the 
project with USE_MV_WIDGETS on. Once the MV implementation is completed and 
tested we can easily remove the old code.

I've attached a patch containing a start using the second approach. What are 
your thoughts? Would it be feasible to work this way?

In the example the KMyMoneyPayeeCombo is written on the MV framework. It does 
not have all the features yet but the completion works like a charm and it's a 
lot less code than the old widget which uses the completer and the selector.

-- 
Regards,

Cristian Oneţ
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mv_widgets.patch
Type: text/x-patch
Size: 7945 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kmymoney-devel/attachments/20091202/bf9631c7/attachment.patch 
-------------- 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/kmymoney-devel/attachments/20091202/bf9631c7/attachment.sig 


More information about the KMyMoney-devel mailing list