-
Notifications
You must be signed in to change notification settings - Fork 0
Specification
Goal: to develop command line and GUI desktop applications with languages that compile to JavaScript, command line applications shall not have any dependency on QtGUI.
##Use cases
Quick development of stand-alone applications with JavaScript e.g. create a data analysis application displaying local data with HighCharts.
Flash-like/Silverlight environment: Create a player application that executes scripts inside the LoCO environment; a few options available:
- everything packed inside a compressed binary Qt resource file
- zip/gz archive
- single script accessing resources from the network
Standalone application: same as previous configuration but with scripts embedded into player's executable.
Online library: create iTunes-like client to browse applications/libraries/scripts with automatic download of dependent resources; the download of dependent resources can happen at application/module download time or just-in-time during application execution.
Ad-driven application: easy to include any standard on-line ad service when using a web-based gui for a desktop application; note that it is also possible to create local caches of ads to be displayed while offline or use a custom network access manager/protocol handler to display ads dependent on specific network requests. In general many of the context-sensitive techniques used by Google should be available.
Embedded web application: using a custom network access manager or custom protocol handler it is possible to automatically forward all requests to an in-process request handler.
##Specification list
- target platform: Windows 7, MacOS >= Snow Leopard, Ubuntu Linux >= 11.04, priority given to 64bit platforms
- the development workflow should be something like
- develop or wrap existing C++ code with a QOject exposing the public interface with slots or Q_INVOKABLE
- implement the application in JavaScript/CoffeScript... directly invoking C++ methods, connecting C++ slots to JavaScript callbacks or JavaScript functions to C++ methods
- connect different C++ modules through JavaScript: It shall be possible to pass a QObject* from one C++ module to another e.g.
var visitor = scenegraphFilters.create("count-textures-visitor"); scenegraph.apply(visitor);
wherevisitor
andscenegraph
are both references to QObjects - it shall be possible to use all the available JavaScript toolkits(namely Knockout, jQuery, MooTools, ExtJS, Dojo + the various MVC frameworks) for developing GUI applications through QtWebKit
- it shall be possible to use any language that compiles to JavaScript, top priority is CofeeScript
- native(Qt) widgets shall be supported to allow for things like creating a real Mac OS top menu or embed a web gui inside a Mac OS drawer.
- ability to specify an entire GUI layout through JSON including event callbacks, this is similar to QML, except from the fact that it is standard JSON.
- [needs research] ability to access native widgets from DOM: e.g. associate specific css classes to native widgets, note that Qt already has some support for styling widgets through a css-like language, so it should also be possible to convert from standard css to Qt's flavor
- implement custom protocol handlers and network access managers to allow full control over navigation in WebKit
- implement basic access control for filesystem and network
- it shall be possible to distribute applications as a single standalone executable with all the resources stored within the executable; this is fairly easy with Qt since there is direct support for reading from the virtual "qrc:/" filesystem
- allow the creation of HUD-type interfaces by layering QtWebKit on top of a QGraphicsWebView(i.e. do what Awesomium and Berkelium do)
Also investigate using frameworks other than Qt e.g. wxWidgets with wxWebKit and/or Chromium embedded framework.