Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/18/head
Michele Calgaro 6 months ago
parent ecdc0343d4
commit 96c67c9b39
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -241,13 +241,13 @@ void KSettingsDlg::setPageGeneral()
// Create a group box to hold the available options // Create a group box to hold the available options
QButtonGroup *qbuttongroup = new QButtonGroup(qvboxMainFrame, "GroupBox1"); QButtonGroup *qbuttongroup = new QButtonGroup(qvboxMainFrame, "GroupBox1");
qbuttongroup->setTitle( i18n( "Startup options" ) ); qbuttongroup->setTitle( i18n( "Startup options" ) );
qbuttongroup->setColumnLayout(0, Qt::Vertical ); qbuttongroup->setColumnLayout(0, TQt::Vertical );
qbuttongroup->layout()->setSpacing( 0 ); qbuttongroup->layout()->setSpacing( 0 );
qbuttongroup->layout()->setMargin( 0 ); qbuttongroup->layout()->setMargin( 0 );
// Create a layout to organize the widgets. // Create a layout to organize the widgets.
QVBoxLayout *qvboxlayout = new QVBoxLayout(qbuttongroup->layout()); QVBoxLayout *qvboxlayout = new QVBoxLayout(qbuttongroup->layout());
qvboxlayout->setAlignment( Qt::AlignTop ); qvboxlayout->setAlignment( TQt::AlignTop );
qvboxlayout->setSpacing( 6 ); qvboxlayout->setSpacing( 6 );
qvboxlayout->setMargin( 11 ); qvboxlayout->setMargin( 11 );
@ -308,13 +308,13 @@ void KSettingsDlg::setPageList()
// Create a group to hold two radio buttons // Create a group to hold two radio buttons
QButtonGroup *qbuttongroup = new QButtonGroup(qwidgetPage, "ButtonGroup1"); QButtonGroup *qbuttongroup = new QButtonGroup(qwidgetPage, "ButtonGroup1");
qbuttongroup->setTitle(i18n("Row Colour options")); qbuttongroup->setTitle(i18n("Row Colour options"));
qbuttongroup->setColumnLayout(0, Qt::Vertical ); qbuttongroup->setColumnLayout(0, TQt::Vertical );
qbuttongroup->layout()->setSpacing( 0 ); qbuttongroup->layout()->setSpacing( 0 );
qbuttongroup->layout()->setMargin( 0 ); qbuttongroup->layout()->setMargin( 0 );
// Create a layout // Create a layout
QVBoxLayout *qvboxlayout = new QVBoxLayout(qbuttongroup->layout()); QVBoxLayout *qvboxlayout = new QVBoxLayout(qbuttongroup->layout());
qvboxlayout->setAlignment( Qt::AlignTop ); qvboxlayout->setAlignment( TQt::AlignTop );
qvboxlayout->setSpacing( 6 ); qvboxlayout->setSpacing( 6 );
qvboxlayout->setMargin( 11 ); qvboxlayout->setMargin( 11 );
@ -416,8 +416,8 @@ void KSettingsDlg::configRead()
tdeconfig->setGroup("List Options"); tdeconfig->setGroup("List Options");
QFont qfontDefault = QFont("helvetica", 12); QFont qfontDefault = QFont("helvetica", 12);
TQColor qcolorDefault = Qt::white; TQColor qcolorDefault = TQt::white;
TQColor qcolorDefaultBG = Qt::gray; TQColor qcolorDefaultBG = TQt::gray;
m_qcolorTempList = tdeconfig->readColorEntry("listColor", &amp;qcolorDefault); m_qcolorTempList = tdeconfig->readColorEntry("listColor", &amp;qcolorDefault);
m_kcolorbuttonList->setColor(m_qcolorTempList); m_kcolorbuttonList->setColor(m_qcolorTempList);

@ -1429,7 +1429,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
MyMoneyMoney splitValue (convBadValue (gsp->value())); MyMoneyMoney splitValue (convBadValue (gsp->value()));
if (gsp->value() == "-1/0") { // treat gnc invalid value as zero if (gsp->value() == "-1/0") { // treat gnc invalid value as zero
// it's not quite a consistency check, but easier to treat it as such // it's not quite a consistency check, but easier to treat it as such
postMessage ("CC", 4, splitAccount.name().latin1(), TQString(m_txDatePosted.toString(Qt::ISODate)).latin1()); postMessage ("CC", 4, splitAccount.name().latin1(), TQString(m_txDatePosted.toString(TQt::ISODate)).latin1());
} }
MyMoneyMoney splitQuantity(convBadValue(gsp->qty())); MyMoneyMoney splitQuantity(convBadValue(gsp->qty()));
split.setValue (splitValue); split.setValue (splitValue);
@ -1470,7 +1470,7 @@ void MyMoneyGncReader::convertSplit (const GncSplit *gsp) {
e.setTradingCurrency (m_txCommodity); e.setTradingCurrency (m_txCommodity);
if (gncdebug) tqDebug(TQString("added price for %1, %2 date %3"). if (gncdebug) tqDebug(TQString("added price for %1, %2 date %3").
arg(e.name()).arg(newPrice.toString()). arg(e.name()).arg(newPrice.toString()).
arg(m_txDatePosted.toString(Qt::ISODate))); arg(m_txDatePosted.toString(TQt::ISODate)));
m_storage->modifySecurity(e); m_storage->modifySecurity(e);
MyMoneyPrice dealPrice (e.id(), m_txCommodity, m_txDatePosted, newPrice, i18n("Imported Transaction")); MyMoneyPrice dealPrice (e.id(), m_txCommodity, m_txDatePosted, newPrice, i18n("Imported Transaction"));
m_storage->addPrice (dealPrice); m_storage->addPrice (dealPrice);
@ -1788,7 +1788,7 @@ void MyMoneyGncReader::convertSchedule (const GncSchedule *gsc) {
} else { } else {
const GncRecurrence *gre = gsc->m_vpRecurrence.first(); const GncRecurrence *gre = gsc->m_vpRecurrence.first();
//tqDebug (TQString("Sched %1, pt %2, mu %3, sd %4").arg(gsc->name()).arg(gre->periodType()) //tqDebug (TQString("Sched %1, pt %2, mu %3, sd %4").arg(gsc->name()).arg(gre->periodType())
// .arg(gre->mult()).arg(gre->startDate().toString(Qt::ISODate))); // .arg(gre->mult()).arg(gre->startDate().toString(TQt::ISODate)));
frequency = gre->getFrequency(); frequency = gre->getFrequency();
schedEnabled = gsc->enabled(); schedEnabled = gsc->enabled();
} }

@ -305,7 +305,7 @@ protected:
friend class GncSplit; friend class GncSplit;
friend class GncSchedule; friend class GncSchedule;
friend class GncRecurrence; friend class GncRecurrence;
const TQDate date() const { return (TQDate::fromString(m_v.at(TSDATE)->section(' ', 0, 0), Qt::ISODate));}; const TQDate date() const { return (TQDate::fromString(m_v.at(TSDATE)->section(' ', 0, 0), TQt::ISODate));};
private: private:
// data elements // data elements
enum DateDataEls {TSDATE, GDATE, END_Date_DELS}; enum DateDataEls {TSDATE, GDATE, END_Date_DELS};

@ -1017,7 +1017,7 @@ void MyMoneyQifReader::processTransactionEntry(void)
h = MyMoneyTransaction::hash(m_qifEntry.join(";")); h = MyMoneyTransaction::hash(m_qifEntry.join(";"));
TQString hashBase; TQString hashBase;
hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).latin1(), h); hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(TQt::ISODate).latin1(), h);
int idx = 1; int idx = 1;
TQString hash; TQString hash;
for(;;) { for(;;) {
@ -1327,7 +1327,7 @@ void MyMoneyQifReader::processInvestmentTransactionEntry(void)
h = MyMoneyTransaction::hash(m_qifEntry.join(";")); h = MyMoneyTransaction::hash(m_qifEntry.join(";"));
TQString hashBase; TQString hashBase;
hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(Qt::ISODate).latin1(), h); hashBase.sprintf("%s-%07lx", m_qifProfile.date(extractLine('D')).toString(TQt::ISODate).latin1(), h);
int idx = 1; int idx = 1;
TQString hash; TQString hash;
for(;;) { for(;;) {

@ -277,11 +277,11 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
// see if we need to update some values stored with the account // see if we need to update some values stored with the account
if(m_account.value("lastStatementBalance") != s.m_closingBalance.toString() if(m_account.value("lastStatementBalance") != s.m_closingBalance.toString()
|| m_account.value("lastImportedTransactionDate") != s.m_dateEnd.toString(Qt::ISODate)) { || m_account.value("lastImportedTransactionDate") != s.m_dateEnd.toString(TQt::ISODate)) {
if(s.m_closingBalance != MyMoneyMoney::autoCalc) { if(s.m_closingBalance != MyMoneyMoney::autoCalc) {
m_account.setValue("lastStatementBalance", s.m_closingBalance.toString()); m_account.setValue("lastStatementBalance", s.m_closingBalance.toString());
if ( s.m_dateEnd.isValid() ) { if ( s.m_dateEnd.isValid() ) {
m_account.setValue("lastImportedTransactionDate", s.m_dateEnd.toString(Qt::ISODate)); m_account.setValue("lastImportedTransactionDate", s.m_dateEnd.toString(TQt::ISODate));
} }
} }
@ -393,7 +393,7 @@ bool MyMoneyStatementReader::import(const MyMoneyStatement& s, TQStringList& mes
if(s.m_closingBalance.isAutoCalc()) { if(s.m_closingBalance.isAutoCalc()) {
messages += i18n(" Statement balance is not contained in statement."); messages += i18n(" Statement balance is not contained in statement.");
} else { } else {
messages += i18n(" Statement balance on %1 is reported to be %2").arg(s.m_dateEnd.toString(Qt::ISODate)).arg(s.m_closingBalance.formatMoney("",2)); messages += i18n(" Statement balance on %1 is reported to be %2").arg(s.m_dateEnd.toString(TQt::ISODate)).arg(s.m_closingBalance.formatMoney("",2));
} }
messages += i18n(" Transactions"); messages += i18n(" Transactions");
messages += i18n(" %1 processed").arg(d->transactionsCount); messages += i18n(" %1 processed").arg(d->transactionsCount);
@ -504,7 +504,7 @@ void MyMoneyStatementReader::processTransactionEntry(const MyMoneyStatement::Tra
#if 0 #if 0
TQString dbgMsg; TQString dbgMsg;
dbgMsg = TQString("Process %1, '%3', %2").arg(t_in.m_datePosted.toString(Qt::ISODate)).arg(t_in.m_amount.formatMoney("", 2)).arg(t_in.m_strBankID); dbgMsg = TQString("Process %1, '%3', %2").arg(t_in.m_datePosted.toString(TQt::ISODate)).arg(t_in.m_amount.formatMoney("", 2)).arg(t_in.m_strBankID);
tqDebug(dbgMsg); tqDebug(dbgMsg);
#endif #endif

@ -98,7 +98,7 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, TQWidget* pare
// draw future values in a different line style // draw future values in a different line style
KDChartPropertySet propSetFutureValue("future value", KMM_KDCHART_PROPSET_NORMAL_DATA); KDChartPropertySet propSetFutureValue("future value", KMM_KDCHART_PROPSET_NORMAL_DATA);
propSetFutureValue.setLineStyle(KDChartPropertySet::OwnID, Qt::DotLine); propSetFutureValue.setLineStyle(KDChartPropertySet::OwnID, TQt::DotLine);
int m_idPropFutureValue = chartWidget->params()->registerProperties(propSetFutureValue); int m_idPropFutureValue = chartWidget->params()->registerProperties(propSetFutureValue);
KDChartPropertySet propSetLastValue("last value", m_idPropFutureValue); KDChartPropertySet propSetLastValue("last value", m_idPropFutureValue);
@ -109,13 +109,13 @@ KBalanceChartDlg::KBalanceChartDlg(const MyMoneyAccount& account, TQWidget* pare
int m_idPropLastValue = chartWidget->params()->registerProperties(propSetLastValue); int m_idPropLastValue = chartWidget->params()->registerProperties(propSetLastValue);
KDChartPropertySet propSetMinBalance("min balance", m_idPropFutureValue); KDChartPropertySet propSetMinBalance("min balance", m_idPropFutureValue);
propSetMinBalance.setLineStyle(KDChartPropertySet::OwnID, Qt::NoPen); propSetMinBalance.setLineStyle(KDChartPropertySet::OwnID, TQt::NoPen);
propSetMinBalance.setExtraLinesAlign(KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignRight); propSetMinBalance.setExtraLinesAlign(KDChartPropertySet::OwnID, TQt::AlignLeft | TQt::AlignRight);
int m_idPropMinBalance = chartWidget->params()->registerProperties(propSetMinBalance); int m_idPropMinBalance = chartWidget->params()->registerProperties(propSetMinBalance);
KDChartPropertySet propSetMaxCredit("max credit", m_idPropMinBalance); KDChartPropertySet propSetMaxCredit("max credit", m_idPropMinBalance);
propSetMaxCredit.setExtraLinesColor(KDChartPropertySet::OwnID, KMyMoneyGlobalSettings::listNegativeValueColor()); propSetMaxCredit.setExtraLinesColor(KDChartPropertySet::OwnID, KMyMoneyGlobalSettings::listNegativeValueColor());
propSetMaxCredit.setExtraLinesStyle(KDChartPropertySet::OwnID, Qt::DotLine); propSetMaxCredit.setExtraLinesStyle(KDChartPropertySet::OwnID, TQt::DotLine);
int m_idPropMaxCredit = chartWidget->params()->registerProperties(propSetMaxCredit); int m_idPropMaxCredit = chartWidget->params()->registerProperties(propSetMaxCredit);
KBalanceChartDlgLayout->addWidget(chartWidget, 10); KBalanceChartDlgLayout->addWidget(chartWidget, 10);

@ -121,7 +121,7 @@ KEndingBalanceDlg::KEndingBalanceDlg(const MyMoneyAccount& account, TQWidget *pa
value = account.value("statementDate"); value = account.value("statementDate");
if(!value.isEmpty()) if(!value.isEmpty())
m_statementDate->setDate(TQDate::fromString(value, Qt::ISODate)); m_statementDate->setDate(TQDate::fromString(value, TQt::ISODate));
m_lastStatementDate->setText(TQString()); m_lastStatementDate->setText(TQString());
if(account.lastReconciliationDate().isValid()) { if(account.lastReconciliationDate().isValid()) {
@ -205,18 +205,18 @@ void KEndingBalanceDlg::slotUpdateBalances(void)
const MyMoneySplit& split = (*it).second; const MyMoneySplit& split = (*it).second;
balance -= split.shares() * factor; balance -= split.shares() * factor;
if((*it).first.postDate() > m_statementDate->date()) { if((*it).first.postDate() > m_statementDate->date()) {
tracer.printf("Reducing balances by %s because postdate of %s/%s(%s) is past statement date", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(),split.id().local8Bit().data(), (*it).first.postDate().toString(Qt::ISODate).local8Bit().data()); tracer.printf("Reducing balances by %s because postdate of %s/%s(%s) is past statement date", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(),split.id().local8Bit().data(), (*it).first.postDate().toString(TQt::ISODate).local8Bit().data());
endBalance -= split.shares() * factor; endBalance -= split.shares() * factor;
startBalance -= split.shares() * factor; startBalance -= split.shares() * factor;
} else { } else {
switch(split.reconcileFlag()) { switch(split.reconcileFlag()) {
case MyMoneySplit::NotReconciled: case MyMoneySplit::NotReconciled:
tracer.printf("Reducing balances by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(), split.id().local8Bit().data(), (*it).first.postDate().toString(Qt::ISODate).local8Bit().data()); tracer.printf("Reducing balances by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(), split.id().local8Bit().data(), (*it).first.postDate().toString(TQt::ISODate).local8Bit().data());
endBalance -= split.shares() * factor; endBalance -= split.shares() * factor;
startBalance -= split.shares() * factor; startBalance -= split.shares() * factor;
break; break;
case MyMoneySplit::Cleared: case MyMoneySplit::Cleared:
tracer.printf("Reducing start balance by %s because %s/%s(%s) is cleared", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(), split.id().local8Bit().data(), (*it).first.postDate().toString(Qt::ISODate).local8Bit().data()); tracer.printf("Reducing start balance by %s because %s/%s(%s) is cleared", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), (*it).first.id().local8Bit().data(), split.id().local8Bit().data(), (*it).first.postDate().toString(TQt::ISODate).local8Bit().data());
startBalance -= split.shares() * factor; startBalance -= split.shares() * factor;
break; break;
default: default:

@ -226,7 +226,7 @@ void KEquityPriceUpdateDlg::addPricePair(const MyMoneySecurityPair& pair, bool d
i18n("%1 units in %2").arg(pair.first,pair.second)); i18n("%1 units in %2").arg(pair.first,pair.second));
if(pr.isValid()) { if(pr.isValid()) {
item->setText(PRICE_COL, pr.rate(pair.second).formatMoney(file->currency(pair.second).tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision())); item->setText(PRICE_COL, pr.rate(pair.second).formatMoney(file->currency(pair.second).tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision()));
item->setText(DATE_COL, pr.date().toString(Qt::ISODate)); item->setText(DATE_COL, pr.date().toString(TQt::ISODate));
} }
item->setText(ID_COL,id); item->setText(ID_COL,id);
item->setText(SOURCE_COL, "Yahoo Currency"); // This string value should not be localized item->setText(SOURCE_COL, "Yahoo Currency"); // This string value should not be localized
@ -260,7 +260,7 @@ void KEquityPriceUpdateDlg::addInvestment(const MyMoneySecurity& inv)
MyMoneyPrice pr = file->price(id.utf8(), inv.tradingCurrency()); MyMoneyPrice pr = file->price(id.utf8(), inv.tradingCurrency());
if(pr.isValid()) { if(pr.isValid()) {
item->setText(PRICE_COL, pr.rate(currency.id()).formatMoney(currency.tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision())); item->setText(PRICE_COL, pr.rate(currency.id()).formatMoney(currency.tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision()));
item->setText(DATE_COL, pr.date().toString(Qt::ISODate)); item->setText(DATE_COL, pr.date().toString(TQt::ISODate));
} }
item->setText(ID_COL,id); item->setText(ID_COL,id);
if (inv.value("kmm-online-quote-system") == "Finance::Quote") if (inv.value("kmm-online-quote-system") == "Finance::Quote")
@ -306,13 +306,13 @@ MyMoneyPrice KEquityPriceUpdateDlg::price(const TQString& id) const
TQStringList ids = TQStringList::split(" ",TQString(id)); TQStringList ids = TQStringList::split(" ",TQString(id));
TQString fromid = ids[0].utf8(); TQString fromid = ids[0].utf8();
TQString toid = ids[1].utf8(); TQString toid = ids[1].utf8();
price = MyMoneyPrice(fromid,toid,TQDate().fromString(item->text(DATE_COL), Qt::ISODate),rate,item->text(SOURCE_COL)); price = MyMoneyPrice(fromid,toid,TQDate().fromString(item->text(DATE_COL), TQt::ISODate),rate,item->text(SOURCE_COL));
} }
else else
// otherwise, it's a security quote // otherwise, it's a security quote
{ {
MyMoneySecurity security = MyMoneyFile::instance()->security(id); MyMoneySecurity security = MyMoneyFile::instance()->security(id);
price = MyMoneyPrice(id, security.tradingCurrency(), TQDate().fromString(item->text(DATE_COL), Qt::ISODate), rate, item->text(SOURCE_COL)); price = MyMoneyPrice(id, security.tradingCurrency(), TQDate().fromString(item->text(DATE_COL), TQt::ISODate), rate, item->text(SOURCE_COL));
} }
} }
} }
@ -347,7 +347,7 @@ void KEquityPriceUpdateDlg::storePrices(void)
TQString fromid = ids[0].utf8(); TQString fromid = ids[0].utf8();
TQString toid = ids[1].utf8(); TQString toid = ids[1].utf8();
name = TQString("%1 --> %2").arg(fromid).arg(toid); name = TQString("%1 --> %2").arg(fromid).arg(toid);
MyMoneyPrice price(fromid,toid,TQDate().fromString(item->text(DATE_COL), Qt::ISODate),rate,item->text(SOURCE_COL)); MyMoneyPrice price(fromid,toid,TQDate().fromString(item->text(DATE_COL), TQt::ISODate),rate,item->text(SOURCE_COL));
file->addPrice(price); file->addPrice(price);
} }
else else
@ -355,7 +355,7 @@ void KEquityPriceUpdateDlg::storePrices(void)
{ {
MyMoneySecurity security = MyMoneyFile::instance()->security(id); MyMoneySecurity security = MyMoneyFile::instance()->security(id);
name = security.name(); name = security.name();
MyMoneyPrice price(id, security.tradingCurrency(), TQDate().fromString(item->text(DATE_COL), Qt::ISODate), rate, item->text(SOURCE_COL)); MyMoneyPrice price(id, security.tradingCurrency(), TQDate().fromString(item->text(DATE_COL), TQt::ISODate), rate, item->text(SOURCE_COL));
// TODO (Ace) Better handling of the case where there is already a price // TODO (Ace) Better handling of the case where there is already a price
// for this date. Currently, it just overrides the old value. Really it // for this date. Currently, it just overrides the old value. Really it
@ -528,7 +528,7 @@ void KEquityPriceUpdateDlg::slotReceivedQuote(const TQString& _id, const TQStrin
} }
} }
item->setText(PRICE_COL, TDEGlobal::locale()->formatMoney(price, sec.tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision())); item->setText(PRICE_COL, TDEGlobal::locale()->formatMoney(price, sec.tradingSymbol(), KMyMoneyGlobalSettings::pricePrecision()));
item->setText(DATE_COL, date.toString(Qt::ISODate)); item->setText(DATE_COL, date.toString(TQt::ISODate));
logStatusMessage(i18n("Price for %1 updated (id %2)").arg(_symbol,_id)); logStatusMessage(i18n("Price for %1 updated (id %2)").arg(_symbol,_id));
// make sure to make OK button available // make sure to make OK button available
btnOK->setEnabled(true); btnOK->setEnabled(true);

@ -48,8 +48,8 @@ KMyMoneyFileInfoDlg::KMyMoneyFileInfoDlg(TQWidget *parent, const char *name )
// Now fill the fields with data // Now fill the fields with data
IMyMoneyStorage* storage = MyMoneyFile::instance()->storage(); IMyMoneyStorage* storage = MyMoneyFile::instance()->storage();
m_creationDate->setText(storage->creationDate().toString(Qt::ISODate)); m_creationDate->setText(storage->creationDate().toString(TQt::ISODate));
m_lastModificationDate->setText(storage->lastModificationDate().toString(Qt::ISODate)); m_lastModificationDate->setText(storage->lastModificationDate().toString(TQt::ISODate));
m_baseCurrency->setText(storage->value("kmm-baseCurrency")); m_baseCurrency->setText(storage->value("kmm-baseCurrency"));
m_payeeCount->setText(TQString("%1").arg(storage->payeeList().count())); m_payeeCount->setText(TQString("%1").arg(storage->payeeList().count()));

@ -397,7 +397,7 @@ void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, co
// make sure the row will be on the screen // make sure the row will be on the screen
ensureCellVisible(row, 0); ensureCellVisible(row, 0);
if(button == Qt::LeftButton) { // left mouse button if(button == TQt::LeftButton) { // left mouse button
if(isEditMode()) { // in edit mode? if(isEditMode()) { // in edit mode?
if(KMyMoneyGlobalSettings::focusChangeIsEnter()) if(KMyMoneyGlobalSettings::focusChangeIsEnter())
slotEndEdit(); slotEndEdit();
@ -409,7 +409,7 @@ void kMyMoneySplitTable::slotSetFocus(int realrow, int /* col */, int button, co
setCurrentCell(row, 0); setCurrentCell(row, 0);
slotUpdateData(m_transaction); slotUpdateData(m_transaction);
} }
} else if(button == Qt::RightButton) { } else if(button == TQt::RightButton) {
// context menu is only available when cursor is on // context menu is only available when cursor is on
// an existing transaction or the first line after this area // an existing transaction or the first line after this area
if(row == realrow) { if(row == realrow) {

@ -152,7 +152,7 @@ protected slots:
virtual void columnWidthChanged(int col); virtual void columnWidthChanged(int col);
/// move the focus to the selected @p row. /// move the focus to the selected @p row.
void slotSetFocus(int row, int col = 0, int button = Qt::LeftButton, const TQPoint & mousePos = TQPoint(0, 0)); void slotSetFocus(int row, int col = 0, int button = TQt::LeftButton, const TQPoint & mousePos = TQPoint(0, 0));
/** /**
* Calling this slot refills the widget with the data * Calling this slot refills the widget with the data

@ -178,7 +178,7 @@ void TransactionMatcher::match(MyMoneyTransaction tm, MyMoneySplit sm, MyMoneyTr
// We use the imported postdate and keep the previous one for unmatch // We use the imported postdate and keep the previous one for unmatch
if(tm.postDate() != ti.postDate()) { if(tm.postDate() != ti.postDate()) {
sm.setValue("kmm-orig-postdate", tm.postDate().toString(Qt::ISODate)); sm.setValue("kmm-orig-postdate", tm.postDate().toString(TQt::ISODate));
tm.setPostDate(ti.postDate()); tm.setPostDate(ti.postDate());
} }
@ -221,7 +221,7 @@ void TransactionMatcher::unmatch(const MyMoneyTransaction& _t, const MyMoneySpli
// restore the postdate if modified // restore the postdate if modified
if(!sm.value("kmm-orig-postdate").isEmpty()) { if(!sm.value("kmm-orig-postdate").isEmpty()) {
tm.setPostDate(TQDate::fromString(sm.value("kmm-orig-postdate"), Qt::ISODate)); tm.setPostDate(TQDate::fromString(sm.value("kmm-orig-postdate"), TQt::ISODate));
} }
// restore payee if modified // restore payee if modified

@ -2355,7 +2355,7 @@ void KMyMoney2App::createAccount(MyMoneyAccount& newAccount, MyMoneyAccount& par
b.setShares(b.value()); b.setShares(b.value());
a.setMemo(i18n("Loan payout")); a.setMemo(i18n("Loan payout"));
b.setMemo(i18n("Loan payout")); b.setMemo(i18n("Loan payout"));
t.setPostDate(TQDate::fromString(acc.value("kmm-loan-payment-date"), Qt::ISODate)); t.setPostDate(TQDate::fromString(acc.value("kmm-loan-payment-date"), TQt::ISODate));
newAccount.deletePair("kmm-loan-payment-acc"); newAccount.deletePair("kmm-loan-payment-acc");
newAccount.deletePair("kmm-loan-payment-date"); newAccount.deletePair("kmm-loan-payment-date");
MyMoneyFile::instance()->modifyAccount(newAccount); MyMoneyFile::instance()->modifyAccount(newAccount);
@ -3278,7 +3278,7 @@ void KMyMoney2App::slotAccountReconcilePostpone(void)
m_reconciliationAccount.setValue("lastReconciledBalance", m_endingBalanceDlg->previousBalance().toString()); m_reconciliationAccount.setValue("lastReconciledBalance", m_endingBalanceDlg->previousBalance().toString());
m_reconciliationAccount.setValue("statementBalance", m_endingBalanceDlg->endingBalance().toString()); m_reconciliationAccount.setValue("statementBalance", m_endingBalanceDlg->endingBalance().toString());
m_reconciliationAccount.setValue("statementDate", m_endingBalanceDlg->statementDate().toString(Qt::ISODate)); m_reconciliationAccount.setValue("statementDate", m_endingBalanceDlg->statementDate().toString(TQt::ISODate));
try { try {
file->modifyAccount(m_reconciliationAccount); file->modifyAccount(m_reconciliationAccount);
@ -4095,7 +4095,7 @@ void KMyMoney2App::slotCurrencySetBase(void)
void KMyMoney2App::slotBudgetNew(void) void KMyMoney2App::slotBudgetNew(void)
{ {
TQDate date = TQDate::currentDate(Qt::LocalTime); TQDate date = TQDate::currentDate(TQt::LocalTime);
date.setYMD(date.year(), 1, 1); date.setYMD(date.year(), 1, 1);
TQString newname = i18n("Budget %1").arg(TQString::number(date.year())); TQString newname = i18n("Budget %1").arg(TQString::number(date.year()));

@ -209,7 +209,7 @@
</entry> </entry>
<entry name="StartDate" type="DateTime"> <entry name="StartDate" type="DateTime">
<label>Start date</label> <label>Start date</label>
<default>TQDateTime::fromString("1900-01-01T00:00:00", Qt::ISODate)</default> <default>TQDateTime::fromString("1900-01-01T00:00:00", TQt::ISODate)</default>
</entry> </entry>
<entry name="useSystemColors" type="Bool"> <entry name="useSystemColors" type="Bool">
<label>Use system colors</label> <label>Use system colors</label>

@ -82,7 +82,7 @@ MyMoneyAccount::MyMoneyAccount(const TQDomElement& node) :
// to be ok for now. (ipwizard - 2008-08-14) // to be ok for now. (ipwizard - 2008-08-14)
TQString txt = MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()).value("lastStatementDate"); TQString txt = MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement()).value("lastStatementDate");
if(!txt.isEmpty()) { if(!txt.isEmpty()) {
setLastReconciliationDate(TQDate::fromString(txt, Qt::ISODate)); setLastReconciliationDate(TQDate::fromString(txt, TQt::ISODate));
} }
} }
@ -168,7 +168,7 @@ void MyMoneyAccount::setLastReconciliationDate(const TQDate& date)
// keep the last reconciliation date also in the KVP for backward // keep the last reconciliation date also in the KVP for backward
// compatability. After that, the setValue() statemetn should be removed // compatability. After that, the setValue() statemetn should be removed
// and the XML ctor should remove the value completely from the KVP // and the XML ctor should remove the value completely from the KVP
setValue("lastStatementDate", date.toString(Qt::ISODate)); setValue("lastStatementDate", date.toString(TQt::ISODate));
m_lastReconciliationDate = date; m_lastReconciliationDate = date;
} }
@ -360,7 +360,7 @@ const TQDate MyMoneyAccountLoan::nextInterestChange(void) const
void MyMoneyAccountLoan::setNextInterestChange(const TQDate& date) void MyMoneyAccountLoan::setNextInterestChange(const TQDate& date)
{ {
setValue("interest-nextchange", date.toString(Qt::ISODate)); setValue("interest-nextchange", date.toString(TQt::ISODate));
} }
int MyMoneyAccountLoan::interestChangeFrequency(int* unit) const int MyMoneyAccountLoan::interestChangeFrequency(int* unit) const

@ -313,7 +313,7 @@ void MyMoneyAccountTest::testWriteXML() {
" </KEYVALUEPAIRS>\n" " </KEYVALUEPAIRS>\n"
" </ACCOUNT>\n" " </ACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n"). "</ACCOUNT-CONTAINER>\n").
arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate)); arg(TQDate::currentDate().toString(TQt::ISODate)).arg(TQDate::currentDate().toString(TQt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref); CPPUNIT_ASSERT(doc.toString() == ref);
} }
@ -334,7 +334,7 @@ void MyMoneyAccountTest::testReadXML() {
" </KEYVALUEPAIRS>\n" " </KEYVALUEPAIRS>\n"
" </ACCOUNT>\n" " </ACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n"). "</ACCOUNT-CONTAINER>\n").
arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate)); arg(TQDate::currentDate().toString(TQt::ISODate)).arg(TQDate::currentDate().toString(TQt::ISODate));
TQString ref_false = TQString( TQString ref_false = TQString(
"<!DOCTYPE TEST>\n" "<!DOCTYPE TEST>\n"
@ -350,7 +350,7 @@ void MyMoneyAccountTest::testReadXML() {
" </KEYVALUEPAIRS>\n" " </KEYVALUEPAIRS>\n"
" </KACCOUNT>\n" " </KACCOUNT>\n"
"</ACCOUNT-CONTAINER>\n"). "</ACCOUNT-CONTAINER>\n").
arg(TQDate::currentDate().toString(Qt::ISODate)).arg(TQDate::currentDate().toString(Qt::ISODate)); arg(TQDate::currentDate().toString(TQt::ISODate)).arg(TQDate::currentDate().toString(TQt::ISODate));
TQDomDocument doc; TQDomDocument doc;
TQDomElement node; TQDomElement node;

@ -198,7 +198,7 @@ void MyMoneyBudget::write(TQDomElement& e, TQDomDocument *doc) const
writeBaseXML(*doc, e); writeBaseXML(*doc, e);
e.setAttribute("name", m_name); e.setAttribute("name", m_name);
e.setAttribute("start", m_start.toString(Qt::ISODate) ); e.setAttribute("start", m_start.toString(TQt::ISODate) );
e.setAttribute("version", BUDGET_VERSION); e.setAttribute("version", BUDGET_VERSION);
TQMap<TQString, AccountGroup>::const_iterator it; TQMap<TQString, AccountGroup>::const_iterator it;
@ -217,7 +217,7 @@ void MyMoneyBudget::write(TQDomElement& e, TQDomDocument *doc) const
TQDomElement domPeriod = doc->createElement("PERIOD"); TQDomElement domPeriod = doc->createElement("PERIOD");
domPeriod.setAttribute("amount", (*it_per).amount().toString()); domPeriod.setAttribute("amount", (*it_per).amount().toString());
domPeriod.setAttribute("start", (*it_per).startDate().toString(Qt::ISODate)); domPeriod.setAttribute("start", (*it_per).startDate().toString(TQt::ISODate));
domAccount.appendChild(domPeriod); domAccount.appendChild(domPeriod);
} }
} }
@ -240,7 +240,7 @@ bool MyMoneyBudget::read(const TQDomElement& e)
{ {
result = true; result = true;
m_name = e.attribute("name"); m_name = e.attribute("name");
m_start = TQDate::fromString(e.attribute("start"), Qt::ISODate); m_start = TQDate::fromString(e.attribute("start"), TQt::ISODate);
m_id = e.attribute("id"); m_id = e.attribute("id");
TQDomNode child = e.firstChild(); TQDomNode child = e.firstChild();
@ -273,7 +273,7 @@ bool MyMoneyBudget::read(const TQDomElement& e)
if("PERIOD" == per.tagName() && per.hasAttribute("amount") && per.hasAttribute("start")) if("PERIOD" == per.tagName() && per.hasAttribute("amount") && per.hasAttribute("start"))
{ {
pGroup.setAmount( MyMoneyMoney(per.attribute("amount")) ); pGroup.setAmount( MyMoneyMoney(per.attribute("amount")) );
pGroup.setStartDate( TQDate::fromString(per.attribute("start"), Qt::ISODate) ); pGroup.setStartDate( TQDate::fromString(per.attribute("start"), TQt::ISODate) );
account.addPeriod(pGroup.startDate(), pGroup); account.addPeriod(pGroup.startDate(), pGroup);
} }

@ -53,7 +53,7 @@ MyMoneyPrice::MyMoneyPrice(const TQString& from, const TQString& to, const TQDom
m_fromSecurity = from; m_fromSecurity = from;
m_toSecurity = to; m_toSecurity = to;
m_date = TQDate::fromString(node.attribute("date"), Qt::ISODate); m_date = TQDate::fromString(node.attribute("date"), TQt::ISODate);
m_rate = MyMoneyMoney(node.attribute("price")); m_rate = MyMoneyMoney(node.attribute("price"));
m_source = node.attribute("source"); m_source = node.attribute("source");

@ -551,9 +551,9 @@ void MyMoneyReport::write ( TQDomElement& e, TQDomDocument *doc, bool anonymous
{ {
TQDomElement f = doc->createElement ( "DATES" ); TQDomElement f = doc->createElement ( "DATES" );
if ( dateFrom.isValid() ) if ( dateFrom.isValid() )
f.setAttribute ( "from", dateFrom.toString ( Qt::ISODate ) ); f.setAttribute ( "from", dateFrom.toString ( TQt::ISODate ) );
if ( dateTo.isValid() ) if ( dateTo.isValid() )
f.setAttribute ( "to", dateTo.toString ( Qt::ISODate ) ); f.setAttribute ( "to", dateTo.toString ( TQt::ISODate ) );
e.appendChild ( f ); e.appendChild ( f );
} }
} }
@ -736,9 +736,9 @@ bool MyMoneyReport::read ( const TQDomElement& e )
{ {
TQDate from, to; TQDate from, to;
if ( c.hasAttribute ( "from" ) ) if ( c.hasAttribute ( "from" ) )
from = TQDate::fromString ( c.attribute ( "from" ), Qt::ISODate ); from = TQDate::fromString ( c.attribute ( "from" ), TQt::ISODate );
if ( c.hasAttribute ( "to" ) ) if ( c.hasAttribute ( "to" ) )
to = TQDate::fromString ( c.attribute ( "to" ), Qt::ISODate ); to = TQDate::fromString ( c.attribute ( "to" ), TQt::ISODate );
MyMoneyTransactionFilter::setDateFilter ( from, to ); MyMoneyTransactionFilter::setDateFilter ( from, to );
} }
if ( "PAYEE" == c.tagName() ) if ( "PAYEE" == c.tagName() )

@ -263,13 +263,13 @@ void MyMoneyScheduleTest::testOverdue()
" </TRANSACTION>\n" " </TRANSACTION>\n"
" </SCHEDULED_TX>\n" " </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n"); "</SCHEDULE-CONTAINER>\n");
TQString ref_overdue = ref.arg(startDate.toString(Qt::ISODate)) TQString ref_overdue = ref.arg(startDate.toString(TQt::ISODate))
.arg(lastPaymentDate.toString(Qt::ISODate)) .arg(lastPaymentDate.toString(TQt::ISODate))
.arg(lastPaymentDate.toString(Qt::ISODate)); .arg(lastPaymentDate.toString(TQt::ISODate));
TQString ref_intime = ref.arg(startDate.addDays(1).toString(Qt::ISODate)) TQString ref_intime = ref.arg(startDate.addDays(1).toString(TQt::ISODate))
.arg(lastPaymentDate.addDays(1).toString(Qt::ISODate)) .arg(lastPaymentDate.addDays(1).toString(TQt::ISODate))
.arg(lastPaymentDate.addDays(1).toString(Qt::ISODate)); .arg(lastPaymentDate.addDays(1).toString(TQt::ISODate));
TQDomDocument doc; TQDomDocument doc;
TQDomElement node; TQDomElement node;
@ -1075,9 +1075,9 @@ void MyMoneyScheduleTest::testWriteXML() {
" </TRANSACTION>\n" " </TRANSACTION>\n"
" </SCHEDULED_TX>\n" " </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n" "</SCHEDULE-CONTAINER>\n"
).arg(TQDate::currentDate().toString(Qt::ISODate)) ).arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)) .arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)); .arg(TQDate::currentDate().toString(TQt::ISODate));
CPPUNIT_ASSERT(doc.toString() == ref); CPPUNIT_ASSERT(doc.toString() == ref);
} }
@ -1103,9 +1103,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n" " </TRANSACTION>\n"
" </SCHEDULED_TX>\n" " </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n" "</SCHEDULE-CONTAINER>\n"
).arg(TQDate::currentDate().toString(Qt::ISODate)) ).arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)) .arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)); .arg(TQDate::currentDate().toString(TQt::ISODate));
// diff to ref_ok1 is that we now have an empty entrydate // diff to ref_ok1 is that we now have an empty entrydate
// in the transaction parameters // in the transaction parameters
@ -1127,9 +1127,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n" " </TRANSACTION>\n"
" </SCHEDULED_TX>\n" " </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n" "</SCHEDULE-CONTAINER>\n"
).arg(TQDate::currentDate().toString(Qt::ISODate)) ).arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)) .arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)); .arg(TQDate::currentDate().toString(TQt::ISODate));
TQString ref_false = TQString( TQString ref_false = TQString(
"<!DOCTYPE TEST>\n" "<!DOCTYPE TEST>\n"
@ -1149,9 +1149,9 @@ void MyMoneyScheduleTest::testReadXML() {
" </TRANSACTION>\n" " </TRANSACTION>\n"
" </SCHEDULED_TX>\n" " </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n" "</SCHEDULE-CONTAINER>\n"
).arg(TQDate::currentDate().toString(Qt::ISODate)) ).arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)) .arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)); .arg(TQDate::currentDate().toString(TQt::ISODate));
TQDomDocument doc; TQDomDocument doc;
TQDomElement node; TQDomElement node;
@ -1241,9 +1241,9 @@ void MyMoneyScheduleTest::testHasReferenceTo()
" </TRANSACTION>\n" " </TRANSACTION>\n"
" </SCHEDULED_TX>\n" " </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n" "</SCHEDULE-CONTAINER>\n"
).arg(TQDate::currentDate().toString(Qt::ISODate)) ).arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)) .arg(TQDate::currentDate().toString(TQt::ISODate))
.arg(TQDate::currentDate().toString(Qt::ISODate)); .arg(TQDate::currentDate().toString(TQt::ISODate));
TQDomDocument doc; TQDomDocument doc;
TQDomElement node; TQDomElement node;
@ -1892,9 +1892,9 @@ void MyMoneyScheduleTest::testPaidEarlyOneTime()
" </TRANSACTION>\n" " </TRANSACTION>\n"
" </SCHEDULED_TX>\n" " </SCHEDULED_TX>\n"
"</SCHEDULE-CONTAINER>\n" "</SCHEDULE-CONTAINER>\n"
).arg(paymentInFuture.toString(Qt::ISODate)) ).arg(paymentInFuture.toString(TQt::ISODate))
.arg(paymentInFuture.toString(Qt::ISODate)) .arg(paymentInFuture.toString(TQt::ISODate))
.arg(paymentInFuture.toString(Qt::ISODate)); .arg(paymentInFuture.toString(TQt::ISODate));
TQDomDocument doc; TQDomDocument doc;
TQDomElement node; TQDomElement node;

@ -51,8 +51,8 @@ void MyMoneyStatement::write(TQDomElement& _root,TQDomDocument* _doc) const
e.setAttribute("accountnumber", m_strAccountNumber); e.setAttribute("accountnumber", m_strAccountNumber);
e.setAttribute("routingnumber", m_strRoutingNumber); e.setAttribute("routingnumber", m_strRoutingNumber);
e.setAttribute("currency", m_strCurrency); e.setAttribute("currency", m_strCurrency);
e.setAttribute("begindate", m_dateBegin.toString(Qt::ISODate)); e.setAttribute("begindate", m_dateBegin.toString(TQt::ISODate));
e.setAttribute("enddate", m_dateEnd.toString(Qt::ISODate)); e.setAttribute("enddate", m_dateEnd.toString(TQt::ISODate));
e.setAttribute("closingbalance", m_closingBalance.toString()); e.setAttribute("closingbalance", m_closingBalance.toString());
e.setAttribute("type", kAccountTypeTxt[m_eType]); e.setAttribute("type", kAccountTypeTxt[m_eType]);
e.setAttribute("accountid", m_accountId); e.setAttribute("accountid", m_accountId);
@ -63,7 +63,7 @@ void MyMoneyStatement::write(TQDomElement& _root,TQDomDocument* _doc) const
while ( it_t != m_listTransactions.end() ) while ( it_t != m_listTransactions.end() )
{ {
TQDomElement p = _doc->createElement("TRANSACTION"); TQDomElement p = _doc->createElement("TRANSACTION");
p.setAttribute("dateposted", (*it_t).m_datePosted.toString(Qt::ISODate)); p.setAttribute("dateposted", (*it_t).m_datePosted.toString(TQt::ISODate));
p.setAttribute("payee", (*it_t).m_strPayee); p.setAttribute("payee", (*it_t).m_strPayee);
p.setAttribute("memo", (*it_t).m_strMemo); p.setAttribute("memo", (*it_t).m_strMemo);
p.setAttribute("number", (*it_t).m_strNumber); p.setAttribute("number", (*it_t).m_strNumber);
@ -102,7 +102,7 @@ void MyMoneyStatement::write(TQDomElement& _root,TQDomDocument* _doc) const
while ( it_p != m_listPrices.end() ) while ( it_p != m_listPrices.end() )
{ {
TQDomElement p = _doc->createElement("PRICE"); TQDomElement p = _doc->createElement("PRICE");
p.setAttribute("dateposted", (*it_p).m_date.toString(Qt::ISODate)); p.setAttribute("dateposted", (*it_p).m_date.toString(TQt::ISODate));
p.setAttribute("security", (*it_p).m_strSecurity); p.setAttribute("security", (*it_p).m_strSecurity);
p.setAttribute("amount", (*it_p).m_amount.toString()); p.setAttribute("amount", (*it_p).m_amount.toString());
@ -139,8 +139,8 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
m_strAccountNumber = _e.attribute("accountnumber"); m_strAccountNumber = _e.attribute("accountnumber");
m_strRoutingNumber = _e.attribute("routingnumber"); m_strRoutingNumber = _e.attribute("routingnumber");
m_strCurrency = _e.attribute("currency"); m_strCurrency = _e.attribute("currency");
m_dateBegin = TQDate::fromString(_e.attribute("begindate"),Qt::ISODate); m_dateBegin = TQDate::fromString(_e.attribute("begindate"),TQt::ISODate);
m_dateEnd = TQDate::fromString(_e.attribute("enddate"),Qt::ISODate); m_dateEnd = TQDate::fromString(_e.attribute("enddate"),TQt::ISODate);
m_closingBalance = MyMoneyMoney(_e.attribute("closingbalance")); m_closingBalance = MyMoneyMoney(_e.attribute("closingbalance"));
m_accountId = _e.attribute("accountid"); m_accountId = _e.attribute("accountid");
m_skipCategoryMatching = !(_e.attribute("skipCategoryMatching").isEmpty()); m_skipCategoryMatching = !(_e.attribute("skipCategoryMatching").isEmpty());
@ -158,7 +158,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
{ {
MyMoneyStatement::Transaction t; MyMoneyStatement::Transaction t;
t.m_datePosted = TQDate::fromString(c.attribute("dateposted"),Qt::ISODate); t.m_datePosted = TQDate::fromString(c.attribute("dateposted"),TQt::ISODate);
t.m_amount = MyMoneyMoney(c.attribute("amount")); t.m_amount = MyMoneyMoney(c.attribute("amount"));
t.m_strMemo = c.attribute("memo"); t.m_strMemo = c.attribute("memo");
t.m_strNumber = c.attribute("number"); t.m_strNumber = c.attribute("number");
@ -197,7 +197,7 @@ bool MyMoneyStatement::read(const TQDomElement& _e)
{ {
MyMoneyStatement::Price p; MyMoneyStatement::Price p;
p.m_date = TQDate::fromString(c.attribute("dateposted"), Qt::ISODate); p.m_date = TQDate::fromString(c.attribute("dateposted"), TQt::ISODate);
p.m_strSecurity = c.attribute("security"); p.m_strSecurity = c.attribute("security");
p.m_amount = MyMoneyMoney(c.attribute("amount")); p.m_amount = MyMoneyMoney(c.attribute("amount"));

@ -307,7 +307,7 @@ void MyMoneyTracer::off(void)
TQString dateToString(const TQDate& date) TQString dateToString(const TQDate& date)
{ {
if(!date.isNull() && date.isValid()) if(!date.isNull() && date.isValid())
return date.toString(Qt::ISODate); return date.toString(TQt::ISODate);
return TQString::null; return TQString::null;
} }
@ -315,7 +315,7 @@ TQString dateToString(const TQDate& date)
TQDate stringToDate(const TQString& str) TQDate stringToDate(const TQString& str)
{ {
if(str.length()) { if(str.length()) {
TQDate date = TQDate::fromString(str, Qt::ISODate); TQDate date = TQDate::fromString(str, TQt::ISODate);
if(!date.isNull() && date.isValid()) if(!date.isNull() && date.isValid())
return date; return date;
} }

@ -162,7 +162,7 @@ KMYMONEY_EXPORT void _CheckMemory_End();
#endif // _CHECK_MEMORY #endif // _CHECK_MEMORY
/** /**
* This function returns a date in the form specified by Qt::ISODate. * This function returns a date in the form specified by TQt::ISODate.
* If the @p date is invalid an empty string will be returned. * If the @p date is invalid an empty string will be returned.
* *
* @param date const reference to date to be converted * @param date const reference to date to be converted
@ -172,11 +172,11 @@ KMYMONEY_EXPORT TQString dateToString(const TQDate& date);
/** /**
* This function returns a date as TQDate object as specified by * This function returns a date as TQDate object as specified by
* the parameter @p str. @p str must be in Qt::ISODate format. * the parameter @p str. @p str must be in TQt::ISODate format.
* If @p str is empty or contains an invalid date, TQDate() is * If @p str is empty or contains an invalid date, TQDate() is
* returned. * returned.
* *
* @param str date in Qt::ISODate format * @param str date in TQt::ISODate format
* @return TQDate object * @return TQDate object
*/ */
KMYMONEY_EXPORT TQDate stringToDate(const TQString& str); KMYMONEY_EXPORT TQDate stringToDate(const TQString& str);

@ -931,7 +931,7 @@ const MyMoneyMoney MyMoneyDatabaseMgr::balance(const TQString& id, const TQDate&
MyMoneyAccount acc; MyMoneyAccount acc;
TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(/*TQString(id)*/); TQMap<TQString, MyMoneyAccount> accountList = m_sql->fetchAccounts(/*TQString(id)*/);
//TQMap<TQString, MyMoneyAccount>::const_iterator accpos = accountList.find(id); //TQMap<TQString, MyMoneyAccount>::const_iterator accpos = accountList.find(id);
if (date_ != TQDate()) tqDebug (TQString("request balance for %1 at %2").arg(id).arg(date_.toString(Qt::ISODate))); if (date_ != TQDate()) tqDebug (TQString("request balance for %1 at %2").arg(id).arg(date_.toString(TQt::ISODate)));
// if(!date_.isValid() && MyMoneyFile::instance()->account(id).accountType() != MyMoneyAccount::Stock) { // if(!date_.isValid() && MyMoneyFile::instance()->account(id).accountType() != MyMoneyAccount::Stock) {
// if(accountList.find(id) != accountList.end()) // if(accountList.find(id) != accountList.end())
// return accountList[id].balance(); // return accountList[id].balance();

@ -874,7 +874,7 @@ const MyMoneyMoney MyMoneySeqAccessMgr::balance(const TQString& id, const TQDate
{ {
MyMoneyMoney result(0); MyMoneyMoney result(0);
MyMoneyAccount acc; MyMoneyAccount acc;
// if (date != TQDate()) tqDebug(TQString("request balance for %1 at %2").arg(id).arg(date.toString(Qt::ISODate))); // if (date != TQDate()) tqDebug(TQString("request balance for %1 at %2").arg(id).arg(date.toString(TQt::ISODate)));
if(!date.isValid() && account(id).accountType() != MyMoneyAccount::Stock) { if(!date.isValid() && account(id).accountType() != MyMoneyAccount::Stock) {
if(m_accountList.find(id) != m_accountList.end()) if(m_accountList.find(id) != m_accountList.end())
return m_accountList[id].balance(); return m_accountList[id].balance();

@ -69,8 +69,8 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
s << "user zip = " << user.postcode() << "\n"; s << "user zip = " << user.postcode() << "\n";
s << "user telephone = " << user.telephone() << "\n"; s << "user telephone = " << user.telephone() << "\n";
s << "user e-mail = " << user.email() << "\n"; s << "user e-mail = " << user.email() << "\n";
s << "creation date = " << storage->creationDate().toString(Qt::ISODate) << "\n"; s << "creation date = " << storage->creationDate().toString(TQt::ISODate) << "\n";
s << "last modification date = " << storage->lastModificationDate().toString(Qt::ISODate) << "\n"; s << "last modification date = " << storage->lastModificationDate().toString(TQt::ISODate) << "\n";
s << "base currency = " << storage->value("kmm-baseCurrency") << "\n"; s << "base currency = " << storage->value("kmm-baseCurrency") << "\n";
s << "\n"; s << "\n";
@ -182,9 +182,9 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
} }
s << "\n"; s << "\n";
s << " Opening data = " << (*it_a).openingDate().toString(Qt::ISODate) << "\n"; s << " Opening data = " << (*it_a).openingDate().toString(TQt::ISODate) << "\n";
s << " Last modified = " << (*it_a).lastModified().toString(Qt::ISODate) << "\n"; s << " Last modified = " << (*it_a).lastModified().toString(TQt::ISODate) << "\n";
s << " Last reconciled = " << (*it_a).lastReconciliationDate().toString(Qt::ISODate) << "\n"; s << " Last reconciled = " << (*it_a).lastReconciliationDate().toString(TQt::ISODate) << "\n";
s << " Balance = " << (*it_a).balance().formatMoney("", 2) << "\n"; s << " Balance = " << (*it_a).balance().formatMoney("", 2) << "\n";
dumpKVP(" KVP: ", s, *it_a); dumpKVP(" KVP: ", s, *it_a);
@ -294,9 +294,9 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
for(it_s = list_s.begin(); it_s != list_s.end(); ++it_s) { for(it_s = list_s.begin(); it_s != list_s.end(); ++it_s) {
s << " ID = " << (*it_s).id() << "\n"; s << " ID = " << (*it_s).id() << "\n";
s << " Name = " << (*it_s).name() << "\n"; s << " Name = " << (*it_s).name() << "\n";
s << " Startdate = " << (*it_s).startDate().toString(Qt::ISODate) << "\n"; s << " Startdate = " << (*it_s).startDate().toString(TQt::ISODate) << "\n";
if((*it_s).willEnd()) if((*it_s).willEnd())
s << " Enddate = " << (*it_s).endDate().toString(Qt::ISODate) << "\n"; s << " Enddate = " << (*it_s).endDate().toString(TQt::ISODate) << "\n";
else else
s << " Enddate = not specified\n"; s << " Enddate = not specified\n";
s << " Occurence = " << (*it_s).occurenceToString() << "\n"; s << " Occurence = " << (*it_s).occurenceToString() << "\n";
@ -307,13 +307,13 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
s << " AutoEnter = " << (*it_s).autoEnter() << "\n"; s << " AutoEnter = " << (*it_s).autoEnter() << "\n";
if((*it_s).lastPayment().isValid()) if((*it_s).lastPayment().isValid())
s << " Last payment = " << (*it_s).lastPayment().toString(Qt::ISODate) << "\n"; s << " Last payment = " << (*it_s).lastPayment().toString(TQt::ISODate) << "\n";
else else
s << " Last payment = not defined" << "\n"; s << " Last payment = not defined" << "\n";
if((*it_s).isFinished()) if((*it_s).isFinished())
s << " Next payment = payment finished" << "\n"; s << " Next payment = payment finished" << "\n";
else { else {
s << " Next payment = " << (*it_s).nextDueDate().toString(Qt::ISODate) << "\n"; s << " Next payment = " << (*it_s).nextDueDate().toString(TQt::ISODate) << "\n";
if((*it_s).isOverdue()) if((*it_s).isOverdue())
s << " = overdue!" << "\n"; s << " = overdue!" << "\n";
} }
@ -325,7 +325,7 @@ void MyMoneyStorageDump::writeStream(TQDataStream& _s, IMyMoneySerialize* _stora
if(list_d.count() > 0) { if(list_d.count() > 0) {
s << " Recorded payments" << "\n"; s << " Recorded payments" << "\n";
for(it_d = list_d.begin(); it_d != list_d.end(); ++it_d) { for(it_d = list_d.begin(); it_d != list_d.end(); ++it_d) {
s << " " << (*it_d).toString(Qt::ISODate) << "\n"; s << " " << (*it_d).toString(TQt::ISODate) << "\n";
} }
} }
s << " TRANSACTION\n"; s << " TRANSACTION\n";
@ -358,8 +358,8 @@ void MyMoneyStorageDump::dumpKVP(const TQString& headline, TQTextStream& s, cons
void MyMoneyStorageDump::dumpTransaction(TQTextStream& s, IMyMoneyStorage* storage, const MyMoneyTransaction& it_t) void MyMoneyStorageDump::dumpTransaction(TQTextStream& s, IMyMoneyStorage* storage, const MyMoneyTransaction& it_t)
{ {
s << " ID = " << it_t.id() << "\n"; s << " ID = " << it_t.id() << "\n";
s << " Postdate = " << it_t.postDate().toString(Qt::ISODate) << "\n"; s << " Postdate = " << it_t.postDate().toString(TQt::ISODate) << "\n";
s << " EntryDate = " << it_t.entryDate().toString(Qt::ISODate) << "\n"; s << " EntryDate = " << it_t.entryDate().toString(TQt::ISODate) << "\n";
s << " Commodity = [" << it_t.commodity() << "]\n"; s << " Commodity = [" << it_t.commodity() << "]\n";
s << " Memo = " << it_t.memo() << "\n"; s << " Memo = " << it_t.memo() << "\n";
s << " BankID = " << it_t.bankID() << "\n"; s << " BankID = " << it_t.bankID() << "\n";
@ -398,7 +398,7 @@ void MyMoneyStorageDump::dumpTransaction(TQTextStream& s, IMyMoneyStorage* stora
s << " Nr = '" << (*it_s).number() << "'\n"; s << " Nr = '" << (*it_s).number() << "'\n";
s << " ReconcileFlag = '" << reconcileToString((*it_s).reconcileFlag()) << "'\n"; s << " ReconcileFlag = '" << reconcileToString((*it_s).reconcileFlag()) << "'\n";
if((*it_s).reconcileFlag() != MyMoneySplit::NotReconciled) { if((*it_s).reconcileFlag() != MyMoneySplit::NotReconciled) {
s << " ReconcileDate = " << (*it_s).reconcileDate().toString(Qt::ISODate) << "\n"; s << " ReconcileDate = " << (*it_s).reconcileDate().toString(TQt::ISODate) << "\n";
} }
s << " BankID = " << (*it_s).bankID() << "\n"; s << " BankID = " << (*it_s).bankID() << "\n";
dumpKVP("KVP:", s, (*it_s), 4); dumpKVP("KVP:", s, (*it_s), 4);

@ -203,7 +203,7 @@ try {
m_error = TQString m_error = TQString
(i18n("Database apparently in use\nOpened by %1 on %2 at %3.\nOpen anyway?")) (i18n("Database apparently in use\nOpened by %1 on %2 at %3.\nOpen anyway?"))
.arg(m_logonUser) .arg(m_logonUser)
.arg(m_logonAt.date().toString(Qt::ISODate)) .arg(m_logonAt.date().toString(TQt::ISODate))
.arg(m_logonAt.time().toString("hh.mm.ss")); .arg(m_logonAt.time().toString("hh.mm.ss"));
tqDebug(m_error); tqDebug(m_error);
close(false); close(false);
@ -441,7 +441,7 @@ int MyMoneyStorageSql::upgradeToV1() {
TQMap<TQString, TQDateTime>::ConstIterator it; TQMap<TQString, TQDateTime>::ConstIterator it;
for (it = tids.begin(); it != tids.end(); ++it) { for (it = tids.begin(); it != tids.end(); ++it) {
q.prepare ("UPDATE kmmSplits SET postDate=:postDate WHERE transactionId = :id;"); q.prepare ("UPDATE kmmSplits SET postDate=:postDate WHERE transactionId = :id;");
q.bindValue(":postDate", it.data().toString(Qt::ISODate)); q.bindValue(":postDate", it.data().toString(TQt::ISODate));
q.bindValue(":id", it.key()); q.bindValue(":id", it.key());
if (!q.exec()) { if (!q.exec()) {
buildError (q, __func__, "priming kmmSplits.postDate"); buildError (q, __func__, "priming kmmSplits.postDate");
@ -1305,13 +1305,13 @@ void MyMoneyStorageSql::writeAccount(const MyMoneyAccount& acc, MyMoneySqlQuery&
if (acc.lastReconciliationDate() == TQDate()) if (acc.lastReconciliationDate() == TQDate())
q.bindValue(":lastReconciled", acc.lastReconciliationDate()); q.bindValue(":lastReconciled", acc.lastReconciliationDate());
else else
q.bindValue(":lastReconciled", TQString(acc.lastReconciliationDate().toString(Qt::ISODate))); q.bindValue(":lastReconciled", TQString(acc.lastReconciliationDate().toString(TQt::ISODate)));
q.bindValue(":lastModified", acc.lastModified()); q.bindValue(":lastModified", acc.lastModified());
if (acc.openingDate() == TQDate()) if (acc.openingDate() == TQDate())
q.bindValue(":openingDate", acc.openingDate()); q.bindValue(":openingDate", acc.openingDate());
else else
q.bindValue(":openingDate", TQString(acc.openingDate().toString(Qt::ISODate))); q.bindValue(":openingDate", TQString(acc.openingDate().toString(TQt::ISODate)));
q.bindValue(":accountNumber", acc.number()); q.bindValue(":accountNumber", acc.number());
q.bindValue(":accountType", acc.accountType()); q.bindValue(":accountType", acc.accountType());
@ -1483,9 +1483,9 @@ void MyMoneyStorageSql::writeTransaction(const TQString& txId, const MyMoneyTran
DBG("*** Entering MyMoneyStorageSql::writeTransaction"); DBG("*** Entering MyMoneyStorageSql::writeTransaction");
q.bindValue(":id", txId); q.bindValue(":id", txId);
q.bindValue(":txType", type); q.bindValue(":txType", type);
q.bindValue(":postDate", TQString(tx.postDate().toString(Qt::ISODate))); q.bindValue(":postDate", TQString(tx.postDate().toString(TQt::ISODate)));
q.bindValue(":memo", tx.memo()); q.bindValue(":memo", tx.memo());
q.bindValue(":entryDate", TQString(tx.entryDate().toString(Qt::ISODate))); q.bindValue(":entryDate", TQString(tx.entryDate().toString(TQt::ISODate)));
q.bindValue(":currencyId", tx.commodity()); q.bindValue(":currencyId", tx.commodity());
q.bindValue(":bankId", tx.bankID()); q.bindValue(":bankId", tx.bankID());
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Transaction"))); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Transaction")));
@ -1547,7 +1547,7 @@ void MyMoneyStorageSql::writeSplit(const TQString& txId, const MyMoneySplit& spl
if (split.reconcileDate() == TQDate()) if (split.reconcileDate() == TQDate())
q.bindValue(":reconcileDate", split.reconcileDate()); q.bindValue(":reconcileDate", split.reconcileDate());
else else
q.bindValue(":reconcileDate", TQString(split.reconcileDate().toString(Qt::ISODate))); q.bindValue(":reconcileDate", TQString(split.reconcileDate().toString(TQt::ISODate)));
q.bindValue(":action", split.action()); q.bindValue(":action", split.action());
q.bindValue(":reconcileFlag", split.reconcileFlag()); q.bindValue(":reconcileFlag", split.reconcileFlag());
q.bindValue(":value", split.value().toString()); q.bindValue(":value", split.value().toString());
@ -1574,7 +1574,7 @@ void MyMoneyStorageSql::writeSplit(const TQString& txId, const MyMoneySplit& spl
q.bindValue(":memo", split.memo()); q.bindValue(":memo", split.memo());
q.bindValue(":accountId", split.accountId()); q.bindValue(":accountId", split.accountId());
q.bindValue(":checkNumber", split.number()); q.bindValue(":checkNumber", split.number());
q.bindValue(":postDate", m_txPostDate.toString(Qt::ISODate)); // FIXME: when Tom puts date into split object q.bindValue(":postDate", m_txPostDate.toString(TQt::ISODate)); // FIXME: when Tom puts date into split object
q.bindValue(":bankId", split.bankID()); q.bindValue(":bankId", split.bankID());
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Split"))); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Split")));
deleteKeyValuePairs("SPLIT", txId + TQString::number(splitId)); deleteKeyValuePairs("SPLIT", txId + TQString::number(splitId));
@ -1675,8 +1675,8 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer
q.bindValue(":occurenceString", sch.occurenceToString()); q.bindValue(":occurenceString", sch.occurenceToString());
q.bindValue(":paymentType", sch.paymentType()); q.bindValue(":paymentType", sch.paymentType());
q.bindValue(":paymentTypeString", MyMoneySchedule::paymentMethodToString(sch.paymentType())); q.bindValue(":paymentTypeString", MyMoneySchedule::paymentMethodToString(sch.paymentType()));
q.bindValue(":startDate", TQString(sch.startDate().toString(Qt::ISODate))); q.bindValue(":startDate", TQString(sch.startDate().toString(TQt::ISODate)));
q.bindValue(":endDate", TQString(sch.endDate().toString(Qt::ISODate))); q.bindValue(":endDate", TQString(sch.endDate().toString(TQt::ISODate)));
if (sch.isFixed()) { if (sch.isFixed()) {
q.bindValue(":fixed", "Y"); q.bindValue(":fixed", "Y");
} else { } else {
@ -1688,7 +1688,7 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer
q.bindValue(":autoEnter", "N"); q.bindValue(":autoEnter", "N");
} }
q.bindValue(":lastPayment", sch.lastPayment()); q.bindValue(":lastPayment", sch.lastPayment());
q.bindValue(":nextPaymentDue", TQString(sch.nextDueDate().toString(Qt::ISODate))); q.bindValue(":nextPaymentDue", TQString(sch.nextDueDate().toString(TQt::ISODate)));
q.bindValue(":weekendOption", sch.weekendOption()); q.bindValue(":weekendOption", sch.weekendOption());
q.bindValue(":weekendOptionString", MyMoneySchedule::weekendOptionToString(sch.weekendOption())); q.bindValue(":weekendOptionString", MyMoneySchedule::weekendOptionToString(sch.weekendOption()));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedules"))); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedules")));
@ -1704,7 +1704,7 @@ void MyMoneyStorageSql::writeSchedule(const MyMoneySchedule& sch, MyMoneySqlQuer
TQValueList<TQDate>::ConstIterator it; TQValueList<TQDate>::ConstIterator it;
for (it=payments.begin(); it!=payments.end(); ++it) { for (it=payments.begin(); it!=payments.end(); ++it) {
q.bindValue(":schedId", sch.id()); q.bindValue(":schedId", sch.id());
q.bindValue(":payDate", TQString((*it).toString(Qt::ISODate))); q.bindValue(":payDate", TQString((*it).toString(TQt::ISODate)));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedule Payment History"))); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing Schedule Payment History")));
} }
@ -1856,7 +1856,7 @@ void MyMoneyStorageSql::addPrice(const MyMoneyPrice& p) {
q.prepare (s); q.prepare (s);
q.bindValue(":fromId", p.from()); q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to()); q.bindValue(":toId", p.to());
q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("finding Price"))); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("finding Price")));
if (q.next()) { if (q.next()) {
q.prepare(m_db.m_tables["kmmPrices"].updateString()); q.prepare(m_db.m_tables["kmmPrices"].updateString());
@ -1867,7 +1867,7 @@ void MyMoneyStorageSql::addPrice(const MyMoneyPrice& p) {
} }
q.bindValue(":fromId", p.from()); q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to()); q.bindValue(":toId", p.to());
q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
q.bindValue(":price", p.rate(TQString()).toString()); q.bindValue(":price", p.rate(TQString()).toString());
q.bindValue(":priceFormatted", q.bindValue(":priceFormatted",
p.rate(TQString()).formatMoney("", KMyMoneySettings::pricePrecision())); p.rate(TQString()).formatMoney("", KMyMoneySettings::pricePrecision()));
@ -1885,7 +1885,7 @@ void MyMoneyStorageSql::removePrice(const MyMoneyPrice& p) {
q.prepare (m_db.m_tables["kmmPrices"].deleteString()); q.prepare (m_db.m_tables["kmmPrices"].deleteString());
q.bindValue(":fromId", p.from()); q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to()); q.bindValue(":toId", p.to());
q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Price"))); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("deleting Price")));
--m_prices; --m_prices;
writeFileInfo(); writeFileInfo();
@ -1898,7 +1898,7 @@ void MyMoneyStorageSql::writePrice(const MyMoneyPrice& p) {
q.prepare (m_db.m_tables["kmmPrices"].insertString()); q.prepare (m_db.m_tables["kmmPrices"].insertString());
q.bindValue(":fromId", p.from()); q.bindValue(":fromId", p.from());
q.bindValue(":toId", p.to()); q.bindValue(":toId", p.to());
q.bindValue(":priceDate", TQString(p.date().toString(Qt::ISODate))); q.bindValue(":priceDate", TQString(p.date().toString(TQt::ISODate)));
q.bindValue(":price", p.rate(TQString()).toString()); q.bindValue(":price", p.rate(TQString()).toString());
q.bindValue(":priceFormatted", p.rate(TQString()).formatMoney("", 2)); q.bindValue(":priceFormatted", p.rate(TQString()).formatMoney("", 2));
q.bindValue(":priceSource", p.source()); q.bindValue(":priceSource", p.source());
@ -2175,9 +2175,9 @@ void MyMoneyStorageSql::writeFileInfo() {
q.prepare(qs); q.prepare(qs);
q.bindValue(":version", m_dbVersion); q.bindValue(":version", m_dbVersion);
q.bindValue(":fixLevel", m_storage->fileFixVersion()); q.bindValue(":fixLevel", m_storage->fileFixVersion());
q.bindValue(":created", TQString(m_storage->creationDate().toString(Qt::ISODate))); q.bindValue(":created", TQString(m_storage->creationDate().toString(TQt::ISODate)));
//q.bindValue(":lastModified", m_storage->lastModificationDate().toString(Qt::ISODate)); //q.bindValue(":lastModified", m_storage->lastModificationDate().toString(TQt::ISODate));
q.bindValue(":lastModified", TQString(TQDate::currentDate().toString(Qt::ISODate))); q.bindValue(":lastModified", TQString(TQDate::currentDate().toString(TQt::ISODate)));
q.bindValue(":baseCurrency", m_storage->pairs()["kmm-baseCurrency"]); q.bindValue(":baseCurrency", m_storage->pairs()["kmm-baseCurrency"]);
q.bindValue(":institutions", (unsigned long long) m_institutions); q.bindValue(":institutions", (unsigned long long) m_institutions);
q.bindValue(":accounts", (unsigned long long) m_accounts); q.bindValue(":accounts", (unsigned long long) m_accounts);
@ -2218,7 +2218,7 @@ void MyMoneyStorageSql::writeFileInfo() {
q.bindValue(":encryptData", m_encryptData); q.bindValue(":encryptData", m_encryptData);
q.bindValue(":updateInProgress", "N"); q.bindValue(":updateInProgress", "N");
q.bindValue(":logonUser", m_logonUser); q.bindValue(":logonUser", m_logonUser);
q.bindValue(":logonAt", m_logonAt.toString(Qt::ISODate)); q.bindValue(":logonAt", m_logonAt.toString(TQt::ISODate));
if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing FileInfo"))); if (!q.exec()) throw new MYMONEYEXCEPTION(buildError (q, __func__, TQString("writing FileInfo")));
} }
@ -2633,7 +2633,7 @@ const TQMap<TQString, MyMoneyMoney> MyMoneyStorageSql::fetchBalance(const TQStri
// the <= operator misbehave when the date matches. To avoid this, add a day to the // the <= operator misbehave when the date matches. To avoid this, add a day to the
// requested date and use the < operator. // requested date and use the < operator.
if (date.isValid() && !date.isNull()) if (date.isValid() && !date.isNull())
queryString += TQString(" AND postDate < '%1'").arg(date.addDays(1).toString(Qt::ISODate)); queryString += TQString(" AND postDate < '%1'").arg(date.addDays(1).toString(TQt::ISODate));
DBG (queryString); DBG (queryString);
q.prepare(queryString); q.prepare(queryString);
@ -2951,11 +2951,11 @@ const TQMap<TQString, MyMoneyTransaction> MyMoneyStorageSql::fetchTransactions (
TQString dateClause; TQString dateClause;
TQString connector = ""; TQString connector = "";
if (end != TQDate()) { if (end != TQDate()) {
dateClause = TQString("(postDate < '%1')").arg(end.addDays(1).toString(Qt::ISODate)); dateClause = TQString("(postDate < '%1')").arg(end.addDays(1).toString(TQt::ISODate));
connector = " and "; connector = " and ";
} }
if (start != TQDate()) { if (start != TQDate()) {
dateClause += TQString("%1 (postDate >= '%2')").arg(connector).arg(start.toString(Qt::ISODate)); dateClause += TQString("%1 (postDate >= '%2')").arg(connector).arg(start.toString(TQt::ISODate));
} }
// now get a list of transaction ids // now get a list of transaction ids
// if we have only a date filter, we need to build the list from the tx table // if we have only a date filter, we need to build the list from the tx table
@ -3259,10 +3259,10 @@ const MyMoneyPrice MyMoneyStorageSql::fetchSinglePrice (const TQString& fromIdL
q.bindValue(":fromId", fromIdList); q.bindValue(":fromId", fromIdList);
q.bindValue(":toId", toIdList); q.bindValue(":toId", toIdList);
q.bindValue(":priceDate", TQString(date.addDays(1).toString(Qt::ISODate))); q.bindValue(":priceDate", TQString(date.addDays(1).toString(TQt::ISODate)));
if (exactDate) if (exactDate)
q.bindValue(":exactDate", TQString(date.toString(Qt::ISODate))); q.bindValue(":exactDate", TQString(date.toString(TQt::ISODate)));
if (! q.exec()) {} if (! q.exec()) {}
@ -4141,9 +4141,9 @@ const TQString MyMoneyDbDef::generateSQL (const TQString& driver) const {
replace = TQString::number replace = TQString::number
(MyMoneyFile::instance()->storage()->currentFixVersion()); (MyMoneyFile::instance()->storage()->currentFixVersion());
if ((*fit)->name() == "created") if ((*fit)->name() == "created")
replace = TQDate::currentDate().toString(Qt::ISODate); replace = TQDate::currentDate().toString(TQt::ISODate);
if ((*fit)->name() == "lastModified") if ((*fit)->name() == "lastModified")
replace = TQDate::currentDate().toString(Qt::ISODate); replace = TQDate::currentDate().toString(TQt::ISODate);
if ((*fit)->name() == "updateInProgress") if ((*fit)->name() == "updateInProgress")
replace = enclose("N"); replace = enclose("N");
qs.replace(toReplace, replace); qs.replace(toReplace, replace);

@ -661,11 +661,11 @@ private:
int splitState(const MyMoneyTransactionFilter::stateOptionE& state) const; int splitState(const MyMoneyTransactionFilter::stateOptionE& state) const;
inline const TQDate getDate (const TQString& date) const { inline const TQDate getDate (const TQString& date) const {
return (date.isNull() ? TQDate() : TQDate::fromString(date, Qt::ISODate)); return (date.isNull() ? TQDate() : TQDate::fromString(date, TQt::ISODate));
} }
inline const TQDateTime getDateTime (const TQString& date) const { inline const TQDateTime getDateTime (const TQString& date) const {
return (date.isNull() ? TQDateTime() : TQDateTime::fromString(date, Qt::ISODate)); return (date.isNull() ? TQDateTime() : TQDateTime::fromString(date, TQt::ISODate));
} }
// open routines // open routines

@ -841,7 +841,7 @@ void MyMoneyStorageXML::writePricePair(TQDomElement& price, const MyMoneyPriceEn
void MyMoneyStorageXML::writePrice(TQDomElement& price, const MyMoneyPrice& p) void MyMoneyStorageXML::writePrice(TQDomElement& price, const MyMoneyPrice& p)
{ {
price.setAttribute("date", p.date().toString(Qt::ISODate)); price.setAttribute("date", p.date().toString(TQt::ISODate));
price.setAttribute("price", p.rate(TQString()).toString()); price.setAttribute("price", p.rate(TQString()).toString());
price.setAttribute("source", p.source()); price.setAttribute("source", p.source());
} }

@ -149,7 +149,7 @@ TQDate MyMoneyOfxConnector::statementStartDate(void) const {
} }
else if ((m_fiSettings.value("kmmofx-lastUpdate").toInt() != 0) && !m_account.value("lastImportedTransactionDate").isEmpty()) else if ((m_fiSettings.value("kmmofx-lastUpdate").toInt() != 0) && !m_account.value("lastImportedTransactionDate").isEmpty())
{ {
return TQDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate); return TQDate::fromString(m_account.value("lastImportedTransactionDate"), TQt::ISODate);
} }
else if ((m_fiSettings.value("kmmofx-pickDate").toInt() != 0) && !m_fiSettings.value("kmmofx-specificDate").isEmpty()) else if ((m_fiSettings.value("kmmofx-pickDate").toInt() != 0) && !m_fiSettings.value("kmmofx-specificDate").isEmpty())
{ {
@ -356,8 +356,8 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::message(const TQString& _msgType,
MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentRequest(void) const MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentRequest(void) const
{ {
TQString dtnow_string = TQDateTime::currentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtnow_string = TQDateTime::currentDateTime().toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtstart_string = _dtstart.toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
return message("INVSTMT","INVSTMT",Tag("INVSTMTRQ") return message("INVSTMT","INVSTMT",Tag("INVSTMTRQ")
.subtag(Tag("INVACCTFROM").element("BROKERID", fiorg()).element("ACCTID", accountnum())) .subtag(Tag("INVACCTFROM").element("BROKERID", fiorg()).element("ACCTID", accountnum()))
@ -369,7 +369,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentRequest(void) const
MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementRequest(const TQDate& _dtstart) const MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementRequest(const TQDate& _dtstart) const
{ {
TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtstart_string = _dtstart.toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
return message("BANK","STMT",Tag("STMTRQ") return message("BANK","STMT",Tag("STMTRQ")
.subtag(Tag("BANKACCTFROM").element("BANKID", iban()).element("ACCTID", accountnum()).element("ACCTTYPE", "CHECKING")) .subtag(Tag("BANKACCTFROM").element("BANKID", iban()).element("ACCTID", accountnum()).element("ACCTTYPE", "CHECKING"))
@ -378,7 +378,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementRequest(const TQDate&
MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const TQDate& _dtstart) const MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const TQDate& _dtstart) const
{ {
TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtstart_string = _dtstart.toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
return message("CREDITCARD","CCSTMT",Tag("CCSTMTRQ") return message("CREDITCARD","CCSTMT",Tag("CCSTMTRQ")
.subtag(Tag("CCACCTFROM").element("ACCTID",accountnum())) .subtag(Tag("CCACCTFROM").element("ACCTID",accountnum()))
@ -387,7 +387,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardRequest(const TQDate& _d
MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOn(void) const MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOn(void) const
{ {
TQString dtnow_string = TQDateTime::currentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtnow_string = TQDateTime::currentDateTime().toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
Tag fi("FI"); Tag fi("FI");
fi.element("ORG",fiorg()); fi.element("ORG",fiorg());
@ -456,7 +456,7 @@ const TQByteArray MyMoneyOfxConnector::statementResponse(const TQDate& _dtstart)
MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOnResponse(void) const MyMoneyOfxConnector::Tag MyMoneyOfxConnector::signOnResponse(void) const
{ {
TQString dtnow_string = TQDateTime::currentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtnow_string = TQDateTime::currentDateTime().toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
Tag sonrs("SONRS"); Tag sonrs("SONRS");
sonrs sonrs
@ -494,8 +494,8 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::bankStatementResponse(const TQDate
{ {
MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyFile* file = MyMoneyFile::instance();
TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtstart_string = _dtstart.toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
TQString dtnow_string = TQDateTime::currentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtnow_string = TQDateTime::currentDateTime().toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
TQString transactionlist; TQString transactionlist;
@ -521,8 +521,8 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::creditCardStatementResponse(const
{ {
MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyFile* file = MyMoneyFile::instance();
TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtstart_string = _dtstart.toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
TQString dtnow_string = TQDateTime::currentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtnow_string = TQDateTime::currentDateTime().toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
TQString transactionlist; TQString transactionlist;
@ -548,8 +548,8 @@ TQString MyMoneyOfxConnector::investmentStatementResponse(const TQDate& _dtstart
{ {
MyMoneyFile* file = MyMoneyFile::instance(); MyMoneyFile* file = MyMoneyFile::instance();
TQString dtstart_string = _dtstart.toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtstart_string = _dtstart.toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
TQString dtnow_string = TQDateTime::currentDateTime().toString(Qt::ISODate).remove(TQRegExp("[^0-9]")); TQString dtnow_string = TQDateTime::currentDateTime().toString(TQt::ISODate).remove(TQRegExp("[^0-9]"));
TQString transactionlist; TQString transactionlist;
@ -612,7 +612,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::transaction(const MyMoneyTransacti
// This is a temporary hack. I don't use the trntype field in importing at all, // This is a temporary hack. I don't use the trntype field in importing at all,
// but libofx requires it to be there in order to import the file. // but libofx requires it to be there in order to import the file.
.element("TRNTYPE","DEBIT") .element("TRNTYPE","DEBIT")
.element("DTPOSTED",_t.postDate().toString(Qt::ISODate).remove(TQRegExp("[^0-9]"))) .element("DTPOSTED",_t.postDate().toString(TQt::ISODate).remove(TQRegExp("[^0-9]")))
.element("TRNAMT",s.value().formatMoney(TQString(),2)); .element("TRNAMT",s.value().formatMoney(TQString(),2));
if ( ! _t.bankID().isEmpty() ) if ( ! _t.bankID().isEmpty() )
@ -642,7 +642,7 @@ MyMoneyOfxConnector::Tag MyMoneyOfxConnector::investmentTransaction(const MyMone
TQCString stockid = file->account(s.accountId()).currencyId(); TQCString stockid = file->account(s.accountId()).currencyId();
Tag invtran("INVTRAN"); Tag invtran("INVTRAN");
invtran.element("FITID",_t.id()).element("DTTRADE",_t.postDate().toString(Qt::ISODate).remove(TQRegExp("[^0-9]"))); invtran.element("FITID",_t.id()).element("DTTRADE",_t.postDate().toString(TQt::ISODate).remove(TQRegExp("[^0-9]")));
if ( !_t.memo().isEmpty() ) if ( !_t.memo().isEmpty() )
invtran.element("MEMO",_t.memo()); invtran.element("MEMO",_t.memo());

@ -184,13 +184,13 @@ int OfxImporterPlugin::ofxTransactionCallback(struct OfxTransactionData data, vo
if(data.date_posted_valid==true) if(data.date_posted_valid==true)
{ {
TQDateTime dt; TQDateTime dt;
dt.setTime_t(data.date_posted, Qt::UTC); dt.setTime_t(data.date_posted, TQt::UTC);
t.m_datePosted = dt.date(); t.m_datePosted = dt.date();
} }
else if(data.date_initiated_valid==true) else if(data.date_initiated_valid==true)
{ {
TQDateTime dt; TQDateTime dt;
dt.setTime_t(data.date_initiated, Qt::UTC); dt.setTime_t(data.date_initiated, TQt::UTC);
t.m_datePosted = dt.date(); t.m_datePosted = dt.date();
} }
@ -414,14 +414,14 @@ int OfxImporterPlugin::ofxStatementCallback(struct OfxStatementData data, void*
if(data.date_start_valid==true) if(data.date_start_valid==true)
{ {
TQDateTime dt; TQDateTime dt;
dt.setTime_t(data.date_start, Qt::UTC); dt.setTime_t(data.date_start, TQt::UTC);
s.m_dateBegin = dt.date(); s.m_dateBegin = dt.date();
} }
if(data.date_end_valid==true) if(data.date_end_valid==true)
{ {
TQDateTime dt; TQDateTime dt;
dt.setTime_t(data.date_end, Qt::UTC); dt.setTime_t(data.date_end, TQt::UTC);
s.m_dateEnd = dt.date(); s.m_dateEnd = dt.date();
} }

@ -519,7 +519,7 @@ namespace reports {
// if we have a locale() then use its date formatter // if we have a locale() then use its date formatter
if ( TDEGlobal::locale() && ! data.isEmpty() ) { if ( TDEGlobal::locale() && ! data.isEmpty() ) {
TQDate qd = TQDate::fromString ( data, Qt::ISODate ); TQDate qd = TQDate::fromString ( data, TQt::ISODate );
data = TDEGlobal::locale()->formatDate ( qd, true ); data = TDEGlobal::locale()->formatDate ( qd, true );
} }
result += TQString ( "<td class=\"left\">%1</td>" ).arg ( data ); result += TQString ( "<td class=\"left\">%1</td>" ).arg ( data );

@ -170,7 +170,7 @@ void ObjectInfoTable::constructScheduleTable ( void )
//schedule data //schedule data
scheduleRow["id"] = schedule.id(); scheduleRow["id"] = schedule.id();
scheduleRow["name"] = schedule.name(); scheduleRow["name"] = schedule.name();
scheduleRow["nextduedate"] = schedule.nextDueDate().toString ( Qt::ISODate ); scheduleRow["nextduedate"] = schedule.nextDueDate().toString ( TQt::ISODate );
scheduleRow["type"] = KMyMoneyUtils::scheduleTypeToString ( schedule.type() ); scheduleRow["type"] = KMyMoneyUtils::scheduleTypeToString ( schedule.type() );
scheduleRow["occurence"] = i18n(schedule.occurenceToString().utf8()); scheduleRow["occurence"] = i18n(schedule.occurenceToString().utf8());
scheduleRow["paymenttype"] = KMyMoneyUtils::paymentMethodToString ( schedule.paymentType() ); scheduleRow["paymenttype"] = KMyMoneyUtils::paymentMethodToString ( schedule.paymentType() );
@ -202,7 +202,7 @@ void ObjectInfoTable::constructScheduleTable ( void )
splitRow["id"] = schedule.id(); splitRow["id"] = schedule.id();
splitRow["name"] = schedule.name(); splitRow["name"] = schedule.name();
splitRow["type"] = KMyMoneyUtils::scheduleTypeToString ( schedule.type() ); splitRow["type"] = KMyMoneyUtils::scheduleTypeToString ( schedule.type() );
splitRow["nextduedate"] = schedule.nextDueDate().toString ( Qt::ISODate ); splitRow["nextduedate"] = schedule.nextDueDate().toString ( TQt::ISODate );
if ( ( *split_it ).value() == MyMoneyMoney::autoCalc ) { if ( ( *split_it ).value() == MyMoneyMoney::autoCalc ) {
splitRow["split"] = MyMoneyMoney::autoCalc.toString(); splitRow["split"] = MyMoneyMoney::autoCalc.toString();
@ -259,7 +259,7 @@ void ObjectInfoTable::constructAccountTable ( void )
accountRow["name"] = account.name(); accountRow["name"] = account.name();
accountRow["number"] = account.number(); accountRow["number"] = account.number();
accountRow["description"] = account.description(); accountRow["description"] = account.description();
accountRow["openingdate"] = account.openingDate().toString( Qt::ISODate ); accountRow["openingdate"] = account.openingDate().toString( TQt::ISODate );
//accountRow["currency"] = (file->currency(account.currencyId())).tradingSymbol(); //accountRow["currency"] = (file->currency(account.currencyId())).tradingSymbol();
accountRow["currencyname"] = (file->currency(account.currencyId())).name(); accountRow["currencyname"] = (file->currency(account.currencyId())).name();
accountRow["balancewarning"] = account.value("minBalanceEarly"); accountRow["balancewarning"] = account.value("minBalanceEarly");
@ -320,13 +320,13 @@ void ObjectInfoTable::constructAccountLoanTable ( void )
accountRow["name"] = account.name(); accountRow["name"] = account.name();
accountRow["number"] = account.number(); accountRow["number"] = account.number();
accountRow["description"] = account.description(); accountRow["description"] = account.description();
accountRow["openingdate"] = account.openingDate().toString( Qt::ISODate ); accountRow["openingdate"] = account.openingDate().toString( TQt::ISODate );
//accountRow["currency"] = (file->currency(account.currencyId())).tradingSymbol(); //accountRow["currency"] = (file->currency(account.currencyId())).tradingSymbol();
accountRow["currencyname"] = (file->currency(account.currencyId())).name(); accountRow["currencyname"] = (file->currency(account.currencyId())).name();
accountRow["payee"] = file->payee(loan.payee()).name(); accountRow["payee"] = file->payee(loan.payee()).name();
accountRow["loanamount"] = (loan.loanAmount() * xr).toString(); accountRow["loanamount"] = (loan.loanAmount() * xr).toString();
accountRow["interestrate"] = (loan.interestRate(TQDate::currentDate())/MyMoneyMoney(100,1)*xr).toString(); accountRow["interestrate"] = (loan.interestRate(TQDate::currentDate())/MyMoneyMoney(100,1)*xr).toString();
accountRow["nextinterestchange"] = loan.nextInterestChange().toString( Qt::ISODate ); accountRow["nextinterestchange"] = loan.nextInterestChange().toString( TQt::ISODate );
accountRow["periodicpayment"] = (loan.periodicPayment() * xr).toString(); accountRow["periodicpayment"] = (loan.periodicPayment() * xr).toString();
accountRow["finalpayment"] = (loan.finalPayment() * xr).toString(); accountRow["finalpayment"] = (loan.finalPayment() * xr).toString();
accountRow["favorite"] = account.value("PreferredAccount"); accountRow["favorite"] = account.value("PreferredAccount");

@ -88,7 +88,7 @@ CashFlowListItem CashFlowList::mostRecent(void) const
CashFlowList dupe( *this ); CashFlowList dupe( *this );
qHeapSort( dupe ); qHeapSort( dupe );
//kdDebug(2) << " CashFlowList::mostRecent() == " << dupe.back().date().toString(Qt::ISODate) << endl; //kdDebug(2) << " CashFlowList::mostRecent() == " << dupe.back().date().toString(TQt::ISODate) << endl;
return dupe.back(); return dupe.back();
} }
@ -229,7 +229,7 @@ void CashFlowList::dumpDebug(void) const
const_iterator it_item = begin(); const_iterator it_item = begin();
while ( it_item != end() ) while ( it_item != end() )
{ {
kdDebug(2) << TQString((*it_item).date().toString(Qt::ISODate)) << " " << (*it_item).value().toString() << endl; kdDebug(2) << TQString((*it_item).date().toString(TQt::ISODate)) << " " << (*it_item).value().toString() << endl;
++it_item; ++it_item;
} }
} }
@ -431,13 +431,13 @@ void QueryTable::constructTransactionTable(void)
TQDate pd; TQDate pd;
qA["id"] = qS["id"] = (* it_transaction).id(); qA["id"] = qS["id"] = (* it_transaction).id();
qA["entrydate"] = qS["entrydate"] = (* it_transaction).entryDate().toString(Qt::ISODate); qA["entrydate"] = qS["entrydate"] = (* it_transaction).entryDate().toString(TQt::ISODate);
qA["postdate"] = qS["postdate"] = (* it_transaction).postDate().toString(Qt::ISODate); qA["postdate"] = qS["postdate"] = (* it_transaction).postDate().toString(TQt::ISODate);
qA["commodity"] = qS["commodity"] = (* it_transaction).commodity(); qA["commodity"] = qS["commodity"] = (* it_transaction).commodity();
pd = (* it_transaction).postDate(); pd = (* it_transaction).postDate();
qA["month"] = qS["month"] = i18n("Month of %1").arg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate)); qA["month"] = qS["month"] = i18n("Month of %1").arg(TQDate(pd.year(),pd.month(),1).toString(TQt::ISODate));
qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate)); qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(TQt::ISODate));
qA["currency"] = qS["currency"] = ""; qA["currency"] = qS["currency"] = "";
@ -587,7 +587,7 @@ void QueryTable::constructTransactionTable(void)
? i18n("[Empty Payee]") ? i18n("[Empty Payee]")
: file->payee(payee).name().simplifyWhiteSpace(); : file->payee(payee).name().simplifyWhiteSpace();
qA["reconciledate"] = (*it_split).reconcileDate().toString(Qt::ISODate); qA["reconciledate"] = (*it_split).reconcileDate().toString(TQt::ISODate);
qA["reconcileflag"] = KMyMoneyUtils::reconcileStateToString((*it_split).reconcileFlag(), true ); qA["reconcileflag"] = KMyMoneyUtils::reconcileStateToString((*it_split).reconcileFlag(), true );
qA["number"] = (*it_split).number(); qA["number"] = (*it_split).number();
@ -814,8 +814,8 @@ void QueryTable::constructTransactionTable(void)
TQDate startDate, endDate; TQDate startDate, endDate;
report.validDateRange(startDate, endDate); report.validDateRange(startDate, endDate);
TQString strStartDate = startDate.toString(Qt::ISODate); TQString strStartDate = startDate.toString(TQt::ISODate);
TQString strEndDate = endDate.toString(Qt::ISODate); TQString strEndDate = endDate.toString(TQt::ISODate);
startDate = startDate.addDays(-1); startDate = startDate.addDays(-1);
TQMap<TQString, MyMoneyAccount>::const_iterator it_account, accts_end; TQMap<TQString, MyMoneyAccount>::const_iterator it_account, accts_end;
@ -1208,13 +1208,13 @@ void QueryTable::constructSplitsTable(void)
TQDate pd; TQDate pd;
qA["id"] = qS["id"] = (* it_transaction).id(); qA["id"] = qS["id"] = (* it_transaction).id();
qA["entrydate"] = qS["entrydate"] = (* it_transaction).entryDate().toString(Qt::ISODate); qA["entrydate"] = qS["entrydate"] = (* it_transaction).entryDate().toString(TQt::ISODate);
qA["postdate"] = qS["postdate"] = (* it_transaction).postDate().toString(Qt::ISODate); qA["postdate"] = qS["postdate"] = (* it_transaction).postDate().toString(TQt::ISODate);
qA["commodity"] = qS["commodity"] = (* it_transaction).commodity(); qA["commodity"] = qS["commodity"] = (* it_transaction).commodity();
pd = (* it_transaction).postDate(); pd = (* it_transaction).postDate();
qA["month"] = qS["month"] = i18n("Month of %1").arg(TQDate(pd.year(),pd.month(),1).toString(Qt::ISODate)); qA["month"] = qS["month"] = i18n("Month of %1").arg(TQDate(pd.year(),pd.month(),1).toString(TQt::ISODate));
qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(Qt::ISODate)); qA["week"] = qS["week"] = i18n("Week of %1").arg(pd.addDays(1-pd.dayOfWeek()).toString(TQt::ISODate));
qA["currency"] = qS["currency"] = ""; qA["currency"] = qS["currency"] = "";
@ -1345,7 +1345,7 @@ void QueryTable::constructSplitsTable(void)
? i18n("[Empty Payee]") ? i18n("[Empty Payee]")
: file->payee(payee).name().simplifyWhiteSpace(); : file->payee(payee).name().simplifyWhiteSpace();
qA["reconciledate"] = (*it_split).reconcileDate().toString(Qt::ISODate); qA["reconciledate"] = (*it_split).reconcileDate().toString(TQt::ISODate);
qA["reconcileflag"] = KMyMoneyUtils::reconcileStateToString((*it_split).reconcileFlag(), true ); qA["reconcileflag"] = KMyMoneyUtils::reconcileStateToString((*it_split).reconcileFlag(), true );
qA["number"] = (*it_split).number(); qA["number"] = (*it_split).number();
@ -1446,8 +1446,8 @@ void QueryTable::constructSplitsTable(void)
TQDate startDate, endDate; TQDate startDate, endDate;
report.validDateRange(startDate, endDate); report.validDateRange(startDate, endDate);
TQString strStartDate = startDate.toString(Qt::ISODate); TQString strStartDate = startDate.toString(TQt::ISODate);
TQString strEndDate = endDate.toString(Qt::ISODate); TQString strEndDate = endDate.toString(TQt::ISODate);
startDate = startDate.addDays(-1); startDate = startDate.addDays(-1);
TQMap<TQString, MyMoneyAccount>::const_iterator it_account, accts_end; TQMap<TQString, MyMoneyAccount>::const_iterator it_account, accts_end;

@ -233,7 +233,7 @@ void KBudgetView::loadBudgets(void)
m_budgetValue->clear(); m_budgetValue->clear();
// add the correct years to the drop down list // add the correct years to the drop down list
TQDate date = TQDate::currentDate(Qt::LocalTime); TQDate date = TQDate::currentDate(TQt::LocalTime);
int iStartYear = date.year() - m_iBudgetYearsBack; int iStartYear = date.year() - m_iBudgetYearsBack;
m_yearList.clear(); m_yearList.clear();

@ -619,11 +619,11 @@ void TDEGlobalLedgerView::loadView(void)
if(!t->isScheduled()) { if(!t->isScheduled()) {
if(split.reconcileFlag() == MyMoneySplit::NotReconciled) { if(split.reconcileFlag() == MyMoneySplit::NotReconciled) {
tracer.printf("Reducing cleared balance by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(Qt::ISODate).local8Bit().data()); tracer.printf("Reducing cleared balance by %s because %s/%s(%s) is not reconciled", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(TQt::ISODate).local8Bit().data());
clearedBalance[split.accountId()] -= split.shares() * factor; clearedBalance[split.accountId()] -= split.shares() * factor;
} }
if(isReconciliationAccount() && t->transaction().postDate() > reconciliationDate && split.reconcileFlag() == MyMoneySplit::Cleared) { if(isReconciliationAccount() && t->transaction().postDate() > reconciliationDate && split.reconcileFlag() == MyMoneySplit::Cleared) {
tracer.printf("Reducing cleared balance by %s because we are in reconciliation, %s/%s(%s)'s date is after or on reconciliation date (%s) and is cleared", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(Qt::ISODate).local8Bit().data(), reconciliationDate.toString(Qt::ISODate).local8Bit().data()); tracer.printf("Reducing cleared balance by %s because we are in reconciliation, %s/%s(%s)'s date is after or on reconciliation date (%s) and is cleared", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(TQt::ISODate).local8Bit().data(), reconciliationDate.toString(TQt::ISODate).local8Bit().data());
clearedBalance[split.accountId()] -= split.shares() * factor; clearedBalance[split.accountId()] -= split.shares() * factor;
} }
@ -638,7 +638,7 @@ void TDEGlobalLedgerView::loadView(void)
} }
if(t->transaction().postDate() > TQDate::currentDate()) { if(t->transaction().postDate() > TQDate::currentDate()) {
tracer.printf("Reducing actual balance by %s because %s/%s(%s) is in the future", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(Qt::ISODate).local8Bit().data()); tracer.printf("Reducing actual balance by %s because %s/%s(%s) is in the future", (split.shares() * factor).formatMoney("", 2).local8Bit().data(), t->transaction().id().local8Bit().data(), split.id().local8Bit().data(), t->transaction().postDate().toString(TQt::ISODate).local8Bit().data());
actBalance[split.accountId()] -= split.shares() * factor; actBalance[split.accountId()] -= split.shares() * factor;
} }
} }

@ -330,7 +330,7 @@ void KHomeView::showNetWorthGraph(void)
// draw future values in a different line style // draw future values in a different line style
KDChartPropertySet propSetFutureValue("future value", KMM_KDCHART_PROPSET_NORMAL_DATA); KDChartPropertySet propSetFutureValue("future value", KMM_KDCHART_PROPSET_NORMAL_DATA);
propSetFutureValue.setLineStyle(KDChartPropertySet::OwnID, Qt::DotLine); propSetFutureValue.setLineStyle(KDChartPropertySet::OwnID, TQt::DotLine);
const int idPropFutureValue = chartWidget->params()->registerProperties(propSetFutureValue); const int idPropFutureValue = chartWidget->params()->registerProperties(propSetFutureValue);
//KDChartPropertySet propSetLastValue("last value", idPropFutureValue); //KDChartPropertySet propSetLastValue("last value", idPropFutureValue);

@ -165,7 +165,7 @@ void KMyMoneyAccountCombo::keyPressEvent(TQKeyEvent* k)
void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e) void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e)
{ {
if ( e->button() != Qt::LeftButton ) { if ( e->button() != TQt::LeftButton ) {
e->ignore(); e->ignore();
return; return;
} }
@ -178,7 +178,7 @@ void KMyMoneyAccountCombo::mousePressEvent(TQMouseEvent *e)
void KMyMoneyAccountCombo::mouseReleaseEvent(TQMouseEvent *e) void KMyMoneyAccountCombo::mouseReleaseEvent(TQMouseEvent *e)
{ {
if ( e->button() != Qt::LeftButton ) { if ( e->button() != TQt::LeftButton ) {
e->ignore(); e->ignore();
return; return;
} }

@ -165,7 +165,7 @@ void KMyMoneyCombo::setPaletteBackgroundColor(const TQColor& color)
void KMyMoneyCombo::mousePressEvent(TQMouseEvent *e) void KMyMoneyCombo::mousePressEvent(TQMouseEvent *e)
{ {
// mostly copied from TQCombo::mousePressEvent() and adjusted for our needs // mostly copied from TQCombo::mousePressEvent() and adjusted for our needs
if(e->button() != Qt::LeftButton) if(e->button() != TQt::LeftButton)
return; return;
if(((!editable() || isInArrowArea(mapToGlobal(e->pos()))) && selector()->itemList().count()) && !m_completion->isVisible()) { if(((!editable() || isInArrowArea(mapToGlobal(e->pos()))) && selector()->itemList().count()) && !m_completion->isVisible()) {

@ -425,7 +425,7 @@ void SimpleDateGroupMarker::paintRegisterCell(TQPainter* painter, int row, int /
cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor()); cg.setColor(TQColorGroup::Base, KMyMoneyGlobalSettings::listBGColor());
TQBrush backgroundBrush(cg.base()); TQBrush backgroundBrush(cg.base());
// backgroundBrush.setStyle(TQt::DiagCrossPattern); // backgroundBrush.setStyle(TQt::DiagCrossPattern);
backgroundBrush.setStyle(Qt::Dense5Pattern); backgroundBrush.setStyle(TQt::Dense5Pattern);
backgroundBrush.setColor(KMyMoneyGlobalSettings::listGridColor()); backgroundBrush.setColor(KMyMoneyGlobalSettings::listGridColor());
painter->eraseRect(cellRect); painter->eraseRect(cellRect);
painter->fillRect(cellRect, backgroundBrush); painter->fillRect(cellRect, backgroundBrush);
@ -681,7 +681,7 @@ bool Register::eventFilter(TQObject* o, TQEvent* e)
{ {
if(o == horizontalHeader() && e->type() == TQEvent::MouseButtonPress) { if(o == horizontalHeader() && e->type() == TQEvent::MouseButtonPress) {
TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(e); TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(e);
if(me->button() == Qt::RightButton) { if(me->button() == TQt::RightButton) {
emit headerClicked(); emit headerClicked();
} }
// eat up left mouse button press for now // eat up left mouse button press for now
@ -1590,12 +1590,12 @@ void Register::selectItem(int row, int col, int button, const TQPoint& /* mouseP
Transaction* t = dynamic_cast<Transaction*>(item); Transaction* t = dynamic_cast<Transaction*>(item);
if(t) { if(t) {
if(!id.isEmpty()) { if(!id.isEmpty()) {
switch(button & Qt::MouseButtonMask) { switch(button & TQt::MouseButtonMask) {
case Qt::RightButton: case TQt::RightButton:
emit openContextMenu(); emit openContextMenu();
break; break;
case Qt::LeftButton: case TQt::LeftButton:
if(t && col == ReconcileFlagColumn && selectedItemsCount() == 1 && !t->isScheduled()) if(t && col == ReconcileFlagColumn && selectedItemsCount() == 1 && !t->isScheduled())
emit reconcileStateColumnClicked(t); emit reconcileStateColumnClicked(t);
break; break;
@ -1659,7 +1659,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
// kdDebug(2) << "Register::selectItem(" << item << "): type is " << typeid(*item).name() << endl; // kdDebug(2) << "Register::selectItem(" << item << "): type is " << typeid(*item).name() << endl;
TQt::ButtonState buttonState = m_buttonState; TQt::ButtonState buttonState = m_buttonState;
m_buttonState = Qt::NoButton; m_buttonState = TQt::NoButton;
if(m_selectionMode == NoSelection) if(m_selectionMode == NoSelection)
return; return;
@ -1675,7 +1675,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
sameEntryType = false; sameEntryType = false;
} }
if(buttonState & Qt::LeftButton) { if(buttonState & TQt::LeftButton) {
if(!(buttonState & (TQt::ShiftButton | TQt::ControlButton))) { if(!(buttonState & (TQt::ShiftButton | TQt::ControlButton))) {
if((cnt != 1) || ((cnt == 1) && !item->isSelected())) { if((cnt != 1) || ((cnt == 1) && !item->isSelected())) {
emit aboutToSelectItem(item, okToSelect); emit aboutToSelectItem(item, okToSelect);
@ -1722,7 +1722,7 @@ void Register::selectItem(RegisterItem* item, bool dontChangeSelections)
break; break;
} }
} }
} else if(buttonState & Qt::RightButton) { } else if(buttonState & TQt::RightButton) {
// if the right button is pressed then only change the // if the right button is pressed then only change the
// selection if none of the Shift/Ctrl button is pressed and // selection if none of the Shift/Ctrl button is pressed and
// one of the following conditions is true: // one of the following conditions is true:
@ -2181,7 +2181,7 @@ void Register::keyPressEvent(TQKeyEvent* ev)
// get the state out of the event ... // get the state out of the event ...
m_buttonState = ev->state(); m_buttonState = ev->state();
// ... and pretend that we have pressed the left mouse button ;) // ... and pretend that we have pressed the left mouse button ;)
m_buttonState = static_cast<TQt::ButtonState>(m_buttonState | Qt::LeftButton); m_buttonState = static_cast<TQt::ButtonState>(m_buttonState | TQt::LeftButton);
selectItem(m_focusItem); selectItem(m_focusItem);
} }
break; break;
@ -2295,7 +2295,7 @@ void Register::addGroupMarkers(void)
if(m_account.accountGroup() == MyMoneyAccount::Liability) if(m_account.accountGroup() == MyMoneyAccount::Liability)
balance = -balance; balance = -balance;
TQString txt = i18n("Online Statement Balance: %1").arg(balance.formatMoney(m_account.fraction())); TQString txt = i18n("Online Statement Balance: %1").arg(balance.formatMoney(m_account.fraction()));
new KMyMoneyRegister::StatementGroupMarker(this, KMyMoneyRegister::Deposit, TQDate::fromString(m_account.value("lastImportedTransactionDate"), Qt::ISODate), txt); new KMyMoneyRegister::StatementGroupMarker(this, KMyMoneyRegister::Deposit, TQDate::fromString(m_account.value("lastImportedTransactionDate"), TQt::ISODate), txt);
} }
new KMyMoneyRegister::FancyDateGroupMarker(this, thisYear, i18n("This year")); new KMyMoneyRegister::FancyDateGroupMarker(this, thisYear, i18n("This year"));

@ -332,7 +332,7 @@ public:
/** /**
* Select @a item and unselect all others if @a dontChangeSelections * Select @a item and unselect all others if @a dontChangeSelections
* is @a false. If m_buttonState differs from Qt::NoButton (method is * is @a false. If m_buttonState differs from TQt::NoButton (method is
* called as a result of a mouse button press), then the setting of * called as a result of a mouse button press), then the setting of
* @a dontChangeSelections has no effect. * @a dontChangeSelections has no effect.
*/ */

@ -144,7 +144,7 @@ void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row,
case DetailColumn: case DetailColumn:
align |= TQt::AlignLeft; align |= TQt::AlignLeft;
txt = TQString("%1 %2").arg(matchedTransaction.postDate().toString(Qt::ISODate)).arg(matchedTransaction.memo()); txt = TQString("%1 %2").arg(matchedTransaction.postDate().toString(TQt::ISODate)).arg(matchedTransaction.memo());
break; break;
case PaymentColumn: case PaymentColumn:
@ -174,7 +174,7 @@ void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row,
align |= TQt::AlignLeft; align |= TQt::AlignLeft;
postDate = m_transaction.postDate(); postDate = m_transaction.postDate();
if(!m_split.value("kmm-orig-postdate").isEmpty()) { if(!m_split.value("kmm-orig-postdate").isEmpty()) {
postDate = TQDate::fromString(m_split.value("kmm-orig-postdate"), Qt::ISODate); postDate = TQDate::fromString(m_split.value("kmm-orig-postdate"), TQt::ISODate);
} }
memo = m_split.memo(); memo = m_split.memo();
if(!matchedSplit.memo().isEmpty() && memo != matchedSplit.memo()) { if(!matchedSplit.memo().isEmpty() && memo != matchedSplit.memo()) {
@ -187,7 +187,7 @@ void StdTransactionMatched::registerCellText(TQString& txt, int& align, int row,
memo.replace('\n', " "); memo.replace('\n', " ");
} }
} }
txt = TQString("%1 %2").arg(postDate.toString(Qt::ISODate)).arg(memo); txt = TQString("%1 %2").arg(postDate.toString(TQt::ISODate)).arg(memo);
break; break;
case PaymentColumn: case PaymentColumn:

@ -649,7 +649,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter,
TQString text; TQString text;
if( cv.isDateTime ){ if( cv.isDateTime ){
TQDateTime dt( TQDateTime::fromString( *it, TQDateTime dt( TQDateTime::fromString( *it,
Qt::ISODate ) ); TQt::ISODate ) );
text = dt.toString( formatDT ); text = dt.toString( formatDT );
}else{ }else{
text = *it; text = *it;
@ -1086,7 +1086,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter,
if( nLeaveOut ) { if( nLeaveOut ) {
leaveOutGridPen = gridPen; leaveOutGridPen = gridPen;
leaveOutGridPen.setWidth( gridLineWidth / 2 ); leaveOutGridPen.setWidth( gridLineWidth / 2 );
leaveOutGridPen.setStyle( Qt::DotLine ); leaveOutGridPen.setStyle( TQt::DotLine );
} }
// ========================================================= // =========================================================
// || The labels and delimiters and grid printing loops || // || The labels and delimiters and grid printing loops ||
@ -1645,7 +1645,7 @@ void KDChartAxesPainter::paintAxes( TQPainter* painter,
TQDateTime dt; TQDateTime dt;
if( cv.isDateTime ){ if( cv.isDateTime ){
dt = TQDateTime::fromString( *labelIter, dt = TQDateTime::fromString( *labelIter,
Qt::ISODate ); TQt::ISODate );
label = dt.toString( formatDT ); label = dt.toString( formatDT );
}else{ }else{
label = *labelIter; label = *labelIter;
@ -3198,9 +3198,9 @@ void KDChartAxesPainter::calculateLabelTexts(
nLabels = 0; nLabels = 0;
/* /*
tqDebug("dtLow: "); tqDebug("dtLow: ");
tqDebug(dtLow.toString( Qt::ISODate )); tqDebug(dtLow.toString( TQt::ISODate ));
tqDebug("dtHigh: "); tqDebug("dtHigh: ");
tqDebug(dtHigh.toString( Qt::ISODate )); tqDebug(dtHigh.toString( TQt::ISODate ));
*/ */
bool bDone=false; bool bDone=false;
while( !bDone ) { while( !bDone ) {
@ -3231,7 +3231,7 @@ void KDChartAxesPainter::calculateLabelTexts(
if( autoDtLabels ) if( autoDtLabels )
labelTexts.append( "x" ); labelTexts.append( "x" );
else else
labelTexts.append( dt.toString( Qt::ISODate ) ); labelTexts.append( dt.toString( TQt::ISODate ) );
bDone = (goDown ? (dt < dtLow ) : (dt > dtHigh)); bDone = (goDown ? (dt < dtLow ) : (dt > dtHigh));
/*if( bDone ){ /*if( bDone ){
dtHigh = dt; dtHigh = dt;

@ -163,12 +163,12 @@ KDChartAxisParams::KDChartAxisParams()
_axisShowGrid = false; _axisShowGrid = false;
_axisGridColor = KDCHART_DEFAULT_AXIS_GRID_COLOR; _axisGridColor = KDCHART_DEFAULT_AXIS_GRID_COLOR;
_axisGridLineWidth = KDCHART_AXIS_GRID_AUTO_LINEWIDTH; _axisGridLineWidth = KDCHART_AXIS_GRID_AUTO_LINEWIDTH;
_axisGridStyle = Qt::SolidLine; _axisGridStyle = TQt::SolidLine;
_axisShowSubDelimiters = true; _axisShowSubDelimiters = true;
_axisGridSubColor = KDCHART_DEFAULT_AXIS_GRID_COLOR; _axisGridSubColor = KDCHART_DEFAULT_AXIS_GRID_COLOR;
_axisGridSubLineWidth = KDCHART_AXIS_GRID_AUTO_LINEWIDTH; _axisGridSubLineWidth = KDCHART_AXIS_GRID_AUTO_LINEWIDTH;
_axisGridSubStyle = Qt::DotLine; _axisGridSubStyle = TQt::DotLine;
_axisZeroLineColor = TQColor( 0x00, 0x00, 0x80 ); _axisZeroLineColor = TQColor( 0x00, 0x00, 0x80 );
@ -1156,14 +1156,14 @@ void KDChartAxisParams::setAxisGridSubLineWidth( int axisGridSubLineWidth )
\param axisGridStyle the axis grid line pattern. \param axisGridStyle the axis grid line pattern.
\sa axisGridStyle, setAxisShowGrid \sa axisGridStyle, setAxisShowGrid
*/ */
void KDChartAxisParams::setAxisGridStyle( Qt::PenStyle axisGridStyle ) void KDChartAxisParams::setAxisGridStyle( TQt::PenStyle axisGridStyle )
{ {
_axisGridStyle = axisGridStyle; _axisGridStyle = axisGridStyle;
emit changed(); emit changed();
} }
/** /**
\fn Qt::PenStyle KDChartAxisParams::axisGridStyle() const \fn TQt::PenStyle KDChartAxisParams::axisGridStyle() const
Returns the axis grid line pattern. Returns the axis grid line pattern.
\return the axis grid line pattern. \return the axis grid line pattern.
@ -1180,14 +1180,14 @@ void KDChartAxisParams::setAxisGridStyle( Qt::PenStyle axisGridStyle )
\sa axisGridSubStyle, setAxisGridStyle, axisGridStyle \sa axisGridSubStyle, setAxisGridStyle, axisGridStyle
\sa setAxisShowGrid \sa setAxisShowGrid
*/ */
void KDChartAxisParams::setAxisGridSubStyle( Qt::PenStyle axisGridSubStyle ) void KDChartAxisParams::setAxisGridSubStyle( TQt::PenStyle axisGridSubStyle )
{ {
_axisGridSubStyle = axisGridSubStyle; _axisGridSubStyle = axisGridSubStyle;
emit changed(); emit changed();
} }
/** /**
\fn Qt::PenStyle KDChartAxisParams::axisGridSubStyle() const \fn TQt::PenStyle KDChartAxisParams::axisGridSubStyle() const
Returns the axis grid line pattern for the thin lines Returns the axis grid line pattern for the thin lines
showing the sub-delimiter values. showing the sub-delimiter values.
@ -3092,14 +3092,14 @@ KDChartAxisParams::AxisType KDChartAxisParams::stringToAxisType( const TQString&
*/ */
/** /**
\var Qt::PenStyle _axisGridStyle \var TQt::PenStyle _axisGridStyle
Specifies the axis grid line pattern for main grid lines. Specifies the axis grid line pattern for main grid lines.
\sa setAxisGridStyle, setAxisShowGrid \sa setAxisGridStyle, setAxisShowGrid
*/ */
/** /**
\var Qt::PenStyle _axisGridSubStyle \var TQt::PenStyle _axisGridSubStyle
Specifies the axis grid line pattern for sub-delimiter grid lines. Specifies the axis grid line pattern for sub-delimiter grid lines.
\sa setAxisGridSubStyle, setAxisGridStyle, setAxisShowGrid \sa setAxisGridSubStyle, setAxisGridStyle, setAxisShowGrid

@ -246,8 +246,8 @@ public slots:
bool axisShowFractionalValuesDelimiters() const { return _axisShowFractionalValuesDelimiters; } bool axisShowFractionalValuesDelimiters() const { return _axisShowFractionalValuesDelimiters; }
void setAxisShowGrid( bool axisShowGrid ); void setAxisShowGrid( bool axisShowGrid );
bool axisShowGrid() const { return _axisShowGrid; } bool axisShowGrid() const { return _axisShowGrid; }
void setAxisGridStyle( Qt::PenStyle axisGridStyle ); void setAxisGridStyle( TQt::PenStyle axisGridStyle );
Qt::PenStyle axisGridStyle() const { return _axisGridStyle; } TQt::PenStyle axisGridStyle() const { return _axisGridStyle; }
void setAxisGridColor( TQColor axisGridColor ); void setAxisGridColor( TQColor axisGridColor );
TQColor axisGridColor() const { return _axisGridColor; } TQColor axisGridColor() const { return _axisGridColor; }
void setAxisGridLineWidth( int axisGridLineWidth ); void setAxisGridLineWidth( int axisGridLineWidth );
@ -255,8 +255,8 @@ public slots:
// sub grid: // sub grid:
void setAxisShowSubDelimiters( bool axisShowSubDelimiters ); void setAxisShowSubDelimiters( bool axisShowSubDelimiters );
bool axisShowSubDelimiters() const { return _axisShowSubDelimiters; } bool axisShowSubDelimiters() const { return _axisShowSubDelimiters; }
void setAxisGridSubStyle( Qt::PenStyle axisGridSubStyle ); void setAxisGridSubStyle( TQt::PenStyle axisGridSubStyle );
Qt::PenStyle axisGridSubStyle() const { return _axisGridSubStyle; } TQt::PenStyle axisGridSubStyle() const { return _axisGridSubStyle; }
void setAxisGridSubColor( TQColor axisGridSubColor ); void setAxisGridSubColor( TQColor axisGridSubColor );
TQColor axisGridSubColor() const { return _axisGridSubColor; } TQColor axisGridSubColor() const { return _axisGridSubColor; }
void setAxisGridSubLineWidth( int axisGridSubLineWidth ); void setAxisGridSubLineWidth( int axisGridSubLineWidth );
@ -451,12 +451,12 @@ private:
bool _axisShowGrid; bool _axisShowGrid;
TQColor _axisGridColor; TQColor _axisGridColor;
int _axisGridLineWidth; int _axisGridLineWidth;
Qt::PenStyle _axisGridStyle; TQt::PenStyle _axisGridStyle;
bool _axisShowSubDelimiters; bool _axisShowSubDelimiters;
TQColor _axisGridSubColor; TQColor _axisGridSubColor;
int _axisGridSubLineWidth; int _axisGridSubLineWidth;
Qt::PenStyle _axisGridSubStyle; TQt::PenStyle _axisGridSubStyle;
TQColor _axisZeroLineColor; TQColor _axisZeroLineColor;
bool _axisLabelsVisible; bool _axisLabelsVisible;

@ -800,7 +800,7 @@ void KDChartLinesPainter::specificPaintData( TQPainter* painter,
// preset with default values // preset with default values
int theLineWidth = default2DPen.width(); int theLineWidth = default2DPen.width();
TQColor theLineColor = default2DPen.color(); TQColor theLineColor = default2DPen.color();
Qt::PenStyle theLineStyle = default2DPen.style(); TQt::PenStyle theLineStyle = default2DPen.style();
if( curPropSetId != KDChartPropertySet::UndefinedID ){ if( curPropSetId != KDChartPropertySet::UndefinedID ){
// we can safely call the following functions and ignore their // we can safely call the following functions and ignore their
// return values since they will touch the parameters' values // return values since they will touch the parameters' values

@ -331,7 +331,7 @@ TQObject* KDChartObjectFactory::createKDChartPropertySet(const TQSArgumentList&
if ( !getNumber( args, 7,&i, "KDChartPropertySet" ) ) return 0; if ( !getNumber( args, 7,&i, "KDChartPropertySet" ) ) return 0;
Qt::PenStyle lineStyle = (Qt::PenStyle) i; TQt::PenStyle lineStyle = (TQt::PenStyle) i;
int idShowMarker; int idShowMarker;
if ( !getNumber( args, 8,&idShowMarker, "KDChartPropertySet" ) ) return 0; if ( !getNumber( args, 8,&idShowMarker, "KDChartPropertySet" ) ) return 0;
@ -373,7 +373,7 @@ TQObject* KDChartObjectFactory::createKDChartPropertySet(const TQSArgumentList&
if ( !getNumber( args, 20,&idExtraLinesStyle, "KDChartPropertySet" ) ) return 0; if ( !getNumber( args, 20,&idExtraLinesStyle, "KDChartPropertySet" ) ) return 0;
if ( !getNumber( args, 21,&i, "KDChartPropertySet" ) ) return 0; if ( !getNumber( args, 21,&i, "KDChartPropertySet" ) ) return 0;
Qt::PenStyle extraLinesStyle = (Qt::PenStyle) i; TQt::PenStyle extraLinesStyle = (TQt::PenStyle) i;
int idExtraMarkersAlign; int idExtraMarkersAlign;
if ( !getNumber( args, 22,&idExtraMarkersAlign, "KDChartPropertySet" ) ) return 0; if ( !getNumber( args, 22,&idExtraMarkersAlign, "KDChartPropertySet" ) ) return 0;

@ -1341,7 +1341,7 @@ void KDChartPainter::calculateHorizontalLegendSize( TQPainter* painter,
bool KDChartPainter::mustDrawVerticalLegend() const bool KDChartPainter::mustDrawVerticalLegend() const
{ {
return return
params()->legendOrientation() == Qt::Vertical || params()->legendOrientation() == TQt::Vertical ||
params()->legendPosition() == KDChartParams::LegendLeft || params()->legendPosition() == KDChartParams::LegendLeft ||
params()->legendPosition() == KDChartParams::LegendRight || params()->legendPosition() == KDChartParams::LegendRight ||
params()->legendPosition() == KDChartParams::LegendTopLeft || params()->legendPosition() == KDChartParams::LegendTopLeft ||
@ -2870,7 +2870,7 @@ void KDChartPainter::drawExtraLinesAndMarkers(
int extraLinesLength = -20; int extraLinesLength = -20;
int extraLinesWidth = defaultPen.width(); int extraLinesWidth = defaultPen.width();
TQColor extraLinesColor = defaultPen.color(); TQColor extraLinesColor = defaultPen.color();
Qt::PenStyle extraLinesStyle = defaultPen.style(); TQt::PenStyle extraLinesStyle = defaultPen.style();
uint extraMarkersAlign = 0; uint extraMarkersAlign = 0;
propSet.hasOwnExtraLinesLength( iDummy, extraLinesLength ); propSet.hasOwnExtraLinesLength( iDummy, extraLinesLength );
propSet.hasOwnExtraLinesWidth( iDummy, extraLinesWidth ); propSet.hasOwnExtraLinesWidth( iDummy, extraLinesWidth );

@ -144,7 +144,7 @@ KDChartParams::KDChartParams()
setShadowBrightnessFactor( 1.0 ); setShadowBrightnessFactor( 1.0 );
// The default shadow fill style. // The default shadow fill style.
setShadowPattern( Qt::SolidPattern ); setShadowPattern( TQt::SolidPattern );
// Some default colors for the data. // Some default colors for the data.
setDataDefaultColors(); setDataDefaultColors();
@ -156,7 +156,7 @@ KDChartParams::KDChartParams()
setOutlineDataLineWidth( 1 ); setOutlineDataLineWidth( 1 );
// Default line style for data display outlines. // Default line style for data display outlines.
setOutlineDataLineStyle( Qt::SolidLine ); setOutlineDataLineStyle( TQt::SolidLine );
// END GENERAL // END GENERAL
@ -215,7 +215,7 @@ KDChartParams::KDChartParams()
setLineWidth( 1 ); setLineWidth( 1 );
// Lines are solid by default // Lines are solid by default
setLineStyle( Qt::SolidLine ); setLineStyle( TQt::SolidLine );
// Lines have the same color as their // Lines have the same color as their
// respective data points by default // respective data points by default
@ -338,8 +338,8 @@ KDChartParams::KDChartParams()
setLegendSpacing( 20 ); setLegendSpacing( 20 );
// Position of the legend // Position of the legend
setLegendPosition( LegendRight ); setLegendPosition( LegendRight );
// Qt::Orientation of the legend // Orientation of the legend
setLegendOrientation( Qt::Vertical ); setLegendOrientation( TQt::Vertical );
// Whether the legend shall show lines or just // Whether the legend shall show lines or just
// show the markers (or squares, resp.) // show the markers (or squares, resp.)
setLegendShowLines( false ); setLegendShowLines( false );
@ -432,7 +432,7 @@ KDChartParams::KDChartParams()
setProperties(KDCHART_PROPSET_NORMAL_DATA, *tempPropSetA); setProperties(KDCHART_PROPSET_NORMAL_DATA, *tempPropSetA);
// don't show the line, don't show the marker // don't show the line, don't show the marker
tempPropSetA->setName("transparent data"); tempPropSetA->setName("transparent data");
tempPropSetA->setLineStyle( KDChartPropertySet::OwnID, Qt::NoPen ); tempPropSetA->setLineStyle( KDChartPropertySet::OwnID, TQt::NoPen );
tempPropSetA->setShowMarker( KDChartPropertySet::OwnID, false ); tempPropSetA->setShowMarker( KDChartPropertySet::OwnID, false );
setProperties(KDCHART_PROPSET_TRANSPARENT_DATA, *tempPropSetA); setProperties(KDCHART_PROPSET_TRANSPARENT_DATA, *tempPropSetA);
// don't show line nor marker, but do show the horizontal line // don't show line nor marker, but do show the horizontal line
@ -635,7 +635,7 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
if( bOk ){ if( bOk ){
int lineWidth; int lineWidth;
TQColor lineColor; TQColor lineColor;
Qt::PenStyle lineStyle; TQt::PenStyle lineStyle;
bool showMarker; bool showMarker;
uint markerAlign; uint markerAlign;
TQSize markerSize; TQSize markerSize;
@ -646,7 +646,7 @@ bool KDChartParams::calculateProperties( int startId, KDChartPropertySet& rSet )
int extraLinesLength; int extraLinesLength;
int extraLinesWidth; int extraLinesWidth;
TQColor extraLinesColor; TQColor extraLinesColor;
Qt::PenStyle extraLinesStyle; TQt::PenStyle extraLinesStyle;
uint extraMarkersAlign; uint extraMarkersAlign;
TQSize extraMarkersSize; TQSize extraMarkersSize;
TQColor extraMarkersColor; TQColor extraMarkersColor;
@ -1301,7 +1301,7 @@ void KDChartParams::setPrintDataValues( bool active,
else else
settings->_dataValuesColor = *color; settings->_dataValuesColor = *color;
} }
settings->_dataValuesBrush = TQBrush(Qt::NoBrush); settings->_dataValuesBrush = TQBrush(TQt::NoBrush);
// for values below zero: // for values below zero:
settings->_dataValuesAnchorNegativePosition = negativePosition; settings->_dataValuesAnchorNegativePosition = negativePosition;
settings->_dataValuesAnchorNegativeAlign = negativeAlign; settings->_dataValuesAnchorNegativeAlign = negativeAlign;
@ -3092,7 +3092,7 @@ void KDChartParams::setAdditionalChartType( ChartType chartType )
/** /**
\fn void KDChartParams::setShadowPattern( Qt::BrushStyle style ) \fn void KDChartParams::setShadowPattern( TQt::BrushStyle style )
Specifies a filling style for filling the shadow areas in Specifies a filling style for filling the shadow areas in
3-dimensional drawings like 3D bar charts. The default is to 3-dimensional drawings like 3D bar charts. The default is to
@ -3106,7 +3106,7 @@ void KDChartParams::setAdditionalChartType( ChartType chartType )
/** /**
\fn Qt::BrushStyle KDChartParams::shadowPattern() const \fn TQt::BrushStyle KDChartParams::shadowPattern() const
Returns the filling style used for filling the shadow areas in Returns the filling style used for filling the shadow areas in
3-dimensional drawings like 3D bar charts. The default is to 3-dimensional drawings like 3D bar charts. The default is to
@ -4862,7 +4862,7 @@ void KDChartParams::setLineMarkerStyles( LineMarkerStyleMap map ) {
\sa lineStyle, setLineWidth, setLineColor \sa lineStyle, setLineWidth, setLineColor
\sa setLineMarker, setLineMarkerSize, setLineMarkerStyle \sa setLineMarker, setLineMarkerSize, setLineMarkerStyle
*/ */
void KDChartParams::setLineStyle( Qt::PenStyle style, uint dataset ) void KDChartParams::setLineStyle( TQt::PenStyle style, uint dataset )
{ {
if( KDCHART_GLOBAL_LINE_STYLE == dataset ) if( KDCHART_GLOBAL_LINE_STYLE == dataset )
_lineStyle = style; _lineStyle = style;
@ -4885,7 +4885,7 @@ void KDChartParams::setLineStyle( Qt::PenStyle style, uint dataset )
\return the line style for the specified data set \return the line style for the specified data set
\sa setLineStyle, setLineMarkerStyle \sa setLineStyle, setLineMarkerStyle
*/ */
Qt::PenStyle KDChartParams::lineStyle( uint dataset ) const TQt::PenStyle KDChartParams::lineStyle( uint dataset ) const
{ {
if( KDCHART_GLOBAL_LINE_STYLE == dataset ) if( KDCHART_GLOBAL_LINE_STYLE == dataset )
// global line style // global line style
@ -6668,10 +6668,10 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/** /**
\fn void KDChartParams::setLegendOrientation( Qt::Orientation orientation ) \fn void KDChartParams::setLegendOrientation( TQt::Orientation orientation )
Specifies how the legend should be printed. Qt::Vertical (the default) Specifies how the legend should be printed. TQt::Vertical (the default)
prints the legend entries below each other, Qt::Horizontal prints them prints the legend entries below each other, TQt::Horizontal prints them
aside each other. aside each other.
\note Horizontal orientation is only possible if the chart is NOT making \note Horizontal orientation is only possible if the chart is NOT making
@ -6686,7 +6686,7 @@ void KDChartParams::setBWChartPrintStatistics( BWStatVal statValue,
/** /**
\fn Qt::Orientation KDChartParams::legendOrientation() const \fn TQt::Orientation KDChartParams::legendOrientation() const
Returns how the legend will be printed. Returns how the legend will be printed.
@ -8428,7 +8428,7 @@ int KDChartParams::headerFooterFontRelSize( uint pos ) const
/** /**
\var Qt::BrushStyle KDChartParams::_shadowPattern; \var TQt::BrushStyle KDChartParams::_shadowPattern;
Stores a fill style to be used for filling shadow area in Stores a fill style to be used for filling shadow area in
3-dimensional drawings like e.g. 3D bar charts. 3-dimensional drawings like e.g. 3D bar charts.
@ -9238,7 +9238,7 @@ void KDChartParams::insertDefaultAxisTitleBox( uint n,
0, 0, 0, 0,
0, 0, 0, 0,
setColor ? axisTitleColor : TQt::darkBlue, setColor ? axisTitleColor : TQt::darkBlue,
Qt::NoBrush, TQt::NoBrush,
KDChartEnums::AreaAxisBASE + n, KDChartEnums::AreaAxisBASE + n,
bVert ? KDChartEnums::PosCenterLeft : KDChartEnums::PosBottomCenter, bVert ? (TQt::AlignTop + TQt::AlignHCenter) : (TQt::AlignBottom + TQt::AlignHCenter), bVert ? KDChartEnums::PosCenterLeft : KDChartEnums::PosBottomCenter, bVert ? (TQt::AlignTop + TQt::AlignHCenter) : (TQt::AlignBottom + TQt::AlignHCenter),
0,0,0, 0,0,0,

@ -633,12 +633,12 @@ public slots:
} }
void setShadowPattern( Qt::BrushStyle style ) { void setShadowPattern( TQt::BrushStyle style ) {
_shadowPattern = style; _shadowPattern = style;
emit changed(); emit changed();
} }
Qt::BrushStyle shadowPattern() const { TQt::BrushStyle shadowPattern() const {
return _shadowPattern; return _shadowPattern;
} }
@ -668,13 +668,13 @@ public slots:
} }
void setOutlineDataLineStyle( Qt::PenStyle style ) void setOutlineDataLineStyle( TQt::PenStyle style )
{ {
_outlineDataLineStyle = style; _outlineDataLineStyle = style;
emit changed(); emit changed();
} }
Qt::PenStyle outlineDataLineStyle() const TQt::PenStyle outlineDataLineStyle() const
{ {
return _outlineDataLineStyle; return _outlineDataLineStyle;
} }
@ -749,7 +749,7 @@ public slots:
uint chart = KDCHART_ALL_CHARTS ); uint chart = KDCHART_ALL_CHARTS );
void setDataValuesColors( const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR, void setDataValuesColors( const TQColor* color = KDCHART_DATA_VALUE_AUTO_COLOR,
const TQBrush& background = TQBrush(Qt::NoBrush), const TQBrush& background = TQBrush(TQt::NoBrush),
uint chart = KDCHART_ALL_CHARTS ); uint chart = KDCHART_ALL_CHARTS );
// Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h // Note if you change the parameters here, then you must also change them in wrappers/KDChartParametersWrapper.h
@ -1150,9 +1150,9 @@ public slots:
return _lineColor; return _lineColor;
} }
void setLineStyle( Qt::PenStyle style, uint dataset=KDCHART_GLOBAL_LINE_STYLE ); void setLineStyle( TQt::PenStyle style, uint dataset=KDCHART_GLOBAL_LINE_STYLE );
Qt::PenStyle lineStyle( uint dataset=KDCHART_GLOBAL_LINE_STYLE ) const; TQt::PenStyle lineStyle( uint dataset=KDCHART_GLOBAL_LINE_STYLE ) const;
void setThreeDLines( bool threeD ) { void setThreeDLines( bool threeD ) {
@ -1866,13 +1866,13 @@ public slots:
return _legendPosition; return _legendPosition;
} }
void setLegendOrientation( Qt::Orientation orientation ) void setLegendOrientation( TQt::Orientation orientation )
{ {
_legendOrientation = orientation; _legendOrientation = orientation;
emit changed(); emit changed();
} }
Qt::Orientation legendOrientation() const TQt::Orientation legendOrientation() const
{ {
return _legendOrientation; return _legendOrientation;
} }
@ -2543,14 +2543,14 @@ private:
uint _maxDatasetSourceMode; uint _maxDatasetSourceMode;
KDChartPropertySetList _propertySetList; KDChartPropertySetList _propertySetList;
double _shadowBrightnessFactor; double _shadowBrightnessFactor;
Qt::BrushStyle _shadowPattern; TQt::BrushStyle _shadowPattern;
bool _threeDShadowColors; bool _threeDShadowColors;
uint _maxDatasetColor; uint _maxDatasetColor;
TQMap < uint, TQColor > _dataColorsShadow1; TQMap < uint, TQColor > _dataColorsShadow1;
TQMap < uint, TQColor > _dataColorsShadow2; TQMap < uint, TQColor > _dataColorsShadow2;
TQColor _outlineDataColor; TQColor _outlineDataColor;
uint _outlineDataLineWidth; uint _outlineDataLineWidth;
Qt::PenStyle _outlineDataLineStyle; TQt::PenStyle _outlineDataLineStyle;
struct PrintDataValuesSettings { struct PrintDataValuesSettings {
@ -2612,8 +2612,8 @@ private:
TQSize _lineMarkerSize; TQSize _lineMarkerSize;
TQColor _lineColor; TQColor _lineColor;
int _lineWidth; int _lineWidth;
Qt::PenStyle _lineStyle; TQt::PenStyle _lineStyle;
typedef TQMap<uint, Qt::PenStyle> LineStyleMap; typedef TQMap<uint, TQt::PenStyle> LineStyleMap;
LineStyleMap _datasetLineStyles; LineStyleMap _datasetLineStyles;
AreaChartSubType _areaChartSubType; AreaChartSubType _areaChartSubType;
AreaLocation _areaLocation; AreaLocation _areaLocation;
@ -2700,7 +2700,7 @@ private:
// LEGENDS // LEGENDS
LegendPosition _legendPosition; LegendPosition _legendPosition;
Qt::Orientation _legendOrientation; TQt::Orientation _legendOrientation;
bool _legendShowLines; bool _legendShowLines;
LegendSource _legendSource; LegendSource _legendSource;
TQMap < int, TQString > _legendText; TQMap < int, TQString > _legendText;

@ -545,7 +545,7 @@ TQDomDocument KDChartParams::saveXML( bool withPI ) const
KDXML::penStyleToString( _lineStyle ) ); KDXML::penStyleToString( _lineStyle ) );
// the DatasetLineStyles elements // the DatasetLineStyles elements
{for( TQMap<uint, Qt::PenStyle>::ConstIterator it = _datasetLineStyles.begin(); {for( TQMap<uint, TQt::PenStyle>::ConstIterator it = _datasetLineStyles.begin();
it != _datasetLineStyles.end(); ++it ) { it != _datasetLineStyles.end(); ++it ) {
TQDomElement lineStyleElement = doc.createElement( "DatasetLineStyle" ); TQDomElement lineStyleElement = doc.createElement( "DatasetLineStyle" );
lineSettingsElement.appendChild( lineStyleElement ); lineSettingsElement.appendChild( lineStyleElement );
@ -789,7 +789,7 @@ TQDomDocument KDChartParams::saveXML( bool withPI ) const
KDXML::createStringNode( doc, legendSettingsElement, "Position", KDXML::createStringNode( doc, legendSettingsElement, "Position",
KDChartParams::legendPositionToString( _legendPosition ) ); KDChartParams::legendPositionToString( _legendPosition ) );
// the Qt::Orientation element // the Orientation element
KDXML::createOrientationNode( doc, legendSettingsElement, KDXML::createOrientationNode( doc, legendSettingsElement,
"Orientation", _legendOrientation ); "Orientation", _legendOrientation );
@ -1577,7 +1577,7 @@ bool KDChartParams::loadXML( const TQDomDocument& doc )
} else if( tagName == "DatasetLineStyle" ) { } else if( tagName == "DatasetLineStyle" ) {
bool ok = true; bool ok = true;
uint dataset; uint dataset;
Qt::PenStyle style = Qt::SolidLine; TQt::PenStyle style = TQt::SolidLine;
if( element.hasAttribute( "Dataset" ) && if( element.hasAttribute( "Dataset" ) &&
element.hasAttribute( "Style" ) ) { element.hasAttribute( "Style" ) ) {
dataset = element.attribute( "Dataset" ).toUInt( &ok ); dataset = element.attribute( "Dataset" ).toUInt( &ok );
@ -1885,7 +1885,7 @@ bool KDChartParams::loadXML( const TQDomDocument& doc )
if( KDXML::readStringNode( element, string ) ) if( KDXML::readStringNode( element, string ) )
_legendPosition = KDChartParams::stringToLegendPosition( string ); _legendPosition = KDChartParams::stringToLegendPosition( string );
} else if( tagName == "Orientation" ) { } else if( tagName == "Orientation" ) {
Qt::Orientation value=Qt::Vertical; TQt::Orientation value=TQt::Vertical;
if( KDXML::readOrientationNode( element, value ) ) if( KDXML::readOrientationNode( element, value ) )
_legendOrientation = value; _legendOrientation = value;
} else if( tagName == "ShowLines" ) { } else if( tagName == "ShowLines" ) {
@ -2316,7 +2316,7 @@ void dataCoordToElementAttr(const TQVariant& val, TQDomElement& element, const T
element.setAttribute( "StringValue"+postfix, val.toString() ); element.setAttribute( "StringValue"+postfix, val.toString() );
else if( TQVariant::DateTime == val.type() ) else if( TQVariant::DateTime == val.type() )
element.setAttribute( "DateTimeValue"+postfix, element.setAttribute( "DateTimeValue"+postfix,
val.toDateTime().toString( Qt::ISODate ) ); val.toDateTime().toString( TQt::ISODate ) );
else else
element.setAttribute( "NoValue"+postfix, "true" ); element.setAttribute( "NoValue"+postfix, "true" );
} }

@ -122,7 +122,7 @@ void KDChartPropertySet::fillValueMembersWithDummyValues()
// fill with dummy values to avoid problems when saving us into a stream // fill with dummy values to avoid problems when saving us into a stream
mLineWidth = 1; mLineWidth = 1;
mLineColor = TQt::black; mLineColor = TQt::black;
mLineStyle = Qt::SolidLine; mLineStyle = TQt::SolidLine;
mShowMarker = true; mShowMarker = true;
mMarkerAlign = TQt::AlignCenter; mMarkerAlign = TQt::AlignCenter;
mMarkerSize = TQSize(6,6); mMarkerSize = TQSize(6,6);
@ -133,7 +133,7 @@ void KDChartPropertySet::fillValueMembersWithDummyValues()
mExtraLinesLength = -20; mExtraLinesLength = -20;
mExtraLinesWidth = 1; mExtraLinesWidth = 1;
mExtraLinesColor = TQt::black; mExtraLinesColor = TQt::black;
mExtraLinesStyle = Qt::SolidLine; mExtraLinesStyle = TQt::SolidLine;
mExtraMarkersAlign = TQt::AlignLeft|TQt::AlignTop; mExtraMarkersAlign = TQt::AlignLeft|TQt::AlignTop;
mExtraMarkersSize = TQSize(6,6); mExtraMarkersSize = TQSize(6,6);
mExtraMarkersColor = TQt::black; mExtraMarkersColor = TQt::black;

@ -521,7 +521,7 @@ public slots:
\sa setLineWidth, setLineColor, setShowMarker \sa setLineWidth, setLineColor, setShowMarker
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker \sa hasOwnLineWidth, hasOwnLineColor, hasOwnLineStyle, hasOwnShowMarker
*/ */
void setLineStyle( int idLineStyle, const Qt::PenStyle& lineStyle ) void setLineStyle( int idLineStyle, const TQt::PenStyle& lineStyle )
{ {
mIdLineStyle = idLineStyle; mIdLineStyle = idLineStyle;
mLineStyle = lineStyle; mLineStyle = lineStyle;
@ -559,7 +559,7 @@ public slots:
\sa setLineWidth, setLineColor, setLineStyle, setShowMarker \sa setLineWidth, setLineColor, setLineStyle, setShowMarker
\sa hasOwnLineWidth, hasOwnLineColor, hasOwnShowMarker \sa hasOwnLineWidth, hasOwnLineColor, hasOwnShowMarker
*/ */
bool hasOwnLineStyle( int& idLineStyle, Qt::PenStyle& lineStyle ) bool hasOwnLineStyle( int& idLineStyle, TQt::PenStyle& lineStyle )
{ {
idLineStyle = mIdLineStyle; idLineStyle = mIdLineStyle;
if( OwnID == mIdLineStyle ){ if( OwnID == mIdLineStyle ){
@ -877,12 +877,12 @@ public slots:
} }
return false; return false;
} }
void setExtraLinesStyle( int idExtraLinesStyle, const Qt::PenStyle extraLinesStyle ) void setExtraLinesStyle( int idExtraLinesStyle, const TQt::PenStyle extraLinesStyle )
{ {
mIdExtraLinesStyle = idExtraLinesStyle; mIdExtraLinesStyle = idExtraLinesStyle;
mExtraLinesStyle = extraLinesStyle; mExtraLinesStyle = extraLinesStyle;
} }
bool hasOwnExtraLinesStyle( int& idExtraLinesStyle, Qt::PenStyle& extraLinesStyle ) bool hasOwnExtraLinesStyle( int& idExtraLinesStyle, TQt::PenStyle& extraLinesStyle )
{ {
idExtraLinesStyle = mIdExtraLinesStyle; idExtraLinesStyle = mIdExtraLinesStyle;
if( OwnID == idExtraLinesStyle ){ if( OwnID == idExtraLinesStyle ){
@ -961,7 +961,7 @@ private:
// IDs: values used if ID == OwnID: // IDs: values used if ID == OwnID:
int mIdLineWidth; int mLineWidth; int mIdLineWidth; int mLineWidth;
int mIdLineColor; TQColor mLineColor; int mIdLineColor; TQColor mLineColor;
int mIdLineStyle; Qt::PenStyle mLineStyle; int mIdLineStyle; TQt::PenStyle mLineStyle;
int mIdShowMarker; bool mShowMarker; int mIdShowMarker; bool mShowMarker;
int mIdMarkerSize; TQSize mMarkerSize; int mIdMarkerSize; TQSize mMarkerSize;
int mIdMarkerColor; TQColor mMarkerColor; int mIdMarkerColor; TQColor mMarkerColor;
@ -972,7 +972,7 @@ private:
int mIdExtraLinesLength; int mExtraLinesLength; int mIdExtraLinesLength; int mExtraLinesLength;
int mIdExtraLinesWidth; int mExtraLinesWidth; int mIdExtraLinesWidth; int mExtraLinesWidth;
int mIdExtraLinesColor; TQColor mExtraLinesColor; int mIdExtraLinesColor; TQColor mExtraLinesColor;
int mIdExtraLinesStyle; Qt::PenStyle mExtraLinesStyle; int mIdExtraLinesStyle; TQt::PenStyle mExtraLinesStyle;
int mIdExtraMarkersAlign; uint mExtraMarkersAlign; int mIdExtraMarkersAlign; uint mExtraMarkersAlign;
int mIdExtraMarkersSize; TQSize mExtraMarkersSize; int mIdExtraMarkersSize; TQSize mExtraMarkersSize;
int mIdExtraMarkersColor; TQColor mExtraMarkersColor; int mIdExtraMarkersColor; TQColor mExtraMarkersColor;

@ -175,10 +175,10 @@ void KDChartWidget::mousePressEvent( TQMouseEvent* event )
//while ( ( current = it.current() ) ) { //while ( ( current = it.current() ) ) {
if ( current->contains( event->pos() ) ) { if ( current->contains( event->pos() ) ) {
_mousePressedOnRegion = current; _mousePressedOnRegion = current;
if ( event->button() == Qt::LeftButton ){ if ( event->button() == TQt::LeftButton ){
emit dataLeftPressed( current->row, current->col ); emit dataLeftPressed( current->row, current->col );
emit dataLeftPressed( event->pos() ); emit dataLeftPressed( event->pos() );
}else if ( event->button() == Qt::MidButton ){ }else if ( event->button() == TQt::MidButton ){
emit dataMiddlePressed( current->row, current->col ); emit dataMiddlePressed( current->row, current->col );
emit dataMiddlePressed( event->pos() ); emit dataMiddlePressed( event->pos() );
}else{ }else{
@ -204,14 +204,14 @@ void KDChartWidget::mouseReleaseEvent( TQMouseEvent* event )
while ( ( current = it.current() ) ) { while ( ( current = it.current() ) ) {
++it; ++it;
if ( current->contains( event->pos() ) ) { if ( current->contains( event->pos() ) ) {
if ( event->button() == Qt::LeftButton ) { if ( event->button() == TQt::LeftButton ) {
emit dataLeftReleased( current->row, current->col ); emit dataLeftReleased( current->row, current->col );
emit dataLeftReleased( event->pos() ); emit dataLeftReleased( event->pos() );
if ( _mousePressedOnRegion == current ){ if ( _mousePressedOnRegion == current ){
emit dataLeftClicked( current->row, current->col ); emit dataLeftClicked( current->row, current->col );
emit dataLeftClicked( event->pos() ); emit dataLeftClicked( event->pos() );
} }
} else if ( event->button() == Qt::MidButton ) { } else if ( event->button() == TQt::MidButton ) {
emit dataMiddleReleased( current->row, current->col ); emit dataMiddleReleased( current->row, current->col );
emit dataMiddleReleased( event->pos() ); emit dataMiddleReleased( event->pos() );
if ( _mousePressedOnRegion == current ){ if ( _mousePressedOnRegion == current ){

@ -51,13 +51,13 @@ namespace KDXML {
void createOrientationNode( TQDomDocument& doc, TQDomNode& parent, void createOrientationNode( TQDomDocument& doc, TQDomNode& parent,
const TQString& elementName, Qt::Orientation value ) const TQString& elementName, TQt::Orientation value )
{ {
TQDomElement newElement = TQDomElement newElement =
doc.createElement( elementName ); doc.createElement( elementName );
parent.appendChild( newElement ); parent.appendChild( newElement );
TQDomText elementContent = TQDomText elementContent =
doc.createTextNode( (Qt::Vertical == value) ? "vertical" : "horizontal" ); doc.createTextNode( (TQt::Vertical == value) ? "vertical" : "horizontal" );
newElement.appendChild( elementContent ); newElement.appendChild( elementContent );
} }
@ -279,7 +279,7 @@ namespace KDXML {
} }
TQString penStyleToString( Qt::PenStyle style ) TQString penStyleToString( TQt::PenStyle style )
{ {
switch( style ) { switch( style ) {
case TQt::NoPen: case TQt::NoPen:
@ -301,39 +301,39 @@ namespace KDXML {
TQString brushStyleToString( Qt::BrushStyle style ) TQString brushStyleToString( TQt::BrushStyle style )
{ {
// PENDING(kalle) Support custom patterns // PENDING(kalle) Support custom patterns
switch( style ) { switch( style ) {
case Qt::NoBrush: case TQt::NoBrush:
return "NoBrush"; return "NoBrush";
case Qt::SolidPattern: case TQt::SolidPattern:
return "SolidPattern"; return "SolidPattern";
case Qt::Dense1Pattern: case TQt::Dense1Pattern:
return "Dense1Pattern"; return "Dense1Pattern";
case Qt::Dense2Pattern: case TQt::Dense2Pattern:
return "Dense2Pattern"; return "Dense2Pattern";
case Qt::Dense3Pattern: case TQt::Dense3Pattern:
return "Dense3Pattern"; return "Dense3Pattern";
case Qt::Dense4Pattern: case TQt::Dense4Pattern:
return "Dense4Pattern"; return "Dense4Pattern";
case Qt::Dense5Pattern: case TQt::Dense5Pattern:
return "Dense5Pattern"; return "Dense5Pattern";
case Qt::Dense6Pattern: case TQt::Dense6Pattern:
return "Dense6Pattern"; return "Dense6Pattern";
case Qt::Dense7Pattern: case TQt::Dense7Pattern:
return "Dense7Pattern"; return "Dense7Pattern";
case Qt::HorPattern: case TQt::HorPattern:
return "HorPattern"; return "HorPattern";
case Qt::VerPattern: case TQt::VerPattern:
return "VerPattern"; return "VerPattern";
case Qt::CrossPattern: case TQt::CrossPattern:
return "CrossPattern"; return "CrossPattern";
case Qt::BDiagPattern: case TQt::BDiagPattern:
return "BDiagPattern"; return "BDiagPattern";
case Qt::FDiagPattern: case TQt::FDiagPattern:
return "FDiagPattern"; return "FDiagPattern";
case Qt::DiagCrossPattern: case TQt::DiagCrossPattern:
return "DiagCrossPattern"; return "DiagCrossPattern";
default: // should not happen (but can for a custom pattern) default: // should not happen (but can for a custom pattern)
return "SolidPattern"; return "SolidPattern";
@ -381,13 +381,13 @@ namespace KDXML {
} }
bool readOrientationNode( const TQDomElement& element, Qt::Orientation& value ) bool readOrientationNode( const TQDomElement& element, TQt::Orientation& value )
{ {
if( element.text() == "vertical" ) { if( element.text() == "vertical" ) {
value = Qt::Vertical; value = TQt::Vertical;
return true; return true;
} else if( element.text() == "horizontal" ) { } else if( element.text() == "horizontal" ) {
value = Qt::Horizontal; value = TQt::Horizontal;
return true; return true;
} else } else
return false; return false;
@ -443,7 +443,7 @@ namespace KDXML {
{ {
bool ok = true; bool ok = true;
TQColor tempColor; TQColor tempColor;
Qt::BrushStyle tempStyle=Qt::SolidPattern; TQt::BrushStyle tempStyle=TQt::SolidPattern;
TQPixmap tempPixmap; TQPixmap tempPixmap;
TQDomNode node = element.firstChild(); TQDomNode node = element.firstChild();
while( !node.isNull() ) { while( !node.isNull() ) {
@ -551,7 +551,7 @@ namespace KDXML {
bool ok = true; bool ok = true;
int tempWidth; int tempWidth;
TQColor tempColor; TQColor tempColor;
Qt::PenStyle tempStyle=Qt::SolidLine; TQt::PenStyle tempStyle=TQt::SolidLine;
TQDomNode node = element.firstChild(); TQDomNode node = element.firstChild();
while( !node.isNull() ) { while( !node.isNull() ) {
TQDomElement element = node.toElement(); TQDomElement element = node.toElement();
@ -747,60 +747,60 @@ namespace KDXML {
Qt::PenStyle stringToPenStyle( const TQString& style ) TQt::PenStyle stringToPenStyle( const TQString& style )
{ {
if( style == "NoPen" ) if( style == "NoPen" )
return Qt::NoPen; return TQt::NoPen;
else if( style == "SolidLine" ) else if( style == "SolidLine" )
return Qt::SolidLine; return TQt::SolidLine;
else if( style == "DashLine" ) else if( style == "DashLine" )
return Qt::DashLine; return TQt::DashLine;
else if( style == "DotLine" ) else if( style == "DotLine" )
return Qt::DotLine; return TQt::DotLine;
else if( style == "DashDotLine" ) else if( style == "DashDotLine" )
return Qt::DashDotLine; return TQt::DashDotLine;
else if( style == "DashDotDotLine" ) else if( style == "DashDotDotLine" )
return Qt::DashDotDotLine; return TQt::DashDotDotLine;
else // should not happen else // should not happen
return Qt::SolidLine; return TQt::SolidLine;
} }
Qt::BrushStyle stringToBrushStyle( const TQString& style ) TQt::BrushStyle stringToBrushStyle( const TQString& style )
{ {
// PENDING(kalle) Support custom patterns // PENDING(kalle) Support custom patterns
if( style == "NoBrush" ) if( style == "NoBrush" )
return Qt::NoBrush; return TQt::NoBrush;
else if( style == "SolidPattern" ) else if( style == "SolidPattern" )
return Qt::SolidPattern; return TQt::SolidPattern;
else if( style == "Dense1Pattern" ) else if( style == "Dense1Pattern" )
return Qt::Dense1Pattern; return TQt::Dense1Pattern;
else if( style == "Dense2Pattern" ) else if( style == "Dense2Pattern" )
return Qt::Dense2Pattern; return TQt::Dense2Pattern;
else if( style == "Dense3Pattern" ) else if( style == "Dense3Pattern" )
return Qt::Dense3Pattern; return TQt::Dense3Pattern;
else if( style == "Dense4Pattern" ) else if( style == "Dense4Pattern" )
return Qt::Dense4Pattern; return TQt::Dense4Pattern;
else if( style == "Dense5Pattern" ) else if( style == "Dense5Pattern" )
return Qt::Dense5Pattern; return TQt::Dense5Pattern;
else if( style == "Dense6Pattern" ) else if( style == "Dense6Pattern" )
return Qt::Dense6Pattern; return TQt::Dense6Pattern;
else if( style == "Dense7Pattern" ) else if( style == "Dense7Pattern" )
return Qt::Dense7Pattern; return TQt::Dense7Pattern;
else if( style == "HorPattern" ) else if( style == "HorPattern" )
return Qt::HorPattern; return TQt::HorPattern;
else if( style == "VerPattern" ) else if( style == "VerPattern" )
return Qt::VerPattern; return TQt::VerPattern;
else if( style == "CrossPattern" ) else if( style == "CrossPattern" )
return Qt::CrossPattern; return TQt::CrossPattern;
else if( style == "BDiagPattern" ) else if( style == "BDiagPattern" )
return Qt::BDiagPattern; return TQt::BDiagPattern;
else if( style == "FDiagPattern" ) else if( style == "FDiagPattern" )
return Qt::FDiagPattern; return TQt::FDiagPattern;
else if( style == "DiagCrossPattern" ) else if( style == "DiagCrossPattern" )
return Qt::DiagCrossPattern; return TQt::DiagCrossPattern;
else // should not happen (but can with custom patterns) else // should not happen (but can with custom patterns)
return Qt::SolidPattern; return TQt::SolidPattern;
} }
} }

@ -44,15 +44,15 @@
#include <tqdatetime.h> #include <tqdatetime.h>
namespace KDXML { namespace KDXML {
TQString penStyleToString( Qt::PenStyle style ); TQString penStyleToString( TQt::PenStyle style );
Qt::PenStyle stringToPenStyle( const TQString& style ); TQt::PenStyle stringToPenStyle( const TQString& style );
TQString brushStyleToString( Qt::BrushStyle style ); TQString brushStyleToString( TQt::BrushStyle style );
Qt::BrushStyle stringToBrushStyle( const TQString& style ); TQt::BrushStyle stringToBrushStyle( const TQString& style );
void createBoolNode( TQDomDocument& doc, TQDomNode& parent, void createBoolNode( TQDomDocument& doc, TQDomNode& parent,
const TQString& elementName, bool value ); const TQString& elementName, bool value );
void createOrientationNode( TQDomDocument& doc, TQDomNode& parent, void createOrientationNode( TQDomDocument& doc, TQDomNode& parent,
const TQString& elementName, Qt::Orientation value ); const TQString& elementName, TQt::Orientation value );
void createSizeNode( TQDomDocument& doc, TQDomNode& parent, void createSizeNode( TQDomDocument& doc, TQDomNode& parent,
const TQString& elementName, const TQSize& value ); const TQString& elementName, const TQSize& value );
void createIntNode( TQDomDocument& doc, TQDomNode& parent, void createIntNode( TQDomDocument& doc, TQDomNode& parent,
@ -89,7 +89,7 @@ namespace KDXML {
bool readStringNode( const TQDomElement& element, TQString& value ); bool readStringNode( const TQDomElement& element, TQString& value );
bool readDoubleNode( const TQDomElement& element, double& value ); bool readDoubleNode( const TQDomElement& element, double& value );
bool readBoolNode( const TQDomElement& element, bool& value ); bool readBoolNode( const TQDomElement& element, bool& value );
bool readOrientationNode( const TQDomElement& element, Qt::Orientation& value ); bool readOrientationNode( const TQDomElement& element, TQt::Orientation& value );
bool readSizeNode( const TQDomElement& element, TQSize& value ); bool readSizeNode( const TQDomElement& element, TQSize& value );
bool readColorNode( const TQDomElement& element, TQColor& value ); bool readColorNode( const TQDomElement& element, TQColor& value );
bool readBrushNode( const TQDomElement& element, TQBrush& brush ); bool readBrushNode( const TQDomElement& element, TQBrush& brush );

@ -565,7 +565,7 @@ void KGPGFile::publicKeyList(TQStringList& list, const TQString& pattern)
TQStringList fields = TQStringList::split(":", (*it), true); TQStringList fields = TQStringList::split(":", (*it), true);
TQString val; TQString val;
if(fields[0] == "pub") { if(fields[0] == "pub") {
TQDate expiration = TQDate::fromString(fields[6], Qt::ISODate); TQDate expiration = TQDate::fromString(fields[6], TQt::ISODate);
if(expiration > TQDate::currentDate()) { if(expiration > TQDate::currentDate()) {
currentKey = fields[4]; currentKey = fields[4];
val = TQString("%1:%2").arg(currentKey).arg(fields[9]); val = TQString("%1:%2").arg(currentKey).arg(fields[9]);

@ -15159,8 +15159,8 @@ msgstr ""
#~ msgstr "PriceInfo" #~ msgstr "PriceInfo"
#~ msgctxt "Duplicate split" #~ msgctxt "Duplicate split"
#~ msgid "Qt::CTRL+c" #~ msgid "Ctrl+c"
#~ msgstr "Qt::CTRL+c" #~ msgstr "Ctrl+c"
#~ msgctxt "Split transaction (category replacement)" #~ msgctxt "Split transaction (category replacement)"
#~ msgid "Split transaction" #~ msgid "Split transaction"

Loading…
Cancel
Save