QtScript

Roberto Raggi roberto at kdevelop.org
Mon Feb 12 13:53:10 GMT 2007


Hi,

Il giorno 12/feb/07, alle ore 07:12, Christoph Cullmann ha scritto:

> On Friday 09 February 2007 17:28, Sebastian Sauer wrote:
>> to provide another idea;
>> cause Kross as well as QtScript are using the Qt meta system, it  
>> could also
>> be an idea to let Kate Scripts (using QtScript) control Kross and  
>> offer
>> that way support to other scripting backends.
> I want to use scripts in KDE 4 for example to do the indentation of  
> the text,

Great! looking forward to play with it :-) I attached a little  
example that show how to write a "prototype" for QTextCursor using  
QScriptable.
I hope you will find it useful :-) another good example is tetrix 
+qscript in qt/examples/script/tetrix

btw the attached little example accepts things like

with (editor.cursor) {
     insertText("ciao")
     insertText("hello ")
     insertText("world ")
     insertText("nice ")
     moveWordLeft()
     moveWordLeft()
     insertText("whatever ")
}

ciao robe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fed.cpp
Type: application/octet-stream
Size: 3718 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070212/0cc97de4/attachment.obj>
-------------- next part --------------




More information about the kde-core-devel mailing list