diff options
author | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
---|---|---|
committer | Jedidiah Barber <contact@jedbarber.id.au> | 2021-07-14 11:49:10 +1200 |
commit | d24f813f3f2a05c112e803e4256b53535895fc98 (patch) | |
tree | 601e6ae9a1cd44bcfdcf91739a5ca36aedd827c9 /src/dictionary/ICardPack.cpp |
Diffstat (limited to 'src/dictionary/ICardPack.cpp')
-rw-r--r-- | src/dictionary/ICardPack.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/dictionary/ICardPack.cpp b/src/dictionary/ICardPack.cpp new file mode 100644 index 0000000..d2ef03e --- /dev/null +++ b/src/dictionary/ICardPack.cpp @@ -0,0 +1,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; +} |