File indexing completed on 2024-06-23 05:02:16

0001 /*
0002     SPDX-FileCopyrightText: 2004-2005 Ace Jones <acejones@users.sourceforge.net>
0003     SPDX-FileCopyrightText: 2008-2010 Alvaro Soliverez <asoliverez@gmail.com>
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef OBJECTINFOTABLE_H
0008 #define OBJECTINFOTABLE_H
0009 
0010 // ----------------------------------------------------------------------------
0011 // QT Includes
0012 
0013 // ----------------------------------------------------------------------------
0014 // KDE Includes
0015 
0016 // ----------------------------------------------------------------------------
0017 // Project Includes
0018 
0019 #include "listtable.h"
0020 
0021 class MyMoneyReport;
0022 
0023 namespace reports
0024 {
0025 
0026 class ReportAccount;
0027 
0028 /**
0029   * Calculates a query of information about the transaction database.
0030   *
0031   * This is a middle-layer class, between the UI and the engine.  The
0032   * MyMoneyReport class holds only the CONFIGURATION parameters.  This
0033   * class actually does the work of retrieving the data from the engine
0034   * and formatting it for the user.
0035   *
0036   * @author Ace Jones
0037   *
0038   * @short
0039 **/
0040 
0041 class ObjectInfoTable : public ListTable
0042 {
0043 public:
0044     explicit ObjectInfoTable(const MyMoneyReport&);
0045     void init();
0046 
0047 protected:
0048     void constructScheduleTable();
0049     void constructAccountTable();
0050     void constructAccountLoanTable();
0051 
0052     bool linkEntries() const final override {
0053         return false;
0054     }
0055 
0056 private:
0057     /**
0058       * @param acc the investment account
0059       * @return the balance in the currency of the investment account
0060       */
0061     MyMoneyMoney investmentBalance(const MyMoneyAccount& acc);
0062 };
0063 
0064 }
0065 
0066 #endif // QUERYREPORT_H