bool KEduVocDocument::sort(int index, Qt::SortOrder order)
{
bool result = false;
- if (m_sortingEnabled && index < numIdentifiers())
+ if (m_sortingEnabled && index < identifierCount())
{
if (m_sortIdentifier.count() < m_identifiers.count())
for (int i = m_sortIdentifier.count(); i < (int) m_identifiers.count(); i++)
bool KEduVocDocument::sort(int index)
{
bool result = false;
- if (m_sortingEnabled && index < numIdentifiers())
+ if (m_sortingEnabled && index < identifierCount())
{
if (m_sortIdentifier.count() < m_identifiers.count())
for (int i = m_sortIdentifier.count(); i < (int) m_identifiers.count(); i++)
if (first < 0)
first = 0;
- if (id >= numIdentifiers() || last < first)
+ if (id >= identifierCount() || last < first)
return -1;
if (id == 0) {
bool equal = true;
if (kve1->original() == kve2->original() ) {
- for (int l = 1; equal && l < (int) numIdentifiers(); l++ )
+ for (int l = 1; equal && l < identifierCount(); l++ )
if (kve1->translation(l) != kve2->translation(l))
equal = false;
/**
* @returns the number of different identifiers (usually languages)
*/
- inline int numIdentifiers() const { return m_identifiers.count(); } // org + translations
+ inline int identifierCount() const { return m_identifiers.count(); } // org + translations
/**
* Appends a new identifier (usually a language)
QString lang;
attribute = currentElement.attributeNode(KV_LANG);
- if (m_doc->numIdentifiers() <= i)
+ if (m_doc->identifierCount() <= i)
{
// first entry
if (!attribute.isNull()) // no definition in first entry
QString lang;
QDomAttr domAttrLang = domElementConjugChild.attributeNode(KV_LANG);
- if (m_doc->numIdentifiers() <= count)
+ if (m_doc->identifierCount() <= count)
{
// first entry
if (!domAttrLang.isNull()) // no definition in first entry
q_trans = lang;
}
- if (m_doc->numIdentifiers() == 0)
+ if (m_doc->identifierCount() == 0)
{
// first entry
if (lang.isEmpty()) // no definition in first entry
}
- if (m_doc->numIdentifiers() <= count)
+ if (m_doc->identifierCount() <= count)
{
// new translation
if (lang.isEmpty())
{
// no definition in first entry ?
- lang.setNum(m_doc->numIdentifiers());
+ lang.setNum(m_doc->identifierCount());
lang.prepend("translation ");
}
m_doc->appendIdentifier(lang);
domElementKvtml.setAttribute(KV_ENCODING, (QString) "UTF-8");
domElementKvtml.setAttribute(KV_GENERATOR, generator);
- domElementKvtml.setAttribute(KV_COLS, m_doc->numIdentifiers());
+ domElementKvtml.setAttribute(KV_COLS, m_doc->identifierCount());
domElementKvtml.setAttribute(KV_LINES, m_doc->numEntries());
if (!m_doc->title().isEmpty())
domElementExpression.appendChild(domElementOriginal);
int trans = 1;
- while (trans < m_doc->numIdentifiers())
+ while (trans < m_doc->identifierCount())
{
QDomElement domElementTranslation = domDoc.createElement(KV_TRANS);
if (first_expr)
QString indef;
QString s;
- for (int lfn = 0; lfn < qMin(m_doc->articleCount(), m_doc->numIdentifiers()); lfn++)
+ for (int lfn = 0; lfn < qMin(m_doc->articleCount(), m_doc->identifierCount()); lfn++)
{
QDomElement domElementEntry = domDoc.createElement(KV_ART_ENTRY);
if (lfn == 0)
QDomElement domElementConjug = domDoc.createElement(KV_CONJUG_GRP);
QString s;
- for (int ent = 0; ent < qMin(curr_conjug.count(), m_doc->numIdentifiers()); ent++)
+ for (int ent = 0; ent < qMin(curr_conjug.count(), m_doc->identifierCount()); ent++)
{
QDomElement domElementEntry = domDoc.createElement(KV_CON_ENTRY);