summaryrefslogtreecommitdiffstats
path: root/kmymoney2/mymoney/mymoneysecurity.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/mymoneysecurity.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/mymoneysecurity.cpp')
-rw-r--r--kmymoney2/mymoney/mymoneysecurity.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/kmymoney2/mymoney/mymoneysecurity.cpp b/kmymoney2/mymoney/mymoneysecurity.cpp
index 73edbdb..27a1352 100644
--- a/kmymoney2/mymoney/mymoneysecurity.cpp
+++ b/kmymoney2/mymoney/mymoneysecurity.cpp
@@ -42,7 +42,7 @@ MyMoneySecurity::MyMoneySecurity() :
{
}
-MyMoneySecurity::MyMoneySecurity(const QString& id, const QString& name, const QString& symbol, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) :
+MyMoneySecurity::MyMoneySecurity(const TQString& id, const TQString& name, const TQString& symbol, const int partsPerUnit, const int smallestCashFraction, const int smallestAccountFraction) :
MyMoneyObject(id),
m_name(name),
m_securityType(SECURITY_CURRENCY)
@@ -60,24 +60,24 @@ MyMoneySecurity::MyMoneySecurity(const QString& id, const QString& name, const Q
m_smallestAccountFraction = smallestCashFraction;
}
-MyMoneySecurity::MyMoneySecurity(const QString& id, const MyMoneySecurity& equity) :
+MyMoneySecurity::MyMoneySecurity(const TQString& id, const MyMoneySecurity& equity) :
MyMoneyObject(id)
{
*this = equity;
m_id = id;
}
-MyMoneySecurity::MyMoneySecurity(const QDomElement& node) :
+MyMoneySecurity::MyMoneySecurity(const TQDomElement& node) :
MyMoneyObject(node),
MyMoneyKeyValueContainer(node.elementsByTagName("KEYVALUEPAIRS").item(0).toElement())
{
if(("SECURITY" != node.tagName())
- && ("EQUITY" != node.tagName())
+ && ("ETQUITY" != node.tagName())
&& ("CURRENCY" != node.tagName()))
throw new MYMONEYEXCEPTION("Node was not SECURITY or CURRENCY");
- setName(QStringEmpty(node.attribute("name")));
- setTradingSymbol(QStringEmpty(node.attribute("symbol")));
+ setName(TQStringEmpty(node.attribute("name")));
+ setTradingSymbol(TQStringEmpty(node.attribute("symbol")));
setSecurityType(static_cast<eSECURITYTYPE>(node.attribute("type").toInt()));
setSmallestAccountFraction(node.attribute("saf").toInt());
@@ -85,8 +85,8 @@ MyMoneySecurity::MyMoneySecurity(const QDomElement& node) :
setPartsPerUnit(node.attribute("ppu").toInt());
setSmallestCashFraction(node.attribute("scf").toInt());
} else {
- setTradingCurrency(QStringEmpty(node.attribute("trading-currency")));
- setTradingMarket(QStringEmpty(node.attribute("trading-market")));
+ setTradingCurrency(TQStringEmpty(node.attribute("trading-currency")));
+ setTradingMarket(TQStringEmpty(node.attribute("trading-market")));
}
}
@@ -118,14 +118,14 @@ bool MyMoneySecurity::operator < (const MyMoneySecurity& right) const
}
-bool MyMoneySecurity::hasReferenceTo(const QString& id) const
+bool MyMoneySecurity::hasReferenceTo(const TQString& id) const
{
return (id == m_tradingCurrency);
}
-void MyMoneySecurity::writeXML(QDomDocument& document, QDomElement& parent) const
+void MyMoneySecurity::writeXML(TQDomDocument& document, TQDomElement& tqparent) const
{
- QDomElement el;
+ TQDomElement el;
if(isCurrency())
el = document.createElement("CURRENCY");
else
@@ -148,12 +148,12 @@ void MyMoneySecurity::writeXML(QDomDocument& document, QDomElement& parent) cons
//Add in Key-Value Pairs for securities.
MyMoneyKeyValueContainer::writeXML(document, el);
- parent.appendChild(el);
+ tqparent.appendChild(el);
}
-QString MyMoneySecurity::securityTypeToString(const eSECURITYTYPE securityType)
+TQString MyMoneySecurity::securityTypeToString(const eSECURITYTYPE securityType)
{
- QString returnString;
+ TQString returnString;
switch (securityType) {
case MyMoneySecurity::SECURITY_STOCK: