Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/plugins/viewinterface.h
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Line(s) | |||||
43 | } | 43 | } | ||
44 | 44 | | |||
45 | enum class View; | 45 | enum class View; | ||
46 | 46 | | |||
47 | class MyMoneyInstitution; | 47 | class MyMoneyInstitution; | ||
48 | class MyMoneyAccount; | 48 | class MyMoneyAccount; | ||
49 | class MyMoneySplit; | 49 | class MyMoneySplit; | ||
50 | class MyMoneyTransaction; | 50 | class MyMoneyTransaction; | ||
51 | class IMyMoneyOperationsFormat; | | |||
52 | class KMyMoneyViewBase; | 51 | class KMyMoneyViewBase; | ||
53 | 52 | | |||
54 | namespace KMyMoneyPlugin | 53 | namespace KMyMoneyPlugin | ||
55 | { | 54 | { | ||
56 | 55 | | |||
57 | /** | 56 | /** | ||
58 | * This abstract class represents the ViewInterface to | 57 | * This abstract class represents the ViewInterface to | ||
59 | * add new view pages to the JanusWidget of KMyMoney. It | 58 | * add new view pages to the JanusWidget of KMyMoney. It | ||
60 | * also gives access to the account context menu. | 59 | * also gives access to the account context menu. | ||
61 | */ | 60 | */ | ||
62 | class KMM_PLUGIN_EXPORT ViewInterface : public QObject | 61 | class KMM_PLUGIN_EXPORT ViewInterface : public QObject | ||
63 | { | 62 | { | ||
64 | Q_OBJECT | 63 | Q_OBJECT | ||
65 | 64 | | |||
66 | public: | 65 | public: | ||
67 | explicit ViewInterface(QObject* parent, const char* name = 0); | 66 | explicit ViewInterface(QObject* parent, const char* name = 0); | ||
68 | virtual ~ViewInterface(); | 67 | virtual ~ViewInterface(); | ||
69 | 68 | | |||
70 | /** | 69 | /** | ||
71 | * Calls MyMoneyFile::readAllData which reads a MyMoneyFile into appropriate | | |||
72 | * data structures in memory. The return result is examined to make sure no | | |||
73 | * errors occurred whilst parsing. | | |||
74 | * | | |||
75 | * @param url The URL to read from. | | |||
76 | * If no protocol is specified, file:// is assumed. | | |||
77 | * | | |||
78 | * @return Whether the read was successful. | | |||
79 | */ | | |||
80 | virtual bool readFile(const QUrl &url, IMyMoneyOperationsFormat *pExtReader = nullptr) = 0; | | |||
81 | | ||||
82 | /** | | |||
83 | * Makes sure that a MyMoneyFile is open and has been created successfully. | | |||
84 | * | | |||
85 | * @return Whether the file is open and initialised | | |||
86 | */ | | |||
87 | virtual bool fileOpen() = 0; | | |||
88 | | ||||
89 | virtual bool isDatabase() = 0; | | |||
90 | /** | | |||
91 | * Brings up a dialog to change the list(s) settings and saves them into the | 70 | * Brings up a dialog to change the list(s) settings and saves them into the | ||
92 | * class KMyMoneySettings (a singleton). | 71 | * class KMyMoneySettings (a singleton). | ||
93 | * | 72 | * | ||
94 | * @see KListSettingsDlg | 73 | * @see KListSettingsDlg | ||
95 | * Refreshes all views. Used e.g. after settings have been changed or | 74 | * Refreshes all views. Used e.g. after settings have been changed or | ||
96 | * data has been loaded from external sources (QIF import). | 75 | * data has been loaded from external sources (QIF import). | ||
97 | **/ | 76 | **/ | ||
98 | virtual void slotRefreshViews() = 0; | 77 | virtual void slotRefreshViews() = 0; | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | 120 | // void institutionSelected(const MyMoneyInstitution& institution); | |||
150 | * @param startingBalance the starting balance as provided through the dialog | 129 | * @param startingBalance the starting balance as provided through the dialog | ||
151 | * @param endingBalance the ending balance as provided through the dialog | 130 | * @param endingBalance the ending balance as provided through the dialog | ||
152 | * @param transactionList reference to QList of QPair containing all | 131 | * @param transactionList reference to QList of QPair containing all | ||
153 | * transaction/split pairs processed by the reconciliation. | 132 | * transaction/split pairs processed by the reconciliation. | ||
154 | */ | 133 | */ | ||
155 | void accountReconciled(const MyMoneyAccount& account, const QDate& date, const MyMoneyMoney& startingBalance, const MyMoneyMoney& endingBalance, const QList<QPair<MyMoneyTransaction, MyMoneySplit> >& transactionList); | 134 | void accountReconciled(const MyMoneyAccount& account, const QDate& date, const MyMoneyMoney& startingBalance, const MyMoneyMoney& endingBalance, const QList<QPair<MyMoneyTransaction, MyMoneySplit> >& transactionList); | ||
156 | 135 | | |||
157 | void viewStateChanged(bool); | 136 | void viewStateChanged(bool); | ||
158 | void kmmFilePlugin(unsigned int); | | |||
159 | }; | 137 | }; | ||
160 | 138 | | |||
161 | } // namespace | 139 | } // namespace | ||
162 | #endif | 140 | #endif |