Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/views/kmymoneyview.h
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | kmymoneyview.h | 2 | kmymoneyview.h | ||
3 | ------------------- | 3 | ------------------- | ||
4 | copyright : (C) 2000-2001 by Michael Edwardes | 4 | copyright : (C) 2000-2001 by Michael Edwardes <mte@users.sourceforge.net> | ||
5 | email : <mte@users.sourceforge.net> | 5 | 2004 by Thomas Baumgart <ipwizard@users.sourceforge.net> | ||
6 | 2017 by Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> | ||||
6 | ***************************************************************************/ | 7 | ***************************************************************************/ | ||
7 | 8 | | |||
8 | /*************************************************************************** | 9 | /*************************************************************************** | ||
9 | * * | 10 | * * | ||
10 | * This program is free software; you can redistribute it and/or modify * | 11 | * This program is free software; you can redistribute it and/or modify * | ||
11 | * it under the terms of the GNU General Public License as published by * | 12 | * it under the terms of the GNU General Public License as published by * | ||
12 | * the Free Software Foundation; either version 2 of the License, or * | 13 | * the Free Software Foundation; either version 2 of the License, or * | ||
13 | * (at your option) any later version. * | 14 | * (at your option) any later version. * | ||
Show All 26 Lines | |||||
40 | 41 | | |||
41 | #include "config-kmymoney.h" | 42 | #include "config-kmymoney.h" | ||
42 | #include "mymoneyaccount.h" | 43 | #include "mymoneyaccount.h" | ||
43 | #include "mymoneyinstitution.h" | 44 | #include "mymoneyinstitution.h" | ||
44 | #include "mymoneytransaction.h" | 45 | #include "mymoneytransaction.h" | ||
45 | #include "mymoneyschedule.h" | 46 | #include "mymoneyschedule.h" | ||
46 | #include "mymoneysecurity.h" | 47 | #include "mymoneysecurity.h" | ||
47 | #include "selectedtransaction.h" | 48 | #include "selectedtransaction.h" | ||
49 | #include <accountsmodel.h> | ||||
48 | 50 | | |||
49 | #ifdef KF5Activities_FOUND | 51 | #ifdef KF5Activities_FOUND | ||
50 | namespace KActivities | 52 | namespace KActivities | ||
51 | { | 53 | { | ||
52 | class ResourceInstance; | 54 | class ResourceInstance; | ||
53 | } | 55 | } | ||
54 | #endif | 56 | #endif | ||
55 | 57 | | |||
58 | class KMyMoneyApp; | ||||
56 | class KHomeView; | 59 | class KHomeView; | ||
57 | class KAccountsView; | 60 | class KAccountsView; | ||
58 | class KCategoriesView; | 61 | class KCategoriesView; | ||
59 | class KInstitutionsView; | 62 | class KInstitutionsView; | ||
60 | class KPayeesView; | 63 | class KPayeesView; | ||
61 | class KTagsView; | 64 | class KTagsView; | ||
62 | class KBudgetView; | 65 | class KBudgetView; | ||
63 | class KScheduledView; | 66 | class KScheduledView; | ||
64 | class KGlobalLedgerView; | 67 | class KGlobalLedgerView; | ||
65 | class IMyMoneyStorageFormat; | 68 | class IMyMoneyStorageFormat; | ||
66 | class MyMoneyTransaction; | 69 | class MyMoneyTransaction; | ||
67 | class KInvestmentView; | 70 | class KInvestmentView; | ||
68 | class KReportsView; | 71 | class KReportsView; | ||
69 | class KMyMoneyViewBase; | 72 | class KMyMoneyViewBase; | ||
70 | class MyMoneyReport; | 73 | class MyMoneyReport; | ||
71 | class TransactionEditor; | 74 | class TransactionEditor; | ||
72 | class KForecastView; | 75 | class KForecastView; | ||
73 | class KOnlineJobOutbox; | 76 | class KOnlineJobOutbox; | ||
74 | class KMyMoneyTitleLabel; | 77 | class KMyMoneyTitleLabel; | ||
78 | class QLabel; | ||||
79 | | ||||
75 | /** | 80 | /** | ||
76 | * This class represents the view of the MyMoneyFile which contains | 81 | * This class represents the view of the MyMoneyFile which contains | ||
77 | * Banks/Accounts/Transactions, Recurring transactions (or Bills & Deposits) | 82 | * Banks/Accounts/Transactions, Recurring transactions (or Bills & Deposits) | ||
78 | * and scripts (yet to be implemented). Each different aspect of the file | 83 | * and scripts (yet to be implemented). Each different aspect of the file | ||
79 | * is represented by a tab within the view. | 84 | * is represented by a tab within the view. | ||
80 | * | 85 | * | ||
81 | * @author Michael Edwardes 2001 Copyright 2000-2001 | 86 | * @author Michael Edwardes 2001 Copyright 2000-2001 | ||
82 | * | 87 | * | ||
Show All 11 Lines | 94 | enum class View { | |||
94 | Categories, | 99 | Categories, | ||
95 | Tags, | 100 | Tags, | ||
96 | Payees, | 101 | Payees, | ||
97 | Ledgers, | 102 | Ledgers, | ||
98 | Investments, | 103 | Investments, | ||
99 | Reports, | 104 | Reports, | ||
100 | Budget, | 105 | Budget, | ||
101 | Forecast, | 106 | Forecast, | ||
102 | OnlineJobOutbox | 107 | OnlineJobOutbox, | ||
108 | None | ||||
103 | }; | 109 | }; | ||
104 | // file actions for plugin | 110 | // file actions for plugin | ||
105 | enum fileActions { | 111 | enum fileActions { | ||
106 | preOpen, postOpen, preSave, postSave, preClose, postClose | 112 | preOpen, postOpen, preSave, postSave, preClose, postClose | ||
107 | }; | 113 | }; | ||
108 | 114 | | |||
109 | KOnlineJobOutbox* getOnlineJobOutbox() const { | 115 | KOnlineJobOutbox* getOnlineJobOutbox() const { | ||
110 | return m_onlineJobOutboxView; | 116 | return m_onlineJobOutboxView; | ||
▲ Show 20 Lines • Show All 104 Lines • ▼ Show 20 Line(s) | 178 | private: | |||
215 | 221 | | |||
216 | void checkAccountName(const MyMoneyAccount& acc, const QString& name) const; | 222 | void checkAccountName(const MyMoneyAccount& acc, const QString& name) const; | ||
217 | 223 | | |||
218 | public: | 224 | public: | ||
219 | /** | 225 | /** | ||
220 | * The constructor for KMyMoneyView. Just creates all the tabs for the | 226 | * The constructor for KMyMoneyView. Just creates all the tabs for the | ||
221 | * different aspects of the MyMoneyFile. | 227 | * different aspects of the MyMoneyFile. | ||
222 | */ | 228 | */ | ||
223 | explicit KMyMoneyView(QObject *kmymoney, QWidget *parent = nullptr); | 229 | explicit KMyMoneyView(KMyMoneyApp *kmymoney); | ||
224 | 230 | | |||
225 | /** | 231 | /** | ||
226 | * Destructor | 232 | * Destructor | ||
227 | */ | 233 | */ | ||
228 | ~KMyMoneyView(); | 234 | ~KMyMoneyView(); | ||
229 | 235 | | |||
230 | /** | 236 | /** | ||
231 | * Makes sure that a MyMoneyFile is open and has been created successfully. | 237 | * Makes sure that a MyMoneyFile is open and has been created successfully. | ||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Line(s) | |||||
417 | 423 | | |||
418 | void showTitleBar(bool show); | 424 | void showTitleBar(bool show); | ||
419 | 425 | | |||
420 | /** | 426 | /** | ||
421 | * This method changes the view type according to the settings. | 427 | * This method changes the view type according to the settings. | ||
422 | */ | 428 | */ | ||
423 | void updateViewType(); | 429 | void updateViewType(); | ||
424 | 430 | | |||
431 | void slotAccountTreeViewChanged(const AccountsModel::Columns column, const bool show); | ||||
432 | | ||||
433 | void slotNetBalProChanged(const MyMoneyMoney &val, QLabel *label, const View view); | ||||
434 | | ||||
425 | protected: | 435 | protected: | ||
426 | /** | 436 | /** | ||
427 | * Overwritten because KMyMoney has it's custom header. | 437 | * Overwritten because KMyMoney has it's custom header. | ||
428 | */ | 438 | */ | ||
429 | virtual bool showPageHeader() const; | 439 | virtual bool showPageHeader() const; | ||
430 | 440 | | |||
431 | 441 | | |||
432 | public slots: | 442 | public slots: | ||
▲ Show 20 Lines • Show All 241 Lines • Show Last 20 Lines |