Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/views/kmymoneyview.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | #include <KCompressionDevice> | 45 | #include <KCompressionDevice> | ||
46 | #include <KSharedConfig> | 46 | #include <KSharedConfig> | ||
47 | #include <KBackup> | 47 | #include <KBackup> | ||
48 | #include <KActionCollection> | 48 | #include <KActionCollection> | ||
49 | #include <KIO/StoredTransferJob> | 49 | #include <KIO/StoredTransferJob> | ||
50 | #include <KJobWidgets> | 50 | #include <KJobWidgets> | ||
51 | #include <KLocalizedString> | 51 | #include <KLocalizedString> | ||
52 | 52 | | |||
53 | #ifdef KF5Activities_FOUND | | |||
54 | #include <KActivities/ResourceInstance> | | |||
55 | #endif | | |||
56 | | ||||
57 | // ---------------------------------------------------------------------------- | 53 | // ---------------------------------------------------------------------------- | ||
58 | // Project Includes | 54 | // Project Includes | ||
59 | 55 | | |||
60 | #ifdef ENABLE_UNFINISHEDFEATURES | 56 | #ifdef ENABLE_UNFINISHEDFEATURES | ||
61 | #include "simpleledgerview.h" | 57 | #include "simpleledgerview.h" | ||
62 | #endif | 58 | #endif | ||
63 | 59 | | |||
64 | #include "kmymoneysettings.h" | 60 | #include "kmymoneysettings.h" | ||
Show All 9 Lines | |||||
74 | #include "kaccountsview.h" | 70 | #include "kaccountsview.h" | ||
75 | #include "kcategoriesview.h" | 71 | #include "kcategoriesview.h" | ||
76 | #include "kinstitutionsview.h" | 72 | #include "kinstitutionsview.h" | ||
77 | #include "kpayeesview.h" | 73 | #include "kpayeesview.h" | ||
78 | #include "ktagsview.h" | 74 | #include "ktagsview.h" | ||
79 | #include "kscheduledview.h" | 75 | #include "kscheduledview.h" | ||
80 | #include "kgloballedgerview.h" | 76 | #include "kgloballedgerview.h" | ||
81 | #include "kinvestmentview.h" | 77 | #include "kinvestmentview.h" | ||
82 | #include "kmymoney.h" | | |||
83 | #include "models.h" | 78 | #include "models.h" | ||
84 | #include "accountsmodel.h" | 79 | #include "accountsmodel.h" | ||
85 | #include "equitiesmodel.h" | 80 | #include "equitiesmodel.h" | ||
86 | #include "securitiesmodel.h" | 81 | #include "securitiesmodel.h" | ||
87 | #include "icons.h" | 82 | #include "icons.h" | ||
88 | #include "amountedit.h" | 83 | #include "amountedit.h" | ||
89 | #include "kmymoneyaccounttreeview.h" | 84 | #include "kmymoneyaccounttreeview.h" | ||
90 | #include "accountsviewproxymodel.h" | 85 | #include "accountsviewproxymodel.h" | ||
91 | #include "mymoneyprice.h" | 86 | #include "mymoneyprice.h" | ||
92 | #include "mymoneyschedule.h" | 87 | #include "mymoneyschedule.h" | ||
93 | #include "mymoneysplit.h" | 88 | #include "mymoneysplit.h" | ||
94 | #include "mymoneyaccount.h" | 89 | #include "mymoneyaccount.h" | ||
95 | #include "mymoneyinstitution.h" | 90 | #include "mymoneyinstitution.h" | ||
96 | #include "kmymoneyedit.h" | 91 | #include "kmymoneyedit.h" | ||
97 | #include "mymoneyfile.h" | 92 | #include "mymoneyfile.h" | ||
98 | #include "mymoneysecurity.h" | 93 | #include "mymoneysecurity.h" | ||
99 | #include "mymoneyreport.h" | 94 | #include "mymoneyreport.h" | ||
100 | #include "kmymoneyplugin.h" | 95 | #include "kmymoneyplugin.h" | ||
101 | #include "mymoneyenums.h" | 96 | #include "mymoneyenums.h" | ||
97 | #include "menuenums.h" | ||||
102 | 98 | | |||
103 | using namespace Icons; | 99 | using namespace Icons; | ||
104 | using namespace eMyMoney; | 100 | using namespace eMyMoney; | ||
105 | 101 | | |||
106 | typedef void(KMyMoneyView::*KMyMoneyViewFunc)(); | 102 | typedef void(KMyMoneyView::*KMyMoneyViewFunc)(); | ||
107 | 103 | | |||
108 | KMyMoneyView::KMyMoneyView(KMyMoneyApp *kmymoney) | 104 | KMyMoneyView::KMyMoneyView() | ||
109 | : KPageWidget(nullptr), | 105 | : KPageWidget(nullptr), | ||
110 | m_header(0), | 106 | m_header(0), | ||
111 | m_inConstructor(true), | | |||
112 | m_lastViewSelected(0), | 107 | m_lastViewSelected(0), | ||
113 | m_storagePlugins(nullptr) | 108 | m_storagePlugins(nullptr) | ||
114 | #ifdef KF5Activities_FOUND | | |||
115 | , m_activityResourceInstance(0) | | |||
116 | #endif | | |||
117 | { | 109 | { | ||
118 | // this is a workaround for the bug in KPageWidget that causes the header to be shown | 110 | // this is a workaround for the bug in KPageWidget that causes the header to be shown | ||
119 | // for a short while during page switch which causes a kind of bouncing of the page's | 111 | // for a short while during page switch which causes a kind of bouncing of the page's | ||
120 | // content and if the page's content is at it's minimum size then during a page switch | 112 | // content and if the page's content is at it's minimum size then during a page switch | ||
121 | // the main window's size is also increased to fit the header that is shown for a sort | 113 | // the main window's size is also increased to fit the header that is shown for a sort | ||
122 | // period - reading the code in kpagewidget.cpp we know that the header should be at (1,1) | 114 | // period - reading the code in kpagewidget.cpp we know that the header should be at (1,1) | ||
123 | // in a grid layout so if we find it there remove it for good to avoid the described issues | 115 | // in a grid layout so if we find it there remove it for good to avoid the described issues | ||
124 | QGridLayout* gridLayout = qobject_cast<QGridLayout*>(layout()); | 116 | QGridLayout* gridLayout = qobject_cast<QGridLayout*>(layout()); | ||
Show All 10 Lines | 120 | if (headerItem && qobject_cast<KTitleWidget*>(headerItem->widget()) != NULL) { | |||
135 | m_header->setVisible(KMyMoneySettings::showTitleBar()); | 127 | m_header->setVisible(KMyMoneySettings::showTitleBar()); | ||
136 | gridLayout->addWidget(m_header, 1, 1); | 128 | gridLayout->addWidget(m_header, 1, 1); | ||
137 | } | 129 | } | ||
138 | } | 130 | } | ||
139 | 131 | | |||
140 | // newStorage(); | 132 | // newStorage(); | ||
141 | m_model = new KPageWidgetModel(this); // cannot be parentless, otherwise segfaults at exit | 133 | m_model = new KPageWidgetModel(this); // cannot be parentless, otherwise segfaults at exit | ||
142 | 134 | | |||
143 | connect(kmymoney, &KMyMoneyApp::fileLoaded, this, &KMyMoneyView::slotRefreshViews); | | |||
144 | | ||||
145 | viewBases[View::Home] = new KHomeView; | 135 | viewBases[View::Home] = new KHomeView; | ||
146 | viewBases[View::Institutions] = new KInstitutionsView; | 136 | viewBases[View::Institutions] = new KInstitutionsView; | ||
147 | viewBases[View::Accounts] = new KAccountsView; | 137 | viewBases[View::Accounts] = new KAccountsView; | ||
148 | viewBases[View::Schedules] = new KScheduledView; | 138 | viewBases[View::Schedules] = new KScheduledView; | ||
149 | viewBases[View::Categories] = new KCategoriesView; | 139 | viewBases[View::Categories] = new KCategoriesView; | ||
150 | viewBases[View::Tags] = new KTagsView; | 140 | viewBases[View::Tags] = new KTagsView; | ||
151 | viewBases[View::Payees] = new KPayeesView; | 141 | viewBases[View::Payees] = new KPayeesView; | ||
152 | viewBases[View::Ledgers] = new KGlobalLedgerView; | 142 | viewBases[View::Ledgers] = new KGlobalLedgerView; | ||
Show All 34 Lines | 171 | for (const viewInfo& view : viewsInfo) { | |||
187 | QTextLayout::createLine().*/ | 177 | QTextLayout::createLine().*/ | ||
188 | viewFrames[view.id] = m_model->addPage(viewBases[view.id], QString(view.name).replace('\n', QString::fromLocal8Bit("\xe2\x80\xa8"))); | 178 | viewFrames[view.id] = m_model->addPage(viewBases[view.id], QString(view.name).replace('\n', QString::fromLocal8Bit("\xe2\x80\xa8"))); | ||
189 | viewFrames[view.id]->setIcon(Icons::get(view.icon)); | 179 | viewFrames[view.id]->setIcon(Icons::get(view.icon)); | ||
190 | connect(viewBases[view.id], &KMyMoneyViewBase::selectByObject, this, &KMyMoneyView::slotSelectByObject); | 180 | connect(viewBases[view.id], &KMyMoneyViewBase::selectByObject, this, &KMyMoneyView::slotSelectByObject); | ||
191 | connect(viewBases[view.id], &KMyMoneyViewBase::selectByVariant, this, &KMyMoneyView::slotSelectByVariant); | 181 | connect(viewBases[view.id], &KMyMoneyViewBase::selectByVariant, this, &KMyMoneyView::slotSelectByVariant); | ||
192 | connect(viewBases[view.id], &KMyMoneyViewBase::customActionRequested, this, &KMyMoneyView::slotCustomActionRequested); | 182 | connect(viewBases[view.id], &KMyMoneyViewBase::customActionRequested, this, &KMyMoneyView::slotCustomActionRequested); | ||
193 | } | 183 | } | ||
194 | 184 | | |||
195 | const auto& ledgersView = static_cast<KGlobalLedgerView*>(viewBases[View::Ledgers]); | | |||
196 | | ||||
197 | connect(kmymoney, &KMyMoneyApp::transactionSelected, ledgersView, &KGlobalLedgerView::slotLedgerSelected); | | |||
198 | | ||||
199 | connect(Models::instance()->accountsModel(), &AccountsModel::netWorthChanged, this, &KMyMoneyView::slotSelectByVariant); | 185 | connect(Models::instance()->accountsModel(), &AccountsModel::netWorthChanged, this, &KMyMoneyView::slotSelectByVariant); | ||
200 | connect(Models::instance()->institutionsModel(), &AccountsModel::netWorthChanged, this, &KMyMoneyView::slotSelectByVariant); | 186 | connect(Models::instance()->institutionsModel(), &AccountsModel::netWorthChanged, this, &KMyMoneyView::slotSelectByVariant); | ||
201 | connect(Models::instance()->institutionsModel(), &AccountsModel::profitChanged, this, &KMyMoneyView::slotSelectByVariant); | 187 | connect(Models::instance()->institutionsModel(), &AccountsModel::profitChanged, this, &KMyMoneyView::slotSelectByVariant); | ||
202 | 188 | | |||
203 | //set the model | 189 | //set the model | ||
204 | setModel(m_model); | 190 | setModel(m_model); | ||
205 | setCurrentPage(viewFrames[View::Home]); | 191 | setCurrentPage(viewFrames[View::Home]); | ||
206 | connect(this, SIGNAL(currentPageChanged(QModelIndex,QModelIndex)), this, SLOT(slotCurrentPageChanged(QModelIndex,QModelIndex))); | 192 | connect(this, SIGNAL(currentPageChanged(QModelIndex,QModelIndex)), this, SLOT(slotCurrentPageChanged(QModelIndex,QModelIndex))); | ||
207 | 193 | | |||
208 | updateViewType(); | 194 | updateViewType(); | ||
209 | | ||||
210 | m_inConstructor = false; | | |||
211 | | ||||
212 | // add fast switching of main views through Ctrl + NUM_X | | |||
213 | struct pageInfo { | | |||
214 | View view; | | |||
215 | KMyMoneyViewFunc callback; | | |||
216 | QString text; | | |||
217 | QKeySequence shortcut = QKeySequence(); | | |||
218 | }; | | |||
219 | | ||||
220 | const QVector<pageInfo> pageInfos { | | |||
221 | {View::Home, &KMyMoneyView::slotShowHomePage, i18n("Show home page"), Qt::CTRL + Qt::Key_1}, | | |||
222 | {View::Institutions, &KMyMoneyView::slotShowInstitutionsPage, i18n("Show institutions page"), Qt::CTRL + Qt::Key_2}, | | |||
223 | {View::Accounts, &KMyMoneyView::slotShowAccountsPage, i18n("Show accounts page"), Qt::CTRL + Qt::Key_3}, | | |||
224 | {View::Schedules, &KMyMoneyView::slotShowSchedulesPage, i18n("Show scheduled transactions page"), Qt::CTRL + Qt::Key_4}, | | |||
225 | {View::Categories, &KMyMoneyView::slotShowCategoriesPage, i18n("Show categories page"), Qt::CTRL + Qt::Key_5}, | | |||
226 | {View::Tags, &KMyMoneyView::slotShowTagsPage, i18n("Show tags page"), }, | | |||
227 | {View::Payees, &KMyMoneyView::slotShowPayeesPage, i18n("Show payees page"), Qt::CTRL + Qt::Key_6}, | | |||
228 | {View::Ledgers, &KMyMoneyView::slotShowLedgersPage, i18n("Show ledgers page"), Qt::CTRL + Qt::Key_7}, | | |||
229 | {View::Investments, &KMyMoneyView::slotShowInvestmentsPage, i18n("Show investments page"), Qt::CTRL + Qt::Key_8}, | | |||
230 | {View::Reports, &KMyMoneyView::slotShowReportsPage, i18n("Show reports page"), Qt::CTRL + Qt::Key_9}, | | |||
231 | {View::Budget, &KMyMoneyView::slotShowBudgetPage, i18n("Show budget page"), }, | | |||
232 | {View::Forecast, &KMyMoneyView::slotShowForecastPage, i18n("Show forecast page"), }, | | |||
233 | {View::OnlineJobOutbox, &KMyMoneyView::slotShowOutboxPage, i18n("Show outbox page") } | | |||
234 | }; | | |||
235 | | ||||
236 | QHash<View, QAction *> lutActions; | | |||
237 | auto aC = kmymoney->actionCollection(); | | |||
238 | auto pageCount = 0; | | |||
239 | foreach (const pageInfo info, pageInfos) { | | |||
240 | auto a = new QAction(this); | | |||
241 | // KActionCollection::addAction by name sets object name anyways, | | |||
242 | // so, as better alternative, set it here right from the start | | |||
243 | a->setObjectName(QLatin1String("ShowPage") + QString::number(pageCount++)); | | |||
244 | a->setText(info.text); | | |||
245 | connect(a, &QAction::triggered, this, info.callback); | | |||
246 | lutActions.insert(info.view, a); // store QAction's pointer for later processing | | |||
247 | if (!info.shortcut.isEmpty()) | | |||
248 | aC->setDefaultShortcut(a, info.shortcut); | | |||
249 | } | | |||
250 | aC->addActions(lutActions.values()); | | |||
251 | | ||||
252 | // Initialize kactivities resource instance | | |||
253 | | ||||
254 | #ifdef KF5Activities_FOUND | | |||
255 | m_activityResourceInstance = new KActivities::ResourceInstance(window()->winId(), this); | | |||
256 | connect(kmymoney, SIGNAL(fileLoaded(QUrl)), m_activityResourceInstance, SLOT(setUri(QUrl))); | | |||
257 | #endif | | |||
258 | } | 195 | } | ||
259 | 196 | | |||
260 | KMyMoneyView::~KMyMoneyView() | 197 | KMyMoneyView::~KMyMoneyView() | ||
261 | { | 198 | { | ||
262 | KMyMoneySettings::setLastViewSelected(m_lastViewSelected); | 199 | KMyMoneySettings::setLastViewSelected(m_lastViewSelected); | ||
263 | #ifdef KF5Activities_FOUND | | |||
264 | delete m_activityResourceInstance; | | |||
265 | #endif | | |||
266 | // removeStorage(); | | |||
267 | } | 200 | } | ||
268 | 201 | | |||
269 | void KMyMoneyView::slotFileOpened() | 202 | void KMyMoneyView::slotFileOpened() | ||
270 | { | 203 | { | ||
271 | if (viewBases.contains(View::OnlineJobOutbox)) | 204 | if (viewBases.contains(View::OnlineJobOutbox)) | ||
272 | viewBases[View::OnlineJobOutbox]->executeCustomAction(eView::Action::InitializeAfterFileOpen); | 205 | viewBases[View::OnlineJobOutbox]->executeCustomAction(eView::Action::InitializeAfterFileOpen); | ||
273 | 206 | | |||
274 | #ifdef ENABLE_UNFINISHEDFEATURES | 207 | #ifdef ENABLE_UNFINISHEDFEATURES | ||
▲ Show 20 Lines • Show All 229 Lines • ▼ Show 20 Line(s) | 434 | { | |||
504 | 437 | | |||
505 | disconnect(viewBases[idView], &KMyMoneyViewBase::selectByObject, this, &KMyMoneyView::slotSelectByObject); | 438 | disconnect(viewBases[idView], &KMyMoneyViewBase::selectByObject, this, &KMyMoneyView::slotSelectByObject); | ||
506 | disconnect(viewBases[idView], &KMyMoneyViewBase::selectByVariant, this, &KMyMoneyView::slotSelectByVariant); | 439 | disconnect(viewBases[idView], &KMyMoneyViewBase::selectByVariant, this, &KMyMoneyView::slotSelectByVariant); | ||
507 | disconnect(viewBases[idView], &KMyMoneyViewBase::customActionRequested, this, &KMyMoneyView::slotCustomActionRequested); | 440 | disconnect(viewBases[idView], &KMyMoneyViewBase::customActionRequested, this, &KMyMoneyView::slotCustomActionRequested); | ||
508 | 441 | | |||
509 | m_model->removePage(viewFrames[idView]); | 442 | m_model->removePage(viewFrames[idView]); | ||
510 | viewFrames.remove(idView); | 443 | viewFrames.remove(idView); | ||
511 | viewBases.remove(idView); | 444 | viewBases.remove(idView); | ||
445 | } | ||||
446 | | ||||
447 | QHash<eMenu::Action, QAction *> KMyMoneyView::actionsToBeConnected() | ||||
448 | { | ||||
449 | using namespace eMenu; | ||||
450 | // add fast switching of main views through Ctrl + NUM_X | ||||
451 | struct pageInfo { | ||||
452 | Action view; | ||||
453 | KMyMoneyViewFunc callback; | ||||
454 | QString text; | ||||
455 | QKeySequence shortcut = QKeySequence(); | ||||
456 | }; | ||||
457 | | ||||
458 | const QVector<pageInfo> pageInfos { | ||||
459 | {Action::ShowHomeView, &KMyMoneyView::slotShowHomePage, i18n("Show home page"), Qt::CTRL + Qt::Key_1}, | ||||
460 | {Action::ShowInstitutionsView, &KMyMoneyView::slotShowInstitutionsPage, i18n("Show institutions page"), Qt::CTRL + Qt::Key_2}, | ||||
461 | {Action::ShowAccountsView, &KMyMoneyView::slotShowAccountsPage, i18n("Show accounts page"), Qt::CTRL + Qt::Key_3}, | ||||
462 | {Action::ShowSchedulesView, &KMyMoneyView::slotShowSchedulesPage, i18n("Show scheduled transactions page"), Qt::CTRL + Qt::Key_4}, | ||||
463 | {Action::ShowCategoriesView, &KMyMoneyView::slotShowCategoriesPage, i18n("Show categories page"), Qt::CTRL + Qt::Key_5}, | ||||
464 | {Action::ShowTagsView, &KMyMoneyView::slotShowTagsPage, i18n("Show tags page"), }, | ||||
465 | {Action::ShowPayeesView, &KMyMoneyView::slotShowPayeesPage, i18n("Show payees page"), Qt::CTRL + Qt::Key_6}, | ||||
466 | {Action::ShowLedgersView, &KMyMoneyView::slotShowLedgersPage, i18n("Show ledgers page"), Qt::CTRL + Qt::Key_7}, | ||||
467 | {Action::ShowInvestmentsView, &KMyMoneyView::slotShowInvestmentsPage, i18n("Show investments page"), Qt::CTRL + Qt::Key_8}, | ||||
468 | {Action::ShowReportsView, &KMyMoneyView::slotShowReportsPage, i18n("Show reports page"), Qt::CTRL + Qt::Key_9}, | ||||
469 | {Action::ShowBudgetView, &KMyMoneyView::slotShowBudgetPage, i18n("Show budget page"), }, | ||||
470 | {Action::ShowForecastView, &KMyMoneyView::slotShowForecastPage, i18n("Show forecast page"), }, | ||||
471 | {Action::ShowOnlineJobOutboxView, &KMyMoneyView::slotShowOutboxPage, i18n("Show outbox page") } | ||||
472 | }; | ||||
512 | 473 | | |||
474 | QHash<Action, QAction *> lutActions; | ||||
475 | auto pageCount = 0; | ||||
476 | for (const pageInfo& info : pageInfos) { | ||||
477 | auto a = new QAction(this); | ||||
478 | // KActionCollection::addAction by name sets object name anyways, | ||||
479 | // so, as better alternative, set it here right from the start | ||||
480 | a->setObjectName(QString::fromLatin1("ShowPage%1").arg(QString::number(pageCount++))); | ||||
481 | a->setText(info.text); | ||||
482 | connect(a, &QAction::triggered, this, info.callback); | ||||
483 | lutActions.insert(info.view, a); // store QAction's pointer for later processing | ||||
484 | if (!info.shortcut.isEmpty()) | ||||
485 | a->setShortcut(info.shortcut); | ||||
486 | } | ||||
487 | return lutActions; | ||||
513 | } | 488 | } | ||
514 | 489 | | |||
515 | bool KMyMoneyView::showPageHeader() const | 490 | bool KMyMoneyView::showPageHeader() const | ||
516 | { | 491 | { | ||
517 | return false; | 492 | return false; | ||
518 | } | 493 | } | ||
519 | 494 | | |||
520 | void KMyMoneyView::showPageAndFocus(View idView) | 495 | void KMyMoneyView::showPageAndFocus(View idView) | ||
521 | { | 496 | { | ||
522 | if (viewFrames.contains(idView)) { | 497 | if (viewFrames.contains(idView)) { | ||
523 | showPage(idView); | 498 | showPage(idView); | ||
524 | viewBases[idView]->executeCustomAction(eView::Action::SetDefaultFocus); | 499 | viewBases[idView]->executeCustomAction(eView::Action::SetDefaultFocus); | ||
525 | } | 500 | } | ||
526 | } | 501 | } | ||
527 | 502 | | |||
528 | void KMyMoneyView::showPage(View idView) | 503 | void KMyMoneyView::showPage(View idView) | ||
529 | { | 504 | { | ||
530 | const auto pageItem = viewFrames[idView]; | 505 | if (!viewFrames.contains(idView) || | ||
531 | // reset all selected items before showing the selected view | 506 | currentPage() == viewFrames[idView]) | ||
532 | // but not while we're in our own constructor | 507 | return; | ||
533 | if (!m_inConstructor && pageItem != currentPage()) { | 508 | | ||
534 | kmymoney->slotResetSelections(); | 509 | setCurrentPage(viewFrames[idView]); | ||
535 | } | 510 | pActions[eMenu::Action::Print]->setEnabled(canPrint()); | ||
536 | 511 | emit aboutToChangeView(); | |||
537 | // pretend we're in the constructor to avoid calling the | | |||
538 | // above resets. For some reason which I don't know the details | | |||
539 | // of, KJanusWidget::showPage() calls itself recursively. This | | |||
540 | // screws up the action handling, as items could have been selected | | |||
541 | // in the meantime. We prevent this by setting the m_inConstructor | | |||
542 | // to true and reset it to the previos value when we leave this method. | | |||
543 | bool prevConstructor = m_inConstructor; | | |||
544 | m_inConstructor = true; | | |||
545 | | ||||
546 | setCurrentPage(pageItem); | | |||
547 | | ||||
548 | m_inConstructor = prevConstructor; | | |||
549 | | ||||
550 | if (!m_inConstructor) { | | |||
551 | // fixup some actions that are dependant on the view | | |||
552 | // this does not work during construction | | |||
553 | kmymoney->slotUpdateActions(); | | |||
554 | } | | |||
555 | } | 512 | } | ||
556 | 513 | | |||
557 | bool KMyMoneyView::canPrint() | 514 | bool KMyMoneyView::canPrint() | ||
558 | { | 515 | { | ||
559 | return ((viewFrames.contains(View::Reports) && viewFrames[View::Reports] == currentPage()) || | 516 | return ((viewFrames.contains(View::Reports) && viewFrames[View::Reports] == currentPage()) || | ||
560 | (viewFrames.contains(View::Home) && viewFrames[View::Home] == currentPage()) | 517 | (viewFrames.contains(View::Home) && viewFrames[View::Home] == currentPage()) | ||
561 | ); | 518 | ); | ||
562 | } | 519 | } | ||
▲ Show 20 Lines • Show All 338 Lines • Show Last 20 Lines |