本文整理汇总了C++中MyMoneyFile::payee方法的典型用法代码示例。如果您正苦于以下问题:C++ MyMoneyFile::payee方法的具体用法?C++ MyMoneyFile::payee怎么用?C++ MyMoneyFile::payee使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MyMoneyFile
的用法示例。
在下文中一共展示了MyMoneyFile::payee方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: writeTransactionEntry
void MyMoneyQifWriter::writeTransactionEntry(QTextStream &s, const MyMoneyTransaction& t, const QString& accountId)
{
MyMoneyFile* file = MyMoneyFile::instance();
MyMoneySplit split = t.splitByAccount(accountId);
s << "D" << m_qifProfile.date(t.postDate()) << endl;
switch(split.reconcileFlag()) {
case MyMoneySplit::Cleared:
s << "C*" << endl;
break;
case MyMoneySplit::Reconciled:
case MyMoneySplit::Frozen:
s << "CX" << endl;
break;
default:
break;
}
if(split.memo().length() > 0) {
QString m = split.memo();
m.replace('\n', "\\n");
s << "M" << m << endl;
}
s << "T" << m_qifProfile.value('T', split.value()) << endl;
if(split.number().length() > 0)
s << "N" << split.number() << endl;
if(!split.payeeId().isEmpty()) {
MyMoneyPayee payee = file->payee(split.payeeId());
s << "P" << payee.name() << endl;
}
QValueList<MyMoneySplit> list = t.splits();
if(list.count() > 1) {
MyMoneySplit sp = t.splitByAccount(accountId, false);
MyMoneyAccount acc = file->account(sp.accountId());
if(acc.accountGroup() != MyMoneyAccount::Income
&& acc.accountGroup() != MyMoneyAccount::Expense) {
s << "L" << m_qifProfile.accountDelimiter()[0]
<< MyMoneyFile::instance()->accountToCategory(sp.accountId())
<< m_qifProfile.accountDelimiter()[1] << endl;
} else {
s << "L" << file->accountToCategory(sp.accountId()) << endl;
}
if(list.count() > 2) {
QValueList<MyMoneySplit>::ConstIterator it;
for(it = list.begin(); it != list.end(); ++it) {
if(!((*it) == split)) {
writeSplitEntry(s, *it);
}
}
}
}
s << "^" << endl;
}