• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

parley

Scripting::Text

Scripting::Text Class Reference

Scripting::Text class object provides methods and properties for accessing Parley text's value and grades. More...

#include <text.h>

Inheritance diagram for Scripting::Text:
Inheritance graph
[legend]

List of all members.

Public Slots

void decGrade ()
void incBadCount ()
void incGrade ()
void incPracticeCount ()
QString practiceDate (const QString &format) const
QString practiceDate () const
void resetGrades ()
void setPracticeDate (const QString &date, const QString &format)
void setPracticeDate (const QString &date)

Public Member Functions

 Text (const KEduVocText &text)
 Text (KEduVocText *text)
 Text (const QString &text=QString())
 ~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
bool isEmpty
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
Author:
Avgoustinos Kadis <avgoustinos.kadis@kdemail.net>

Definition at line 39 of file text.h.


Constructor & Destructor Documentation

Scripting::Text::Text ( const QString &  text = QString()  ) 

Definition at line 20 of file text.cpp.

Scripting::Text::Text ( KEduVocText *  text  ) 

Definition at line 26 of file text.cpp.

Scripting::Text::Text ( const KEduVocText &  text  ) 

Definition at line 31 of file text.cpp.

Scripting::Text::~Text (  ) 

Definition at line 37 of file text.cpp.


Member Function Documentation

unsigned int Scripting::Text::badCount (  )  const [inline]

Definition at line 122 of file text.h.

void Scripting::Text::decGrade (  )  [inline, slot]

decrements grade

Definition at line 162 of file text.h.

unsigned int Scripting::Text::grade (  )  const [inline]

Definition at line 137 of file text.h.

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]

Definition at line 143 of file text.h.

KEduVocText* Scripting::Text::kEduVocText (  )  [inline]

Definition at line 81 of file text.h.

unsigned int Scripting::Text::practiceCount (  )  const [inline]

Definition at line 112 of file text.h.

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]

Definition at line 127 of file text.h.

void Scripting::Text::setGrade ( unsigned int  grade  )  [inline]

Definition at line 132 of file text.h.

void Scripting::Text::setPracticeCount ( unsigned int  count  )  [inline]

Definition at line 117 of file text.h.

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]

Definition at line 93 of file text.h.

QString Scripting::Text::text (  )  const [inline]

Definition at line 87 of file text.h.


Member Data Documentation

KEduVocText* Scripting::Text::m_text [protected]

Definition at line 193 of file text.h.


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:
  • text.h
  • text.cpp

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  •     lib
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal