[Kmymoney-devel] Trying to understand the code in GroupMarker::paintRegisterCell()

Marko Käning mk-lists at email.de
Fri Nov 25 07:16:02 UTC 2011


Hi Alvaro,

always great to hear from you! :-)

> that's because it's KXConfig stuff.

> The code is autogenerated from the kmymoney settings file.
I see.

> What do you want to do with it?
As my feature request https://bugs.kde.org/show_bug.cgi?id=287494 describes, I would like to have the group marker for "Online Statement Balance: %.2f" change its background and font color depending on whether the online balance is equal to the local one or not. I.e. I'd rather be alerted by a red group marker if there is a difference in both balances.

The motivation behind it is that I had a every now and then a difference in the two balances which stayed unnoticed for quite a few weeks, simply because the numbers were different only in one digit, usually stg like 50 EUR or so. This can happen if there are older transactions which get delivered by the bank with too big a lag, so that KMyMoney doesn't import it anymore by default. Sometimes I myself messed up without noticing it as well.

To find the cause of such balance differences can sometimes be quite a PITA, I tell you! :-(

Therefore an early alerting of the user by KMyMoney itself would be a nice feature for me. :-)

After posting my feature request I thought I dig a little into the code and perhaps figure out how to implement this myself. It took me a while to figure out which methods were responsible for those group markers, but I was still in good spirits… Now that I see you writing about generated code I see my hopes waning, though, because I am afraid I won't be able to get anything done without more substantial knowledge of QT, KDE and the like.

Anyway, still, one can always learn and skimming through KMM's code is always an interesting endeavor, so, if you're willing to share a little knowledge about how one could achieve this, I'd be very grateful, Alvaro. :-)

Thanks for your response.
Greets,
Marko


More information about the KMyMoney-devel mailing list