NOTE : For this feature to work please install the qtscript-tools package provided by
debian (Ubuntu et.al) or similar, from your distribution's package manager.
OR use the qtscriptbindings generator http://qt.gitorious.org/qt-labs/qtscriptgenerator


QtScript interface for digiKam is a work taken up as a Part of Season of KDE.

********************* README *******************************************************

To enable digiKam script interface, please use CMake option "-DENABLE_SCRIPTIFACE=ON"

QtScript is a module added to the Qt API from version 4.3 onwards.
It is available to all applications which use Qt internally(KDE applications).

The QtScript is available to the user in the form of a minimalistic Scripting
Console.The user can dynamically send "signals" to digikam and trigger events.


********************* TO DO ********************************************************
PROGRESS:Menu Item Created, Need To Add the QtScript Library to CMakeLists.txt for the QtAPI
CURRENT STEP: 1

1. Modify digikam's main menu "Tools" to add a Menu entry called Script.
   By modifying the digikamrc.ui to add the menu entry.
   Modifying the digikamapp.cpp to add KAction for the menu entry and
   associated slot.

   Modify CMakeLists.txt to add the QtScript library and the QtAPI bindings.

2. Write a script.cpp containing the slot definition.
   2.1 Here , all that will be available initially is a basic UI , from the
       amarok  project. the Script Console .
   2.2 Access to the Basic ECMAScript libraries and the full QtAPI as
       generated by the QtScriptgenerator.
   2.3 Expose a very small portion of digikam to QtScript (for testing purposes).

3. Part by part expose digikam .
4. Test the portion of digikam exposed to QtScript from the ScriptConsole.

5. Repeating steps 3,4 till most of digikam is scriptable.
6. Write a few sample scripts.
7. Make a provision to save the scripts in a directory and load it dynamically.
8. Modify the Scripting Console to show available slots the moment the user
   enters <object>. In other words provide dot completion.(Very helpful while prototyping).
9. Document Changes
10.Create a demo screen cast showing Digikam "scripted".
   Use the ScriptUI Widget already available in kdelibs
   /trunk/KDE/kdelibs/kjsembed/examples/kjsconsole
   and embed it into the digikam main menu.
   ANY ALTERNATIVES ? If time permits i want to work on a new Script Console.

-----------------------SECURITY-----------------------
1. Since we are exposing potentially dangerous API (e.g. QtCore's QFile::remove), there needs to
   be a security model to restrict access to such API !

********************* Design DoC ***************************************************

1. The Script console UI would expose whole of QtAPI and portions of digikam.
2. The Scripting interface would have to work in two mode.
   Interactive mode
   Load Scripts from an external file (inside a fixed directory).
3. To add more metadata to scripts there are two possible options:
   a)Have a separate spec file like a .desktop file
   b)Embedd all the necessary metadata like name of script author, script
     name,version etc in the script itself.
