You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
452 lines
16 KiB
452 lines
16 KiB
15 years ago
|
/* This file is part of the KDE project
|
||
|
Copyright (C) 2005 Dag Andersen kplato@kde.org>
|
||
|
|
||
|
This library is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU Library General Public
|
||
|
License as published by the Free Software Foundation;
|
||
|
version 2 of the License.
|
||
|
|
||
|
This library is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
Library General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU Library General Public License
|
||
|
along with this library; see the file COPYING.LIB. If not, write to
|
||
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
|
*/
|
||
|
|
||
|
#include "kptaccountsview.h"
|
||
|
|
||
|
#include "kptaccountsviewconfigdialog.h"
|
||
|
#include "kptcontext.h"
|
||
|
#include "kptdatetime.h"
|
||
|
#include "kptproject.h"
|
||
|
#include "kptview.h"
|
||
|
#include "kpteffortcostmap.h"
|
||
|
|
||
14 years ago
|
#include <tqapplication.h>
|
||
|
#include <tqcombobox.h>
|
||
|
#include <tqdatetime.h>
|
||
|
#include <tqdatetimeedit.h>
|
||
|
#include <tqheader.h>
|
||
|
#include <tqlabel.h>
|
||
13 years ago
|
#include <tqlayout.h>
|
||
14 years ago
|
#include <tqpainter.h>
|
||
13 years ago
|
#include <tqpalette.h>
|
||
14 years ago
|
#include <tqpushbutton.h>
|
||
|
#include <tqvaluelist.h>
|
||
|
#include <tqpopupmenu.h>
|
||
|
#include <tqsizepolicy.h>
|
||
|
#include <tqhbox.h>
|
||
|
#include <tqpaintdevicemetrics.h>
|
||
15 years ago
|
|
||
|
#include <kcalendarsystem.h>
|
||
12 years ago
|
#include <tdeglobal.h>
|
||
12 years ago
|
#include <tdelistview.h>
|
||
12 years ago
|
#include <tdelocale.h>
|
||
15 years ago
|
#include <kprinter.h>
|
||
|
|
||
|
#include <kdebug.h>
|
||
|
|
||
|
namespace KPlato
|
||
|
{
|
||
|
|
||
14 years ago
|
class Label : public TQLabel
|
||
15 years ago
|
{
|
||
|
public:
|
||
14 years ago
|
Label(TQWidget *w)
|
||
|
: TQLabel(w)
|
||
15 years ago
|
{}
|
||
14 years ago
|
void paintContents(TQPainter *p) {
|
||
15 years ago
|
drawContents(p);
|
||
|
}
|
||
|
};
|
||
|
|
||
14 years ago
|
AccountsView::AccountItem::AccountItem(Account *a, TQListView *parent, bool highlight)
|
||
|
: DoubleListViewBase::MasterListItem(parent, a->name(), highlight),
|
||
15 years ago
|
account(a) {
|
||
14 years ago
|
if (parent->columns() >= 3) {
|
||
15 years ago
|
setText(2, a->description());
|
||
|
}
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
|
}
|
||
14 years ago
|
AccountsView::AccountItem::AccountItem(Account *a, TQListViewItem *p, bool highlight)
|
||
15 years ago
|
: DoubleListViewBase::MasterListItem(p, a->name(), highlight),
|
||
|
account(a) {
|
||
|
if (listView() && listView()->columns() >= 3) {
|
||
|
setText(2, a->description());
|
||
|
}
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
|
}
|
||
|
|
||
14 years ago
|
AccountsView::AccountItem::AccountItem(TQString text, Account *a, TQListViewItem *parent, bool highlight)
|
||
|
: DoubleListViewBase::MasterListItem(parent, text, highlight),
|
||
15 years ago
|
account(a) {
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
|
}
|
||
|
|
||
14 years ago
|
void AccountsView::AccountItem::add(int col, const TQDate &date, const EffortCost &ec) {
|
||
15 years ago
|
EffortCost &cm = costMap.add(date, ec);
|
||
|
if (m_slaveItem)
|
||
12 years ago
|
m_slaveItem->setText(col, TDEGlobal::locale()->formatMoney(cm.cost(), "", 0));
|
||
15 years ago
|
}
|
||
|
|
||
14 years ago
|
AccountsView::AccountsView(Project &project, View *view, TQWidget *parent)
|
||
|
: TQWidget(parent, "Accounts view"),
|
||
15 years ago
|
m_mainview(view),
|
||
|
m_project(project),
|
||
|
m_accounts(project.accounts()) {
|
||
|
|
||
13 years ago
|
m_date = TQDate::currentDate();
|
||
15 years ago
|
m_period = 0;
|
||
|
m_periodTexts<<i18n("Day")<<i18n("Week")<<i18n("Month");
|
||
|
m_cumulative = false;
|
||
|
|
||
14 years ago
|
TQVBoxLayout *lay1 = new TQVBoxLayout(this, 0, KDialog::spacingHint());
|
||
15 years ago
|
|
||
14 years ago
|
TQHBoxLayout *lay2 = new TQHBoxLayout(0, 0, KDialog::spacingHint());
|
||
15 years ago
|
m_label = new Label(this);
|
||
14 years ago
|
m_label->setFrameShape(TQLabel::StyledPanel);
|
||
|
m_label->setFrameShadow(TQLabel::Sunken);
|
||
13 years ago
|
m_label->setAlignment(int(TQLabel::WordBreak | TQLabel::AlignVCenter));
|
||
15 years ago
|
lay2->addWidget(m_label);
|
||
14 years ago
|
m_changeBtn = new TQPushButton(i18n("Configure..."), this);
|
||
13 years ago
|
m_changeBtn->setSizePolicy(TQSizePolicy((TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_changeBtn->sizePolicy().hasHeightForWidth()));
|
||
15 years ago
|
lay2->addWidget(m_changeBtn);
|
||
|
lay1->addLayout(lay2);
|
||
|
|
||
|
m_dlv = new DoubleListViewBase(this, true);
|
||
|
m_dlv->setNameHeader(i18n("Account"));
|
||
|
|
||
|
init();
|
||
|
|
||
|
lay1->addWidget(m_dlv);
|
||
|
|
||
14 years ago
|
connect(this, TQT_SIGNAL(update()), TQT_SLOT(slotUpdate()));
|
||
|
connect(m_changeBtn, TQT_SIGNAL(clicked()), TQT_SLOT(slotConfigure()));
|
||
15 years ago
|
|
||
14 years ago
|
TQValueList<int> list = m_dlv->sizes();
|
||
15 years ago
|
int tot = list[0] + list[1];
|
||
14 years ago
|
list[0] = TQMIN(35, tot);
|
||
15 years ago
|
list[1] = tot-list[0];
|
||
|
m_dlv->setSizes(list);
|
||
|
}
|
||
|
|
||
|
void AccountsView::zoom(double zoom) {
|
||
|
Q_UNUSED(zoom);
|
||
|
}
|
||
|
|
||
|
void AccountsView::init() {
|
||
13 years ago
|
m_date = TQDate::currentDate();
|
||
15 years ago
|
m_period = 0;
|
||
|
initAccList(m_accounts.accountList());
|
||
|
}
|
||
|
|
||
|
void AccountsView::draw() {
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
|
Context::Accountsview context;
|
||
|
getContextClosedItems(context, m_dlv->masterListView()->firstChild());
|
||
|
initAccList(m_accounts.accountList());
|
||
|
setContextClosedItems(context);
|
||
|
slotUpdate();
|
||
|
}
|
||
|
|
||
|
void AccountsView::initAccList(const AccountList &list) {
|
||
|
m_dlv->clearLists();
|
||
|
AccountListIterator it = list;
|
||
|
for (it.toLast(); it.current(); --it) {
|
||
|
AccountsView::AccountItem *a = new AccountsView::AccountItem(it.current(), m_dlv->masterListView());
|
||
|
a->setOpen(true);
|
||
|
a->setExpandable(!it.current()->isElement());
|
||
|
initAccSubItems(it.current(), a);
|
||
|
}
|
||
|
createPeriods();
|
||
|
}
|
||
|
|
||
14 years ago
|
void AccountsView::initAccSubItems(Account *acc, AccountsView::AccountItem *parent) {
|
||
15 years ago
|
if (!acc->accountList().isEmpty()) {
|
||
14 years ago
|
/* AccountsView::AccountItem *a = new AccountsView::AccountItem(i18n("Subaccounts"), acc, parent);
|
||
|
DoubleListViewBase::SlaveListItem *i = new DoubleListViewBase::SlaveListItem(a, parent->period);
|
||
15 years ago
|
a->period = i;*/
|
||
|
|
||
14 years ago
|
initAccList(acc->accountList(), parent);
|
||
15 years ago
|
}
|
||
14 years ago
|
// AccountsView::AccountItem *a = new AccountsView::AccountItem(i18n("Variance"), acc, parent, true);
|
||
|
// DoubleListViewBase::SlaveListItem *i = new DoubleListViewBase::SlaveListItem(a, parent->period, true);
|
||
15 years ago
|
// a->period = i;
|
||
|
//
|
||
14 years ago
|
// a = new AccountsView::AccountItem(i18n("Actual"), acc, parent);
|
||
|
// i = new DoubleListViewBase::SlaveListItem(a, parent->period);
|
||
15 years ago
|
// a->period = i;
|
||
|
//
|
||
14 years ago
|
// a = new AccountsView::AccountItem(i18n("Planned"), acc, parent);
|
||
|
// i = new DoubleListViewBase::SlaveListItem(a, parent->period);
|
||
15 years ago
|
// a->period = i;
|
||
|
|
||
|
}
|
||
|
|
||
14 years ago
|
void AccountsView::initAccList(const AccountList &list, AccountsView::AccountItem *parent) {
|
||
15 years ago
|
AccountListIterator it = list;
|
||
|
for (it.toLast(); it.current(); --it) {
|
||
14 years ago
|
AccountsView::AccountItem *a = new AccountsView::AccountItem(it.current(), parent);
|
||
15 years ago
|
a->setOpen(true);
|
||
|
a->setExpandable(!it.current()->isElement());
|
||
|
initAccSubItems(it.current(), a);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void AccountsView::clearPeriods() {
|
||
|
m_dlv->clearSlaveList();
|
||
|
}
|
||
|
|
||
|
void AccountsView::createPeriods() {
|
||
|
m_dlv->createSlaveItems();
|
||
|
}
|
||
|
|
||
|
void AccountsView::slotUpdate() {
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
14 years ago
|
TQApplication::setOverrideCursor(TQt::waitCursor);
|
||
15 years ago
|
createPeriods();
|
||
12 years ago
|
TDELocale *locale = TDEGlobal::locale();
|
||
15 years ago
|
const KCalendarSystem *cal = locale->calendar();
|
||
|
|
||
14 years ago
|
TQString t;
|
||
15 years ago
|
if (m_cumulative) {
|
||
|
t += " <b>" + i18n("Cumulative") + "</b> ";
|
||
|
}
|
||
13 years ago
|
t += i18n("Cut-off date:%1").arg("<b>" + locale->formatDate(m_date, true) + "</b>");
|
||
|
t += " " + i18n("Periodicity:%1").arg("<b>" + periodText(m_period) + "</b>");
|
||
15 years ago
|
m_label->setText(t);
|
||
|
|
||
|
// Add columns for selected period/periods
|
||
14 years ago
|
TQDate start = m_project.startTime().date();
|
||
|
TQDate end = m_date;
|
||
15 years ago
|
//kdDebug()<<k_funcinfo<<start.toString()<<" - "<<end.toString()<<endl;
|
||
|
int c=0;
|
||
|
if (m_period == 0) { //Daily
|
||
14 years ago
|
for (TQDate dt = start; dt <= end; dt = cal->addDays(dt, 1), ++c) {
|
||
|
TQString df = locale->formatDate(dt, true);
|
||
15 years ago
|
m_dlv->addSlaveColumn(df);
|
||
|
}
|
||
14 years ago
|
TQListViewItemIterator it(m_dlv->masterListView());
|
||
15 years ago
|
for (;it.current(); ++it) {
|
||
|
AccountsView::AccountItem *item = dynamic_cast<AccountsView::AccountItem*>(it.current());
|
||
|
if (!item || !item->account || !item->account->isElement()) {
|
||
|
continue;
|
||
|
}
|
||
|
item->costMap = m_accounts.plannedCost(*(item->account), start, end);
|
||
|
double cost = 0.0;
|
||
|
int col=0;
|
||
14 years ago
|
for (TQDate d=start; d <= end; d = cal->addDays(d, 1), ++col) {
|
||
15 years ago
|
EffortCost &ec = item->costMap.effortCostOnDate(d);
|
||
|
cost = (m_cumulative ? cost + ec.cost() : ec.cost());
|
||
|
item->setSlaveItem(col, cost);
|
||
|
m_cumulative ? item->setTotal(cost) : item->addToTotal(cost);
|
||
|
}
|
||
|
}
|
||
|
m_dlv->calculate();
|
||
14 years ago
|
TQApplication::restoreOverrideCursor();
|
||
15 years ago
|
return;
|
||
|
}
|
||
|
if (m_period == 1) { //Weekly
|
||
|
//TODO make this user controlled
|
||
|
int weekStartDay = locale->weekStartDay();
|
||
|
|
||
14 years ago
|
TQDate dt = start;
|
||
|
TQDate pend = cal->addDays(dt, 7 + weekStartDay - 1 - cal->dayOfWeek(dt));
|
||
15 years ago
|
for (; pend <= end; ++c) {
|
||
|
//kdDebug()<<k_funcinfo<<c<<": "<<dt<<"-"<<pend<<" : "<<end<<endl;
|
||
|
int y;
|
||
|
int w = cal->weekNumber(dt, &y);
|
||
13 years ago
|
TQString t = i18n("<week>-<year>", "%1-%2").arg(w).arg(y);
|
||
15 years ago
|
m_dlv->addSlaveColumn(t);
|
||
|
dt = pend.addDays(1);
|
||
|
pend = cal->addDays(pend, 7);
|
||
|
if ((pend.year() == end.year()) && (pend.weekNumber() == end.weekNumber())) {
|
||
|
pend = end;
|
||
|
}
|
||
|
}
|
||
|
if (c == 0) {
|
||
14 years ago
|
TQApplication::restoreOverrideCursor();
|
||
15 years ago
|
return;
|
||
|
}
|
||
14 years ago
|
TQListViewItemIterator it(m_dlv->masterListView());
|
||
15 years ago
|
for (;it.current(); ++it) {
|
||
|
AccountsView::AccountItem *item = dynamic_cast<AccountsView::AccountItem*>(it.current());
|
||
|
if (!item || !item->account || !item->account->isElement()) {
|
||
|
continue;
|
||
|
}
|
||
|
item->costMap = m_accounts.plannedCost(*(item->account), start, end);
|
||
|
double cost = 0.0;
|
||
14 years ago
|
TQDate d = start;
|
||
|
TQDate pend = cal->addDays(d, 7 + weekStartDay - 1 - cal->dayOfWeek(d));
|
||
15 years ago
|
for (int col=0; pend <= end; ++col) {
|
||
|
double cst = item->costMap.cost(d, d.daysTo(pend)+1);
|
||
|
cost = (m_cumulative ? cost + cst : cst);
|
||
|
item->setSlaveItem(col, cost);
|
||
|
m_cumulative ? item->setTotal(cost) : item->addToTotal(cost);
|
||
|
d = pend.addDays(1); // 1. next week
|
||
|
pend = cal->addDays(pend, 7);
|
||
|
if ((pend.year() == end.year()) && (pend.weekNumber() == end.weekNumber())) {
|
||
|
pend = end;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
m_dlv->calculate();
|
||
14 years ago
|
TQApplication::restoreOverrideCursor();
|
||
15 years ago
|
return;
|
||
|
}
|
||
|
if (m_period == 2) { //Monthly
|
||
|
//TODO make this user controlled
|
||
14 years ago
|
TQDate dt = start;
|
||
|
TQDate pend;
|
||
15 years ago
|
cal->setYMD(pend, dt.year(), dt.month(), dt.daysInMonth());
|
||
|
for (; pend <= end; ++c) {
|
||
|
//kdDebug()<<k_funcinfo<<c<<": "<<dt<<"-"<<pend<<" : "<<end<<endl;
|
||
13 years ago
|
TQString m = cal->monthName(dt, true) + TQString(" %1").arg( dt.year());
|
||
15 years ago
|
m_dlv->addSlaveColumn(m);
|
||
|
|
||
|
dt = pend.addDays(1); // 1. next month
|
||
|
pend = cal->addDays(pend, dt.daysInMonth());
|
||
|
if ((pend.year() == end.year()) && (pend.month() == end.month())) {
|
||
|
pend = end;
|
||
|
}
|
||
|
}
|
||
|
if (c == 0) {
|
||
14 years ago
|
TQApplication::restoreOverrideCursor();
|
||
15 years ago
|
return;
|
||
|
}
|
||
14 years ago
|
TQListViewItemIterator it(m_dlv->masterListView());
|
||
15 years ago
|
for (;it.current(); ++it) {
|
||
|
AccountsView::AccountItem *item = dynamic_cast<AccountsView::AccountItem*>(it.current());
|
||
|
if (!item || !item->account || !item->account->isElement()) {
|
||
|
continue;
|
||
|
}
|
||
|
item->costMap = m_accounts.plannedCost(*(item->account), start, end);
|
||
|
double cost = 0.0;
|
||
14 years ago
|
TQDate d = start;
|
||
15 years ago
|
cal->setYMD(pend, d.year(), d.month(), d.daysInMonth());
|
||
|
for (int col=0; pend <= end; ++col) {
|
||
|
double cst = item->costMap.cost(d, d.daysTo(pend)+1);
|
||
|
cost = (m_cumulative ? cost + cst : cst);
|
||
|
item->setSlaveItem(col, cost);
|
||
|
m_cumulative ? item->setTotal(cost) : item->addToTotal(cost);
|
||
|
d = pend.addDays(1); // 1. next month
|
||
|
pend = cal->addDays(pend, d.daysInMonth());
|
||
|
if ((pend.year() == end.year()) && (pend.month() == end.month())) {
|
||
|
pend = end;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
m_dlv->calculate();
|
||
14 years ago
|
TQApplication::restoreOverrideCursor();
|
||
15 years ago
|
return;
|
||
|
}
|
||
14 years ago
|
TQApplication::restoreOverrideCursor();
|
||
15 years ago
|
}
|
||
|
|
||
|
void AccountsView::print(KPrinter &printer) {
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
14 years ago
|
TQPaintDeviceMetrics m = TQPaintDeviceMetrics ( &printer );
|
||
15 years ago
|
uint top, left, bottom, right;
|
||
|
printer.margins(&top, &left, &bottom, &right);
|
||
|
//kdDebug()<<m.width()<<"x"<<m.height()<<" : "<<top<<", "<<left<<", "<<bottom<<", "<<right<<" : "<<size()<<endl;
|
||
14 years ago
|
TQPainter p;
|
||
15 years ago
|
p.begin(&printer);
|
||
|
p.setViewport(left, top, m.width()-left-right, m.height()-top-bottom);
|
||
|
p.setClipRect(left, top, m.width()-left-right, m.height()-top-bottom);
|
||
14 years ago
|
TQRect preg = p.clipRegion(TQPainter::CoordPainter).boundingRect();
|
||
15 years ago
|
//kdDebug()<<"p="<<preg<<endl;
|
||
|
//p.drawRect(preg.x(), preg.y(), preg.width()-1, preg.height()-1);
|
||
14 years ago
|
double scale = TQMIN((double)preg.width()/(double)size().width(), (double)preg.height()/(double)(size().height()));
|
||
15 years ago
|
//kdDebug()<<"scale="<<scale<<endl;
|
||
|
if (scale < 1.0) {
|
||
|
p.scale(scale, scale);
|
||
|
}
|
||
|
m_label->paintContents(&p);
|
||
|
p.translate(0, m_label->size().height());
|
||
|
m_dlv->paintContents(&p);
|
||
|
p.end();
|
||
|
}
|
||
|
|
||
|
bool AccountsView::setContext(Context::Accountsview &context) {
|
||
|
//kdDebug()<<k_funcinfo<<"---->"<<endl;
|
||
14 years ago
|
TQValueList<int> list;
|
||
15 years ago
|
list << context.accountsviewsize << context.periodviewsize;
|
||
|
//m_dlv->setSizes(list); //NOTE: This doesn't always work!
|
||
|
m_date = context.date;
|
||
|
if (!m_date.isValid())
|
||
13 years ago
|
m_date = TQDate::currentDate();
|
||
15 years ago
|
m_period = context.period;
|
||
|
m_cumulative = context.cumulative;
|
||
|
setContextClosedItems(context);
|
||
|
//kdDebug()<<k_funcinfo<<"<----"<<endl;
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
void AccountsView::setContextClosedItems(Context::Accountsview &context) {
|
||
14 years ago
|
for (TQStringList::ConstIterator it = context.closedItems.begin(); it != context.closedItems.end(); ++it) {
|
||
15 years ago
|
if (m_accounts.findAccount(*it)) {
|
||
14 years ago
|
TQListViewItemIterator lit(m_dlv->masterListView());
|
||
15 years ago
|
for (; lit.current(); ++lit) {
|
||
|
if (lit.current()->text(0) == (*it)) {
|
||
|
m_dlv->setOpen(lit.current(), false);
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void AccountsView::getContext(Context::Accountsview &context) const {
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
|
context.accountsviewsize = m_dlv->sizes()[0];
|
||
|
context.periodviewsize = m_dlv->sizes()[1];
|
||
|
context.date = m_date;
|
||
|
context.period = m_period;
|
||
|
context.cumulative = m_cumulative;
|
||
|
//kdDebug()<<k_funcinfo<<"sizes="<<sizes()[0]<<","<<sizes()[1]<<endl;
|
||
|
|
||
|
getContextClosedItems(context, m_dlv->masterListView()->firstChild());
|
||
|
}
|
||
|
|
||
|
|
||
14 years ago
|
void AccountsView::getContextClosedItems(Context::Accountsview &context, TQListViewItem *item) const {
|
||
15 years ago
|
if (item == 0)
|
||
|
return;
|
||
14 years ago
|
for (TQListViewItem *i = item; i; i = i->nextSibling()) {
|
||
15 years ago
|
if (!i->isOpen()) {
|
||
|
context.closedItems.append(i->text(0));
|
||
|
//kdDebug()<<k_funcinfo<<"add closed "<<i->text(0)<<endl;
|
||
|
}
|
||
|
getContextClosedItems(context, i->firstChild());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
void AccountsView::slotConfigure() {
|
||
|
//kdDebug()<<k_funcinfo<<endl;
|
||
|
AccountsviewConfigDialog *dia = new AccountsviewConfigDialog(m_date, m_period, m_periodTexts, m_cumulative, this);
|
||
|
if (dia->exec()) {
|
||
|
m_date = dia->date();
|
||
|
m_period = dia->period();
|
||
|
m_cumulative = dia->isCumulative();
|
||
|
emit update();
|
||
|
}
|
||
|
delete dia;
|
||
|
}
|
||
|
|
||
14 years ago
|
TQString AccountsView::periodText(int offset) {
|
||
|
TQString s;
|
||
|
TQStringList::const_iterator it = m_periodTexts.at(offset);
|
||
15 years ago
|
if (it != m_periodTexts.constEnd()) {
|
||
|
s = (*it);
|
||
|
}
|
||
|
return s;
|
||
|
}
|
||
|
|
||
|
} //KPlato namespace
|
||
|
|
||
|
#include "kptaccountsview.moc"
|