#include <Vocabulary.h>
Public Types | |
typedef QMap< int, Term > | TermMap |
Public Member Functions | |
Vocabulary (int id=-1, const QString &title=QString::null) | |
Vocabulary (const Vocabulary &voc) | |
virtual | ~Vocabulary () |
const char * | className () const |
int | getId () const |
int | getMaxId () const |
bool | isMarkedForStudy () const |
void | setMarkedForStudy (bool isMarkedForStudy) |
bool | isMarkedForDeletion () const |
void | setMarkedForDeletion (bool isMarkedForDeletion) |
const QString | getTitle () const |
void | setTitle (const QString &title) |
const QString | getDescription () const |
void | setDescription (const QString &desc) |
const QString | getAuthor () const |
void | setAuthor (const QString &author) |
const QDateTime | getCreationDate () const |
void | setCreationDate (const QDateTime &date) |
const QDateTime | getModificationDate () const |
void | setModificationDate (const QDateTime &date) |
void | addTerm (const Term &term) |
void | removeTerm (const int &id) |
bool | isTermExists (const int &id) const |
Term & | getTerm (const int &id) |
const uint | getSize () const |
bool | isEmpty () const |
void | getItemsCount (uint *termCount, uint *checkedTermCount, uint *selectedTermCount, bool isReachableFromRoot, const QString &firstLang=QString::null, const QString &testLang=QString::null) const |
int | getMaxTermId () const |
bool | containsTermWithTranslations (const QString &lang1, const QString &lang2) const |
QStringList | getTranslationLanguages () const |
void | removeTranslations (const QStringList &languages) |
TermMap::ConstIterator | begin () const |
TermMap::ConstIterator | end () const |
TermMap::Iterator | begin () |
TermMap::Iterator | end () |
bool | isDirty () const |
void | setDirty (bool isDirty) |
Folder * | getParent () const |
void | setParent (Folder *parent) |
bool | load (const QString &filename) |
bool | save (const QString &filename) const |
Static Public Member Functions | |
static const Q_UINT32 | magicNumber (Q_UINT32(0x22446688)) |
Friends | |
QDataStream & | operator<< (QDataStream &out, const Vocabulary &vocab) |
QDataStream & | operator>> (QDataStream &in, Vocabulary &vocab) |
Definition at line 17 of file Vocabulary.h.
typedef QMap<int, Term> Vocabulary::TermMap |
Definition at line 23 of file Vocabulary.h.
Vocabulary::Vocabulary | ( | int | id = -1 , |
|
const QString & | title = QString::null | |||
) |
Definition at line 3 of file Vocabulary.cpp.
Vocabulary::Vocabulary | ( | const Vocabulary & | voc | ) |
Definition at line 10 of file Vocabulary.cpp.
Vocabulary::~Vocabulary | ( | ) | [virtual] |
Definition at line 20 of file Vocabulary.cpp.
static const Q_UINT32 Vocabulary::magicNumber | ( | Q_UINT32(0x22446688) | ) | [static] |
const char* Vocabulary::className | ( | ) | const [inline, virtual] |
int Vocabulary::getId | ( | ) | const |
Definition at line 23 of file Vocabulary.cpp.
int Vocabulary::getMaxId | ( | ) | const |
bool Vocabulary::isMarkedForStudy | ( | ) | const |
Definition at line 27 of file Vocabulary.cpp.
void Vocabulary::setMarkedForStudy | ( | bool | isMarkedForStudy | ) |
Definition at line 31 of file Vocabulary.cpp.
bool Vocabulary::isMarkedForDeletion | ( | ) | const |
Definition at line 35 of file Vocabulary.cpp.
void Vocabulary::setMarkedForDeletion | ( | bool | isMarkedForDeletion | ) |
Definition at line 39 of file Vocabulary.cpp.
const QString Vocabulary::getTitle | ( | ) | const |
Definition at line 43 of file Vocabulary.cpp.
void Vocabulary::setTitle | ( | const QString & | title | ) |
Definition at line 48 of file Vocabulary.cpp.
const QString Vocabulary::getDescription | ( | ) | const |
Definition at line 52 of file Vocabulary.cpp.
void Vocabulary::setDescription | ( | const QString & | desc | ) |
Definition at line 56 of file Vocabulary.cpp.
const QString Vocabulary::getAuthor | ( | ) | const |
Definition at line 60 of file Vocabulary.cpp.
void Vocabulary::setAuthor | ( | const QString & | author | ) |
Definition at line 64 of file Vocabulary.cpp.
const QDateTime Vocabulary::getCreationDate | ( | ) | const |
Definition at line 68 of file Vocabulary.cpp.
void Vocabulary::setCreationDate | ( | const QDateTime & | date | ) |
Definition at line 72 of file Vocabulary.cpp.
const QDateTime Vocabulary::getModificationDate | ( | ) | const |
Definition at line 76 of file Vocabulary.cpp.
void Vocabulary::setModificationDate | ( | const QDateTime & | date | ) |
Definition at line 80 of file Vocabulary.cpp.
void Vocabulary::addTerm | ( | const Term & | term | ) |
Definition at line 84 of file Vocabulary.cpp.
void Vocabulary::removeTerm | ( | const int & | id | ) |
Definition at line 88 of file Vocabulary.cpp.
bool Vocabulary::isTermExists | ( | const int & | id | ) | const |
Definition at line 92 of file Vocabulary.cpp.
Term & Vocabulary::getTerm | ( | const int & | id | ) |
Definition at line 96 of file Vocabulary.cpp.
const uint Vocabulary::getSize | ( | ) | const |
Definition at line 104 of file Vocabulary.cpp.
bool Vocabulary::isEmpty | ( | ) | const |
Definition at line 100 of file Vocabulary.cpp.
void Vocabulary::getItemsCount | ( | uint * | termCount, | |
uint * | checkedTermCount, | |||
uint * | selectedTermCount, | |||
bool | isReachableFromRoot, | |||
const QString & | firstLang = QString::null , |
|||
const QString & | testLang = QString::null | |||
) | const |
Definition at line 108 of file Vocabulary.cpp.
int Vocabulary::getMaxTermId | ( | ) | const |
Definition at line 134 of file Vocabulary.cpp.
bool Vocabulary::containsTermWithTranslations | ( | const QString & | lang1, | |
const QString & | lang2 | |||
) | const |
Definition at line 144 of file Vocabulary.cpp.
QStringList Vocabulary::getTranslationLanguages | ( | ) | const |
Definition at line 153 of file Vocabulary.cpp.
void Vocabulary::removeTranslations | ( | const QStringList & | languages | ) |
Definition at line 166 of file Vocabulary.cpp.
Vocabulary::TermMap::ConstIterator Vocabulary::begin | ( | ) | const |
Definition at line 176 of file Vocabulary.cpp.
Vocabulary::TermMap::ConstIterator Vocabulary::end | ( | ) | const |
Definition at line 180 of file Vocabulary.cpp.
Vocabulary::TermMap::Iterator Vocabulary::begin | ( | ) |
Definition at line 184 of file Vocabulary.cpp.
Vocabulary::TermMap::Iterator Vocabulary::end | ( | ) |
Definition at line 188 of file Vocabulary.cpp.
bool Vocabulary::isDirty | ( | ) | const |
Definition at line 192 of file Vocabulary.cpp.
void Vocabulary::setDirty | ( | bool | isDirty | ) |
Definition at line 196 of file Vocabulary.cpp.
Folder * Vocabulary::getParent | ( | ) | const |
Definition at line 200 of file Vocabulary.cpp.
void Vocabulary::setParent | ( | Folder * | parent | ) |
Definition at line 204 of file Vocabulary.cpp.
bool Vocabulary::load | ( | const QString & | filename | ) |
Definition at line 208 of file Vocabulary.cpp.
bool Vocabulary::save | ( | const QString & | filename | ) | const |
Definition at line 253 of file Vocabulary.cpp.
QDataStream& operator<< | ( | QDataStream & | out, | |
const Vocabulary & | vocab | |||
) | [friend] |
Definition at line 284 of file Vocabulary.cpp.
QDataStream& operator>> | ( | QDataStream & | in, | |
Vocabulary & | vocab | |||
) | [friend] |
Definition at line 291 of file Vocabulary.cpp.