Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/views/kforecastview.cpp
Show First 20 Lines • Show All 932 Lines • ▼ Show 20 Line(s) | 932 | if (isNegative) { | |||
---|---|---|---|---|---|
933 | for (int i = 0; i < item->columnCount(); ++i) { | 933 | for (int i = 0; i < item->columnCount(); ++i) { | ||
934 | item->setForeground(i, KMyMoneyGlobalSettings::listNegativeValueColor()); | 934 | item->setForeground(i, KMyMoneyGlobalSettings::listNegativeValueColor()); | ||
935 | } | 935 | } | ||
936 | } | 936 | } | ||
937 | } | 937 | } | ||
938 | 938 | | |||
939 | void KForecastView::showAmount(QTreeWidgetItem* item, int column, const MyMoneyMoney& amount, const MyMoneySecurity& security) | 939 | void KForecastView::showAmount(QTreeWidgetItem* item, int column, const MyMoneyMoney& amount, const MyMoneySecurity& security) | ||
940 | { | 940 | { | ||
941 | item->setText(column, MyMoneyUtils::formatMoney(amount, item->data(0, AccountRole).value<MyMoneyAccount>(), security)); | 941 | item->setText(column, MyMoneyUtils::formatMoney(amount, security)); | ||
942 | item->setTextAlignment(column, Qt::AlignRight | Qt::AlignVCenter); | 942 | item->setTextAlignment(column, Qt::AlignRight | Qt::AlignVCenter); | ||
943 | item->setFont(column, item->font(0)); | 943 | item->setFont(column, item->font(0)); | ||
944 | if (amount.isNegative()) { | 944 | if (amount.isNegative()) { | ||
945 | item->setForeground(column, KMyMoneyGlobalSettings::listNegativeValueColor()); | 945 | item->setForeground(column, KMyMoneyGlobalSettings::listNegativeValueColor()); | ||
946 | } | 946 | } | ||
947 | } | 947 | } | ||
948 | 948 | | |||
949 | void KForecastView::adjustParentValue(QTreeWidgetItem *item, int column, const MyMoneyMoney& value) | 949 | void KForecastView::adjustParentValue(QTreeWidgetItem *item, int column, const MyMoneyMoney& value) | ||
▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines |