summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneysplit.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 06:00:29 +0000
commitfecb0e67b23e8b83ba7fc881bb57bc48c0852d62 (patch)
tree6b8614802f0d01b353bc9ba78aff2090846c198e /kmymoney2/mymoney/mymoneysplit.cpp
parentdadc34655c3ab961b0b0b94a10eaaba710f0b5e8 (diff)
downloadkmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.tar.gz
kmymoney-fecb0e67b23e8b83ba7fc881bb57bc48c0852d62.zip
TQt4 port kmymoney
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239855 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmymoney2/mymoney/mymoneysplit.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneysplit.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/kmymoney2/mymoney/mymoneysplit.cpp b/kmymoney2/mymoney/mymoneysplit.cpp
index a19ff43..4af052d 100644
--- a/kmymoney2/mymoney/mymoneysplit.cpp
+++ b/kmymoney2/mymoney/mymoneysplit.cpp
@@ -44,7 +44,7 @@ MyMoneySplit::MyMoneySplit()
m_reconcileFlag = NotReconciled;
}
-MyMoneySplit::MyMoneySplit(const QDomElement& node) :
+MyMoneySplit::MyMoneySplit(const TQDomElement& node) :
MyMoneyObject(node, false),
MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement())
{
@@ -53,20 +53,20 @@ MyMoneySplit::MyMoneySplit(const QDomElement& node) :
clearId();
- m_payee = QStringEmpty(node.attribute("payee"));
- m_reconcileDate = stringToDate(QStringEmpty(node.attribute("reconciledate")));
- m_action = QStringEmpty(node.attribute("action"));
+ m_payee = TQStringEmpty(node.attribute("payee"));
+ m_reconcileDate = stringToDate(TQStringEmpty(node.attribute("reconciledate")));
+ m_action = TQStringEmpty(node.attribute("action"));
m_reconcileFlag = static_cast<MyMoneySplit::reconcileFlagE>(node.attribute("reconcileflag").toInt());
- m_memo = QStringEmpty(node.attribute("memo"));
- m_value = MyMoneyMoney(QStringEmpty(node.attribute("value")));
- m_shares = MyMoneyMoney(QStringEmpty(node.attribute("shares")));
- m_price = MyMoneyMoney(QStringEmpty(node.attribute("price")));
- m_account = QStringEmpty(node.attribute("account"));
- m_number = QStringEmpty(node.attribute("number"));
- m_bankID = QStringEmpty(node.attribute("bankid"));
+ m_memo = TQStringEmpty(node.attribute("memo"));
+ m_value = MyMoneyMoney(TQStringEmpty(node.attribute("value")));
+ m_shares = MyMoneyMoney(TQStringEmpty(node.attribute("shares")));
+ m_price = MyMoneyMoney(TQStringEmpty(node.attribute("price")));
+ m_account = TQStringEmpty(node.attribute("account"));
+ m_number = TQStringEmpty(node.attribute("number"));
+ m_bankID = TQStringEmpty(node.attribute("bankid"));
}
-MyMoneySplit::MyMoneySplit(const QString& id, const MyMoneySplit& right) :
+MyMoneySplit::MyMoneySplit(const TQString& id, const MyMoneySplit& right) :
MyMoneyObject(id)
{
*this = right;
@@ -94,17 +94,17 @@ bool MyMoneySplit::operator == (const MyMoneySplit& right) const
m_transactionId == right.m_transactionId;
}
-void MyMoneySplit::setAccountId(const QString& account)
+void MyMoneySplit::setAccountId(const TQString& account)
{
m_account = account;
}
-void MyMoneySplit::setMemo(const QString& memo)
+void MyMoneySplit::setMemo(const TQString& memo)
{
m_memo = memo;
}
-void MyMoneySplit::setReconcileDate(const QDate& date)
+void MyMoneySplit::setReconcileDate(const TQDate& date)
{
m_reconcileDate = date;
}
@@ -124,7 +124,7 @@ void MyMoneySplit::setValue(const MyMoneyMoney& value)
m_value = value;
}
-void MyMoneySplit::setValue(const MyMoneyMoney& value, const QString& transactionCurrencyId, const QString& splitCurrencyId)
+void MyMoneySplit::setValue(const MyMoneyMoney& value, const TQString& transactionCurrencyId, const TQString& splitCurrencyId)
{
if(transactionCurrencyId == splitCurrencyId)
setValue(value);
@@ -132,7 +132,7 @@ void MyMoneySplit::setValue(const MyMoneyMoney& value, const QString& transactio
setShares(value);
}
-void MyMoneySplit::setPayeeId(const QString& payee)
+void MyMoneySplit::setPayeeId(const TQString& payee)
{
m_payee = payee;
}
@@ -165,17 +165,17 @@ void MyMoneySplit::setAction(investTransactionTypeE type)
}
}
-void MyMoneySplit::setAction(const QString& action)
+void MyMoneySplit::setAction(const TQString& action)
{
m_action = action;
}
-void MyMoneySplit::setNumber(const QString& number)
+void MyMoneySplit::setNumber(const TQString& number)
{
m_number = number;
}
-const MyMoneyMoney MyMoneySplit::value(const QString& transactionCurrencyId, const QString& splitCurrencyId) const
+const MyMoneyMoney MyMoneySplit::value(const TQString& transactionCurrencyId, const TQString& splitCurrencyId) const
{
return (transactionCurrencyId == splitCurrencyId) ? m_value : m_shares;
}
@@ -194,9 +194,9 @@ MyMoneyMoney MyMoneySplit::price(void) const
return MyMoneyMoney(1,1);
}
-void MyMoneySplit::writeXML(QDomDocument& document, QDomElement& parent) const
+void MyMoneySplit::writeXML(TQDomDocument& document, TQDomElement& tqparent) const
{
- QDomElement el = document.createElement("SPLIT");
+ TQDomElement el = document.createElement("SPLIT");
writeBaseXML(document, el);
@@ -217,10 +217,10 @@ void MyMoneySplit::writeXML(QDomDocument& document, QDomElement& parent) const
MyMoneyKeyValueContainer::writeXML(document, el);
- parent.appendChild(el);
+ tqparent.appendChild(el);
}
-bool MyMoneySplit::hasReferenceTo(const QString& id) const
+bool MyMoneySplit::hasReferenceTo(const TQString& id) const
{
bool rc = false;
if(isMatched()) {
@@ -239,12 +239,12 @@ void MyMoneySplit::addMatch(const MyMoneyTransaction& _t)
if(_t.isImported() && !isMatched()) {
MyMoneyTransaction t(_t);
t.clearId();
- QDomDocument doc("MATCH");
- QDomElement el = doc.createElement("CONTAINER");
+ TQDomDocument doc("MATCH");
+ TQDomElement el = doc.createElement("CONTAINER");
doc.appendChild(el);
t.writeXML(doc, el);
- QString xml = doc.toString();
- xml.replace("<", "&lt;");
+ TQString xml = doc.toString();
+ xml.tqreplace("<", "&lt;");
setValue("kmm-matched-tx", xml);
}
}
@@ -256,11 +256,11 @@ void MyMoneySplit::removeMatch(void)
MyMoneyTransaction MyMoneySplit::matchedTransaction(void) const
{
- QString xml = value("kmm-matched-tx");
+ TQString xml = value("kmm-matched-tx");
if(!xml.isEmpty()) {
- xml.replace("&lt;", "<");
- QDomDocument doc;
- QDomElement node;
+ xml.tqreplace("&lt;", "<");
+ TQDomDocument doc;
+ TQDomElement node;
doc.setContent(xml);
node = doc.documentElement().firstChild().toElement();
MyMoneyTransaction t(node, false);