You might be wondering what is going on in the KMyMoney development department. Here are some insights of what has happened in the background at least on my end.
During the last few months I was working on an experiment based on an idea I had a while ago:
To make more use of QAbstractItemViews and to be able to simplify parts of the code I wanted to provide the application data in form of QAbstractItemModels.
So I designed and implemented a model template to store all the various data items in a generic form. To be able to reuse most of the existing application code I made sure that the new models provide a similar interface as the current MyMoneyStorage layer, which would be replaced by the models. This interface basically is a standard CRUD interface.
All this led to the following effects:
- Support of the Qt Model/View interface (setData() is only provided in specific areas. Full support is not required due to the existing CRUD interface)
- Elimination of caches
- Replacement of existing QStandardItem based models
- Minimal adjustments of application code
- Potential elimination of more code around view refreshing
- Some performance improvements
Once I had most of this working, I had an idea how to implement a general undo/redo mechanism. Again, this was based on a generic approach which works for most models and only needed some special handling for the hierarchical oriented accounts model.
But see for yourself. In the video I rearrange some accounts and then delete one and then going back and forth with just the click on the mouse.
Not all of the existing features are fully operational yet, but this code will be the base of the next generation of KMyMoney. Therefore, it will soon be added to the git master branch and we continue from there.
Things that will be done next:
- Finish the new ledger code
- Add the group markers
- Add online balance information
- Port the transaction form
- Port the investment transaction editor to the new model
- Remove the old ledger code (this should bring some more performance improvements)
- Port the remaining QStandardItem based models and views
- Cleanup the code and removed unused/unnecessary logic
- Testing, testing, testing, and more testing
- …
One of the things that can also be brought back is the direct update when using a database backend. But that is something for another post.