[Parley-devel] My work for Parley

Massimo Lo Iacono massimol at inventati.org
Sun Jun 5 02:28:32 CEST 2011


Hi Frederik and all.

I am sorry, I can not split the patch in smaller independent patches. This is because the different functionalities are mutually connected and it is impossible separate them. I removed the showEvent() function that you didn't like. I tested to applay this patch over the master branch of git repository and this operation was succesfull, the code was compiled and excuted correctly.

If you are interested to this patch the only help I can give you is via chat, answering your question and doubts. I expect for myself I will not have many time to spend for Parley in the future.

Besides, I send you another patch for a plugin. This patch is more simple and smaller. This plugin is to automatically create or remove links to sound or image files.

The patch for plugin fixes a bug too.

In the following I give you a description of all the functionalities of the patches:


(in the patch of plugin)

******************************************
Bug fixed for file
    "src/scripts/scripting/translation.h"
******************************************
    - At present: there are references to sound file instead of
      image file.
    - With this modification: the references are correctly set
      for image file.


******************************************
Plugin to link or remove image and sound files
******************************************
    This plugin have 2 functionalities:
    
    1) automatically links into the vocabulary image and sound
    files from a directory according to the correlation between
    name of the files and text of the vocabulary words.
    
    2) remove from the vocabulary already existent links to image
    and sound files.


(in the bigger patch)

******************************************
Fix dimension and position of the box for practice:
******************************************
    - At present: dimension and position of the box change in
      accordance to the state of objects into the box.
      
      I find this uncomfortable.
    - With this modification: dimension and position of the box and
      position of objects into the box is static.
    - Technically: heuristically I resolved this using QString()
      instead of setVisible(false) for labels that in a first time
      are hidden and after are shown.


******************************************
In Flash Card practice - use of ENTER key:
******************************************
    - At present: only SPACE key can be used to switch between
      "I knew it" and "I did not know it"; the ENTER key
      appears do nothing.
    - With this modification: also ENTER key can be used to
      switch.
    - Technically: the two buttons are set "autoDefault".


******************************************
The sound buttons are always present for any practice mode:
******************************************
    - At present: only some practice mode have the sound buttons.
    - With this modification: the sound buttons for question and
      solution are always present.
    - Technically: 


******************************************
Options to show or hide pronunciation (IPA phonetic):
******************************************
    - At present: the presence of pronunciation is static,
      that is the user can not decide if show or not show
      pronunciation.
    - With this modification: there are two options:

      "show question pronunciation"
      "show solution pronunciation"

      to decide whether to show pronunciation.
    - Technically: 


******************************************
Options for "hear sound" and "hide text" at the start of question:
******************************************
    - At present: to hear sound of question the user MUST push
      the sound button.
    
      Besides, it isn't possible hide the text of question to
      practice only on the listening of the sound, that is
      without seeing the text.
    - With this modification: there is a new option to automatically
      listen the sound at the start of question.
      
      There is a new option to hide the text of question.
    - Technically: in the file "entryfilter.cpp" same code was
      written to manage the case when both "hear sound" and
      "hide text" are checked. In this case only entries with a
      sound file can be practiced.
      
      The two options to manage the "hear sound" and
      "hide text" must be mutually related because obviously
      if the "hear sound" option isn't checked, the user can not
      hide the text!


******************************************
Option for dictation:
******************************************
    - At present: no functionality there is for dictation.
    - With this modification: it's possible have practice in
      dictation form.
      When a practice is in dictation form it means that the
      questions are done ONLY in form of sound and the answers
      are expected in form of text, IN THE SAME LANGUAGE OF
      QUESTION.
      This exercise is useful to learn the orthography of a
      language (spelling).
      
      We can say that dictation is a mono language type of
      practice.
      
      This option take effect only for practice where the user
      must write the answer, that is:
        - Written
        - Mixed Letters
        - Example Sentences
      In the other practice mode this option doesn't take effect.
      
      When a practice is in dictation form, a label "dictation" in
      the top right corner (under the lesson label) is showed in
      order to inform the user.
      
      When the user practices in dictation form and select a pair
      of languages to practice, the language practiced is the
      second of the pair.
      
      Obviously when a practice is in the dictation form, only the
      entries with a sound file are practiced.
      
      In dictation form the sound is played at the start of practice
      without the necessity to manually click the sound button
      (obviously the sound button is always present to hear again
      the sound).
    - Technically: in general the management of the dictation option
      is done using the static functions in the "PracticeOptions"
      class.
      
                              ATTENTION
      If this patch is accepted, the programmers must pay attention
      that in ALL the code performed after the practice started,
      more exactly after the function:
      
      ParleyMainWindow::languageManagement()
      
      the following static functions:
      
          PracticeOptions::languageFrom()
          PracticeOptions::languageTo()
          
      MUST BE USED instead of:
      
          Prefs::solutionLanguage()
          Prefs::questionLanguage()
      
      [note that the code in the class "StatisticMainWindow" is
      performed before the practice started and therefore it
      still uses correctly the Prefs functions]
      
      A bit of stuff is made in the file entryfilter.cpp:
          - the text for 1° language can be empty;
          - the sound file for 2° language can not be empty;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: from_Massimo_plugin.patch
Type: text/x-patch
Size: 42622 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/parley-devel/attachments/20110605/beba8bef/attachment-0002.patch 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: from_Massimo.patch
Type: text/x-patch
Size: 86927 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/parley-devel/attachments/20110605/beba8bef/attachment-0003.patch 


More information about the Parley-devel mailing list