Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/views/kreportsview.cpp
Context not available. | |||||
64 | #include "querytable.h" | 64 | #include "querytable.h" | ||
---|---|---|---|---|---|
65 | #include "objectinfotable.h" | 65 | #include "objectinfotable.h" | ||
66 | #include "kreportconfigurationfilterdlg.h" | 66 | #include "kreportconfigurationfilterdlg.h" | ||
67 | #include <icons/icons.h> | ||||
67 | 68 | | |||
68 | using namespace reports; | 69 | using namespace reports; | ||
70 | using namespace Icons; | ||||
69 | 71 | | |||
70 | #define VIEW_LEDGER "ledger" | 72 | #define VIEW_LEDGER "ledger" | ||
71 | #define VIEW_SCHEDULE "schedule" | 73 | #define VIEW_SCHEDULE "schedule" | ||
Context not available. | |||||
94 | m_tableView->setZoomFactor(KMyMoneyGlobalSettings::zoomFactor()); | 96 | m_tableView->setZoomFactor(KMyMoneyGlobalSettings::zoomFactor()); | ||
95 | 97 | | |||
96 | //set button icons | 98 | //set button icons | ||
97 | m_control->ui->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("office-chart-line"), | 99 | m_control->ui->buttonChart->setIcon(QIcon::fromTheme(g_Icons[Icon::OfficeChartLine])); | ||
98 | QIcon::fromTheme(QStringLiteral("report-line")))); | 100 | m_control->ui->buttonClose->setIcon(QIcon::fromTheme(g_Icons[Icon::DocumentClose])); | ||
99 | if (QIcon::hasThemeIcon(QStringLiteral("document-close"))) | 101 | m_control->ui->buttonConfigure->setIcon(QIcon::fromTheme(g_Icons[Icon::Configure])); | ||
100 | m_control->ui->buttonClose->setIcon(QIcon::fromTheme(QStringLiteral("document-close"))); | 102 | m_control->ui->buttonCopy->setIcon(QIcon::fromTheme(g_Icons[Icon::EditCopy])); | ||
101 | else | 103 | m_control->ui->buttonDelete->setIcon(QIcon::fromTheme(g_Icons[Icon::EditDelete])); | ||
102 | m_control->ui->buttonClose->setIcon(QIcon::fromTheme(QStringLiteral("stop"))); | 104 | m_control->ui->buttonExport->setIcon(QIcon::fromTheme(g_Icons[Icon::DocumentExport])); | ||
103 | m_control->ui->buttonConfigure->setIcon(QIcon::fromTheme(QStringLiteral("configure"), | 105 | m_control->ui->buttonNew->setIcon(QIcon::fromTheme(g_Icons[Icon::DocumentNew])); | ||
104 | QIcon::fromTheme(QStringLiteral("preferences-system")))); | | |||
105 | m_control->ui->buttonCopy->setIcon(QIcon::fromTheme(QStringLiteral("edit-copy"))); | | |||
106 | m_control->ui->buttonDelete->setIcon(QIcon::fromTheme(QStringLiteral("edit-delete"))); | | |||
107 | if (QIcon::hasThemeIcon(QStringLiteral("document-export"))) | | |||
108 | m_control->ui->buttonExport->setIcon(QIcon::fromTheme(QStringLiteral("document-export"))); | | |||
109 | else | | |||
110 | m_control->ui->buttonExport->setIcon(QIcon::fromTheme(QStringLiteral("format-indent-more"))); | | |||
111 | m_control->ui->buttonNew->setIcon(QIcon::fromTheme(QStringLiteral("document-new"))); | | |||
112 | 106 | | |||
113 | m_chartView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); | 107 | m_chartView->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); | ||
114 | m_chartView->hide(); | 108 | m_chartView->hide(); | ||
Context not available. | |||||
145 | m_control->ui->buttonDelete->setEnabled(false); | 139 | m_control->ui->buttonDelete->setEnabled(false); | ||
146 | 140 | | |||
147 | int tabNr = parent->addTab(this, | 141 | int tabNr = parent->addTab(this, | ||
148 | QIcon::fromTheme(QStringLiteral("application-vnd.oasis.opendocument.spreadsheet")), | 142 | QIcon::fromTheme(g_Icons[Icon::Spreadsheet]), | ||
149 | report.name()); | 143 | report.name()); | ||
150 | parent->setTabEnabled(tabNr, true); | 144 | parent->setTabEnabled(tabNr, true); | ||
151 | parent->setCurrentIndex(tabNr); | 145 | parent->setCurrentIndex(tabNr); | ||
Context not available. | |||||
275 | 269 | | |||
276 | m_control->ui->buttonChart->setText(i18n("Chart")); | 270 | m_control->ui->buttonChart->setText(i18n("Chart")); | ||
277 | m_control->ui->buttonChart->setToolTip(i18n("Show the chart version of this report")); | 271 | m_control->ui->buttonChart->setToolTip(i18n("Show the chart version of this report")); | ||
278 | m_control->ui->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("office-chart-line"), | 272 | m_control->ui->buttonChart->setIcon(QIcon::fromTheme(g_Icons[Icon::OfficeChartLine])); | ||
279 | QIcon::fromTheme(QStringLiteral("report-line")))); | | |||
280 | } else { | 273 | } else { | ||
281 | if (!m_isChartViewValid) | 274 | if (!m_isChartViewValid) | ||
282 | m_table->drawChart(*m_chartView); | 275 | m_table->drawChart(*m_chartView); | ||
Context not available. | |||||
286 | 279 | | |||
287 | m_control->ui->buttonChart->setText(i18n("Report")); | 280 | m_control->ui->buttonChart->setText(i18n("Report")); | ||
288 | m_control->ui->buttonChart->setToolTip(i18n("Show the report version of this chart")); | 281 | m_control->ui->buttonChart->setToolTip(i18n("Show the report version of this chart")); | ||
289 | m_control->ui->buttonChart->setIcon(QIcon::fromTheme(QStringLiteral("view-financial-list"), | 282 | m_control->ui->buttonChart->setIcon(QIcon::fromTheme(g_Icons[Icon::ViewFinancialList])); | ||
290 | QIcon::fromTheme(QStringLiteral("ledger")))); | | |||
291 | } | 283 | } | ||
292 | m_showingChart = ! m_showingChart; | 284 | m_showingChart = ! m_showingChart; | ||
293 | } | 285 | } | ||
Context not available. |