summaryrefslogtreecommitdiff
path: root/src/dictionary/ICardPack.cpp
blob: d2ef03eb56ce5421a2b93587b1b28886d7f4cc9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "ICardPack.h"
#include "Field.h"

const QString ICardPack::SynonymDelimiter = ";";
const QString ICardPack::HomonymDelimiter = "; ";

QString ICardPack::getQuestionFieldName() const
{
    const Field* questionField = getQuestionField();
    if(questionField)
        return questionField->name();
    else
        return QString();
}

QStringList ICardPack::getAnswerFieldNames() const
{
    QStringList list;
    foreach(const Field* field, getAnswerFields())
        if(field)
            list << field->name();
    return list;
}