parley
Scripting::Text Class Reference
#include <text.h>
Inheritance diagram for Scripting::Text:

Public Slots | |
void | decGrade () |
void | incBadCount () |
void | incGrade () |
void | incPracticeCount () |
QString | practiceDate () const |
QString | practiceDate (const QString &format) const |
void | resetGrades () |
void | setPracticeDate (const QString &date) |
void | setPracticeDate (const QString &date, const QString &format) |
Public Member Functions | |
Text (const QString &text=QString()) | |
Text (KEduVocText *text) | |
Text (const KEduVocText &text) | |
~Text () | |
unsigned int | badCount () const |
unsigned int | grade () const |
bool | isEmpty () |
KEduVocText * | kEduVocText () |
unsigned int | practiceCount () const |
void | setBadCount (unsigned int count) |
void | setGrade (unsigned int grade) |
void | setPracticeCount (unsigned int count) |
void | setText (const QString &expr) |
QString | text () const |
Protected Attributes | |
KEduVocText * | m_text |
Properties | |
unsigned int | badCount |
unsigned int | grade |
bool | isEmpty |
unsigned int | practiceCount |
QString | text |
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
Constructor & Destructor Documentation
Member Function Documentation
|
inlineslot |
|
inlineslot |
|
inlineslot |
|
inlineslot |
|
inlineslot |
|
inlineslot |
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")
|
inlineslot |
|
inline |
|
inline |
|
inlineslot |
|
inlineslot |
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")
Member Data Documentation
Property Documentation
|
readwrite |
|
read |
|
readwrite |
|
readwrite |
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:42:06 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.