Development

From Babiloo

Jump to: navigation, search

Contents

How to see the source code

  1. install bazaar
  2. bzr branch lp:babiloo

Code Structure

Core

  • /core/dictionary/SlowoDictionary.py Slowo dictionary parser
  • /core/dictionary/pystardict.py StarDict dictionary parser
  • /core/dictionary/sdictem.py SDictionary dictionary parser
  • /core/dictionary/dictionary.py Contains dictionary classes to be inherited by dictionary parsers
  • /core/dictionary/__init__.py Package root that contains dictionary loader class
  • /core/dictionary/engine.py Contains the Dictionary engine which is compulsory for dictionary installation and removal, the indexation and search functionalities are also contained in this module.
  • /core/modules/__init__.py Defines two constants: APP_TITLE and APP_VERSION
  • /core/modules/configuration.py Contains four classes:
    • Graphical class: does nothing
    • General class: Gives information on babiloo (name, version and description)
    • Logging class: Defines where the log file is stores and the format of the file (babiloo.log*)


  • /core/languages/Languages.py : Contains a list of languages considered as auto-detect and some functions to configure the languages.

...to be complete...


QT interface

  • /qt/main.ui Is the design QT UI file of the main interface. It can be opened using designer-qt4
  • /qt/main.py Is the main file of the GUI. It calls main_ui.py, it contains the SIGNALS for the buttons, menus, etc , and the functions for them.
  • /qt/main_ui.py It loads the qt widgets of the main.ui, it's autogenerated using the qt/Makefile
  • /qt/definitionView.py It shows the definition of selected word into the right screen


  • /qt/SplashScreen.py Shows the first screen(Initialisation) of Babiloo(Book image normally)
  • /qt/about.ui QT UI file of the option "about" screen.
  • /qt/about.py Defines the functionality important to handle the action on "about" screen.
  • /qt/chooseLanguage.ui QT Ui file for the option of choosing language, the layout language of Babiloo
  • /qt/chooseLanguage.py Defines the functionality to handle the action on "chooseLanguage" screen.
  • /qt/contentSearchModel.py Defines the search by content operations. It'll highlight the text found
  • /qt/dictfilemanager.py Manipulate the dictionaries(Load, save, remove).
  • /qt/dictionariesView.py Defines the look of dictionaries view. It contains two classes:
    • DictionariesView Initiate the QTableView, it tells how the dictionaries presented in the list.
    • DictionariesModel Implements the QAbstractTableModel. It tells what model is used to store the list of dictionaries
  • /qt/historylistmodel.py Defines how the word stored in the list of history and also the manipulation method on the history.
  • /qt/gui_widgets.py Provides the event handle, initially it keep track on arrow key event(Up/down key)



...to be complete...

Nokia S60

  • /s60/babiloo.py Is the base module that let babiloo run on Nokia S60. This module contains four classes: Main, DictDB, DictObj, Mapper;
    • Main the first class to run babiloo
    • DictDB defines the database operation, it first tries to load the existing database, if not it create new one and open.
    • DictObj defines the Dictionary object by creating a table in the DB and then it defines all the DB manipulation operations.
    • Mapper defines the database operation related to an id and keyword.


  • /s60/filebrowser.py File browser for the S60.Navigates on phone path tree and returns the selected FILE. It contains two classes Directory_iter and FileBrowser
    • Directory_iterThis class provides a virtual directory navigation, enabling to list contents, ascend and descend on directories.
    • FileBrowser Provide the base functionalities to browse the file on phone.
  • /s60/plugin/fileselector an utility for selecting a file in Series 60, inspired by the filebrowser in Nokia example. This module contains two classes:
    • SelectorPath Provides the functionality to list the path in S60
    • FileBrowser Provides the file browser functionality


...to be complete...

Personal tools