libkdeedu/keduvocdocument
KEduVocDocument Class Reference
#include <keduvocdocument.h>

Detailed Description
This class contains the expressions of your vocabulary as well as other information about the vocabulary.Definition at line 43 of file keduvocdocument.h.
Member Enumeration Documentation
the return code when opening/saving
- Enumerator:
-
NoError Unknown InvalidXml FileTypeUnknown FileCannotWrite FileWriterFailed FileCannotRead FileReaderFailed FileDoesNotExist
Definition at line 62 of file keduvocdocument.h.
delete only empty lessons or also if they have entries
Definition at line 82 of file keduvocdocument.h.
Constructor & Destructor Documentation
| KEduVocDocument::KEduVocDocument | ( | QObject * | parent = 0 |
) | [explicit] |
Constructor for a KdeEdu vocabulary document.
- Parameters:
-
parent calling object
Definition at line 141 of file keduvocdocument.cpp.
| KEduVocDocument::~KEduVocDocument | ( | ) |
Member Function Documentation
| int KEduVocDocument::appendIdentifier | ( | const KEduVocIdentifier & | identifier = KEduVocIdentifier() |
) |
Appends a new identifier (usually a language).
- Parameters:
-
identifier the identifier to append. If empty default names are used.
- Returns:
- the identifier number
Definition at line 711 of file keduvocdocument.cpp.
| QString KEduVocDocument::author | ( | ) | const |
| QString KEduVocDocument::authorContact | ( | ) | const |
| QString KEduVocDocument::category | ( | ) | const |
- Returns:
- the category of the file
- Todo:
- make writer/reader use this
Definition at line 807 of file keduvocdocument.cpp.
| QString KEduVocDocument::csvDelimiter | ( | ) | const |
Returns the delimiter (separator) used for csv import and export.
The default is a single tab character
- Returns:
- the delimiter used
Definition at line 866 of file keduvocdocument.cpp.
| KEduVocDocument::FileType KEduVocDocument::detectFileType | ( | const QString & | fileName | ) | [static] |
Definition at line 161 of file keduvocdocument.cpp.
| void KEduVocDocument::docModified | ( | bool | mod | ) | [signal] |
Emitted when the document becomes modified or saved.
- Returns:
- state (true=modified)
| QString KEduVocDocument::documentComment | ( | ) | const |
| QString KEduVocDocument::errorDescription | ( | int | errorCode | ) | [static] |
Definition at line 944 of file keduvocdocument.cpp.
| QString KEduVocDocument::generator | ( | ) | const |
| KEduVocIdentifier & KEduVocDocument::identifier | ( | int | index | ) |
Returns the identifier of translation index.
- Parameters:
-
index number of translation 0..x
- Returns:
- the language identifier: en=english, de=german, ...
Definition at line 642 of file keduvocdocument.cpp.
| int KEduVocDocument::identifierCount | ( | ) | const |
- Returns:
- the number of different identifiers (usually languages)
Definition at line 706 of file keduvocdocument.cpp.
| int KEduVocDocument::indexOfIdentifier | ( | const QString & | name | ) | const |
Determines the index of a given identifier.
- Parameters:
-
lang identifier of language
- Returns:
- index of identifier, 0 = original, 1..n = translation, -1 = not found
| bool KEduVocDocument::isModified | ( | ) | const |
| KEduVocLesson * KEduVocDocument::leitnerContainer | ( | ) |
Definition at line 740 of file keduvocdocument.cpp.
| KEduVocLesson * KEduVocDocument::lesson | ( | ) |
get the lesson root object
- Returns:
- a pointer to the lesson object
Definition at line 730 of file keduvocdocument.cpp.
| QString KEduVocDocument::license | ( | ) | const |
| void KEduVocDocument::merge | ( | KEduVocDocument * | docToMerge, | |
| bool | matchIdentifiers | |||
| ) |
Merges data from another document.
- Parameters:
-
docToMerge document containing the data to be merged matchIdentifiers if true only entries having identifiers present in the current document will be mergedurl is empty (or NULL) actual name is preserved
- Todo:
- IMPLEMENT ME
Definition at line 423 of file keduvocdocument.cpp.
| int KEduVocDocument::open | ( | const KUrl & | url | ) |
Open a document file.
- Parameters:
-
url url to file to open
- Returns:
- ErrorCode
- Todo:
- make the readers return int, pass on the error message properly
Definition at line 237 of file keduvocdocument.cpp.
| QString KEduVocDocument::pattern | ( | FileDialogMode | mode | ) | [static] |
Create a string with the supported document types, that can be used as filter in KFileDialog.
It includes also an entry to match all the supported types.
- Parameters:
-
mode the mode for the supported document types
- Returns:
- the filter string
Definition at line 911 of file keduvocdocument.cpp.
| void KEduVocDocument::progressChanged | ( | KEduVocDocument * | , | |
| int | curr_percent | |||
| ) | [signal] |
Retrieves the identifiers for the current query not written in the new version!
- Parameters:
-
org identifier for original trans identifier for translation
Definition at line 813 of file keduvocdocument.cpp.
| void KEduVocDocument::removeIdentifier | ( | int | index | ) |
Removes identifier and the according translations in all entries.
- Parameters:
-
index number of translation 0..x
Definition at line 691 of file keduvocdocument.cpp.
Saves the data under the given name.
- Parameters:
-
url if url is empty (or NULL) actual name is preserved ft the filetype to be used when saving the document generator the name of the application saving the document
- Returns:
- ErrorCode
- Todo:
- port me
Definition at line 356 of file keduvocdocument.cpp.
| void KEduVocDocument::setAuthor | ( | const QString & | author | ) |
set the author of the file
- Parameters:
-
author author to set
Definition at line 777 of file keduvocdocument.cpp.
| void KEduVocDocument::setAuthorContact | ( | const QString & | authorContact | ) |
set the author contact info
- Parameters:
-
contact email/contact info to set
Definition at line 787 of file keduvocdocument.cpp.
| void KEduVocDocument::setCategory | ( | const QString & | category | ) |
set the category of the file
- Parameters:
-
category category to set
Definition at line 802 of file keduvocdocument.cpp.
| void KEduVocDocument::setCsvDelimiter | ( | const QString & | delimiter | ) |
Sets the delimiter (separator) used for csv import and export.
- Parameters:
-
delimiter the delimiter to use
Definition at line 872 of file keduvocdocument.cpp.
| void KEduVocDocument::setDocumentComment | ( | const QString & | comment | ) |
set the comment of the file
- Parameters:
-
comment comment to set
Definition at line 836 of file keduvocdocument.cpp.
| void KEduVocDocument::setGenerator | ( | const QString & | generator | ) |
| void KEduVocDocument::setIdentifier | ( | int | index, | |
| const KEduVocIdentifier & | lang | |||
| ) |
Sets the identifier of translation.
- Parameters:
-
index number of translation 0..x lang thr language identifier: en=english, de=german, ...
Definition at line 651 of file keduvocdocument.cpp.
| void KEduVocDocument::setLicense | ( | const QString & | license | ) |
set the license of the file
- Parameters:
-
license license to set
Definition at line 830 of file keduvocdocument.cpp.
| void KEduVocDocument::setModified | ( | bool | dirty = true |
) |
Indicates if the document is modified.
- Parameters:
-
dirty new state
Definition at line 154 of file keduvocdocument.cpp.
Sets the identifiers for the current query not written in the new version!
- Parameters:
-
org identifier for original trans identifier for translation
Definition at line 820 of file keduvocdocument.cpp.
| void KEduVocDocument::setTenseDescriptions | ( | const QStringList & | names | ) |
| void KEduVocDocument::setTenseName | ( | int | index, | |
| const QString & | tense | |||
| ) |
Set the name of a tense.
- Parameters:
-
index number of tense tense name of tense
Definition at line 667 of file keduvocdocument.cpp.
| void KEduVocDocument::setTitle | ( | const QString & | title | ) |
set the title of the file
- Parameters:
-
title title to set
Definition at line 766 of file keduvocdocument.cpp.
| void KEduVocDocument::setUrl | ( | const KUrl & | url | ) |
| void KEduVocDocument::setVersion | ( | const QString & | ver | ) |
Sets version of the loaded file.
- Parameters:
-
ver the new version
Definition at line 860 of file keduvocdocument.cpp.
| QStringList KEduVocDocument::tenseDescriptions | ( | ) | const |
| QString KEduVocDocument::tenseName | ( | int | index | ) | const |
Returns the tense string.
- Parameters:
-
index number of tense
- Returns:
- string
Definition at line 659 of file keduvocdocument.cpp.
| QString KEduVocDocument::title | ( | ) | const |
| QByteArray KEduVocDocument::toByteArray | ( | const QString & | generator | ) |
Definition at line 416 of file keduvocdocument.cpp.
| KUrl KEduVocDocument::url | ( | ) | const |
| QString KEduVocDocument::version | ( | ) | const |
| KEduVocWordType * KEduVocDocument::wordTypeContainer | ( | ) |
Definition at line 735 of file keduvocdocument.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference