Move reports drawing to reports view plugin
ClosedPublic

Authored by wojnilowicz on Jun 23 2018, 6:14 AM.

Details

Summary

This patch completes encapsulation of reporting features in KMyMoney. If a report is needed then it should be returned as:

  1. QWidget

It will then be possible to show report outside of KReportsView and handle it completely inside KReportsView. This approach will allow us embedding any report anywhere with configuration controls built in a report.

  1. QString

Some reports aren't graphical charts, so they need textual representation. Disadvantage of this approach is that chart cannot be handled inside KReportsView.

Test Plan

D13414 and D13581 needs to be applied first.

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
wojnilowicz requested review of this revision.Jun 23 2018, 6:14 AM
wojnilowicz created this revision.
tbaumgart requested changes to this revision.EditedJul 8 2018, 8:12 AM

It compiles but I spotted a problem in the graph of one of my accounts. I expect it not to be related to this patch which I verified.

kmymoney/mymoney/mymoneyaccount.cpp
371

I would nowadays name it tradingCurrencyId.

kmymoney/plugins/views/reports/reportsview.h
44

Can you document the parameters, esp. arg since it needs a specific format to be valid.

kmymoney/plugins/views/reports/reportsviewenums.h
24

I'd name this NetWorthForecastWithArgs

This revision now requires changes to proceed.Jul 8 2018, 8:12 AM
wojnilowicz updated this revision to Diff 37336.Jul 8 2018, 1:28 PM
wojnilowicz marked 3 inline comments as done.
tbaumgart accepted this revision as: tbaumgart.Jul 8 2018, 8:25 PM
This revision was not accepted when it landed; it landed in state Needs Review.Jul 9 2018, 2:33 PM
This revision was automatically updated to reflect the committed changes.