libqtlua-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libqtlua-list] Qt API's available in QtLua


From: Alexandre Becoulet
Subject: Re: [Libqtlua-list] Qt API's available in QtLua
Date: Wed, 12 Jan 2011 00:08:28 +0100
User-agent: KMail/1.13.5 (Linux/2.6.36-ARCH; KDE/4.5.4; x86_64; ; )

On Monday, January 10, 2011 07:54:07 pm Gustavo de Sá Carvalho Honorato wrote:

Hi,

> I would like to know if the following tasks can be done in using Lua code:

> 1) Implementing Custom Delegates

This feature could be added, we just have to define a way to wrap the API in 
lua. The best way would probably be to have a ItemDelegate class which inherit 
from UserData or UserObject to expose lua callback functions for the 
createEditor, setEditorData, setModelData and updateEditorGeometry C++ 
functions. I never used custom delegates yet, let me know what you think.

> 2) Drawing with QPainter API
> 3) Access QUndoFramework (implementing QUndoCommand and using
> QUndoStack in Lua code)

QtLua was not designed to provide wrapping for the whole Qt API but rather to 
let the Qt application developper choose, and provide features to easily wrap 
what is needed and keep other things away from script access.

Some important Qt UI features are wrapped in the "qt" lua table though. 
QtLua::Function must be used to wrap more (Have a look to src/qtluaqtlib.cc).
A question remain about which Qt features are of general use and which are too 
specific to be wrapped in the library. Parts of the Qt API which allow 
extending application interface with the script language are of interest to 
me.

-- 
Alexandre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]