Logo Search packages:      
Sourcecode: parley version File versions  Download package

Public Types | Public Slots | Signals | Public Member Functions | Properties | Private Attributes

Scripting::Parley Class Reference

Parley scripting class (main entry point of a Parley Kross script) More...

#include <parley.h>

Collaboration diagram for Scripting::Parley:
Collaboration graph

List of all members.

Public Types

enum  Flags {
  NoInformation = 0x0, Masculine = 0x1, Feminine = 0x2, Neuter = 0x4,
  Singular = 0x10, Dual = 0x20, Plural = 0x40, Verb = 0x100,
  Noun = 0x200, Pronoun = 0x400, Adjective = 0x800, Adverb = 0x1000,
  Article = 0x2000, Conjunction = 0x4000, First = 0x10000, Second = 0x20000,
  Third = 0x40000, Nominative = 0x80000, Genitive = 0x100000, Dative = 0x200000,
  Accusative = 0x400000, Ablative = 0x800000, Locative = 0x1000000, Vocative = 0x2000000,
  Definite = 0x4000000, Indefinite = 0x8000000, Regular = 0x10000000, Irregular = 0x20000000

Public Slots

void addTranslation (QString word, QString fromLanguage, QString toLanguage, QString translation)
QStringList dataDirs ()
QString localeName (QString locale)
QStringList locales ()
QObject * newAction (const QString &name, const QString &text=QString())
QObject * newDocument ()
void open (QString filename)
QStringList pluginDirs ()
QVariantList selectedEntries ()
QVariantList selectedTranslations ()


void translateWord (const QString &word, const QString &fromLanguage, const QString &toLanguage)
void translationFinished (const QString &word, const QString &fromLanguage, const QString &toLanguage)
void translationStarted (const QString &word, const QString &fromLanguage, const QString &toLanguage)

Public Member Functions

QObject * activeLesson ()
void callTranslateWord (const QString &word, const QString &fromLanguage, const QString &toLanguage)
QObject * getDocument ()
 Parley (Editor::EditorWindow *editor)
Translatortranslator ()


QObject activeLesson
 Currently active lesson.
QObject doc
 Abreviation of document property (same as Parley.document)
QObject document
 Read-only property of the active document.

Private Attributes


Detailed Description

Parley scripting class (main entry point of a Parley Kross script)

Parley class is the main entry point of Parley scripting classes. Through it you can access the Document class (Parley.doc or Parley.document) which provides functionality for viewing/modifying a Parley document (KEduVocDocument), that means access lessons, entries, document languages etc.

The Parley class has to do more with the active Parley application. Here it follows a list of possible usages of Parley class:

Signals and Slots: To connect a script function (slot) to a signal you just define a function with the same name as the signal or use the Parley.connect function:

 #how to connect a function to a signal (example with Parley::translateWord() signal)
 def translateFromInternet(word,fromLang,toLang):
     print "Translating from Internet!!.."

 Parley.connect("translateWord(const QString &,const QString &,const QString &)",translateFromInternet)
Avgoustinos Kadis <avgoustinos.kadis@kdemail.net>

Definition at line 151 of file parley.h.

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index