Scripting::Text Class Reference
Scripting::Text class object provides methods and properties for accessing Parley text's value and grades.
More...
#include <text.h>
List of all members.
Detailed Description
Scripting::Text class object provides methods and properties for accessing Parley text's value and grades.
It is inherited and mainly used by Scripting::Translation.
#how to access a translation's object properties/methods
import Parley
for entry in Parley.document.rootLesson.entries(True):
for translation in entry.translations():
print translation.text
print translation.grade
translation.incBadCount()
print translation.practiceDate("dd/MM/yyyy")
translation.grade = 5
- Author:
- Avgoustinos Kadis <avgoustinos.kadis@kdemail.net>
Definition at line 39 of file text.h.
Constructor & Destructor Documentation
| Scripting::Text::Text |
( |
KEduVocText * |
text |
) |
|
| Scripting::Text::Text |
( |
const KEduVocText & |
text |
) |
|
| Scripting::Text::~Text |
( |
|
) |
|
Member Function Documentation
| unsigned int Scripting::Text::badCount |
( |
|
) |
const [inline] |
| void Scripting::Text::decGrade |
( |
|
) |
[inline, slot] |
decrements grade
Definition at line 162 of file text.h.
| unsigned int Scripting::Text::grade |
( |
|
) |
const [inline] |
| void Scripting::Text::incBadCount |
( |
|
) |
[inline, slot] |
increment bad query count of given translation by 1
Definition at line 150 of file text.h.
| void Scripting::Text::incGrade |
( |
|
) |
[inline, slot] |
increments grade
Definition at line 159 of file text.h.
| void Scripting::Text::incPracticeCount |
( |
|
) |
[inline, slot] |
increment query count of given translation by 1
Definition at line 153 of file text.h.
| bool Scripting::Text::isEmpty |
( |
|
) |
[inline] |
| KEduVocText* Scripting::Text::kEduVocText |
( |
|
) |
[inline] |
| unsigned int Scripting::Text::practiceCount |
( |
|
) |
const [inline] |
| QString Scripting::Text::practiceDate |
( |
const QString & |
format |
) |
const [inline, slot] |
Last date this word was practiced.
- Parameters:
-
| format | Format of the date (see QDateTime toString(format) function |
- Returns:
- the last practice date in the format given by
format print translation.practiceDate("dd/MM/yyyy")
print translation.practiceDate("M-d-yy, h:m:s")
Definition at line 176 of file text.h.
| QString Scripting::Text::practiceDate |
( |
|
) |
const [inline, slot] |
returns the last date when this word was practiced
Definition at line 165 of file text.h.
| void Scripting::Text::resetGrades |
( |
|
) |
[inline, slot] |
Clears grading and date information.
Definition at line 156 of file text.h.
| void Scripting::Text::setBadCount |
( |
unsigned int |
count |
) |
[inline] |
| void Scripting::Text::setGrade |
( |
unsigned int |
grade |
) |
[inline] |
| void Scripting::Text::setPracticeCount |
( |
unsigned int |
count |
) |
[inline] |
| void Scripting::Text::setPracticeDate |
( |
const QString & |
date, |
|
|
const QString & |
format | |
|
) |
| | [inline, slot] |
Sets the laast date this word was practiced.
- Parameters:
-
| date | A string containing the date |
| format | Format of the date (see QDateTime fromString(date,format) function
translation.setPracticeDate("05/12/1999","dd/MM/yyyy")
translation.setPracticeDate("02 Jan 05","dd MMM yy")
|
Definition at line 190 of file text.h.
| void Scripting::Text::setPracticeDate |
( |
const QString & |
date |
) |
[inline, slot] |
Sets the last date when this word was practiced.
Definition at line 179 of file text.h.
| void Scripting::Text::setText |
( |
const QString & |
expr |
) |
[inline] |
| QString Scripting::Text::text |
( |
|
) |
const [inline] |
Member Data Documentation
Property Documentation
unsigned Scripting::Text::int [read, write] |
how often this entry has been practiced as int
word grade
how many times the word was not found correctly
Definition at line 47 of file text.h.
bool Scripting::Text::isEmpty [read] |
true if the word text is empty
Definition at line 59 of file text.h.
QString Scripting::Text::text [read, write] |
The translation as string (the word itself).
Definition at line 44 of file text.h.
The documentation for this class was generated from the following files: