From 9ba04742771370f59740e32e11c5f3a1e6a1b70a Mon Sep 17 00:00:00 2001
From: Timothy Pearson
To give you an idea of what KJSEmbed provides, here is a brief summary of the @@ -51,16 +51,16 @@ pre { X server if you don't need to display a GUI).
The quickest way to see what KJSEmbed can do is with kjscmd, a tool for running +
The tquickest way to see what KJSEmbed can do is with kjscmd, a tool for running scripts from the command line. To begin, we'll run kjscmd without any parameters which brings up the KJSEmbed console dialog. The console provides an easy way to run short (one line) scripts, as you can see in figure 1 the scripts have @@ -88,11 +88,11 @@ JSConsoleWidget (KJSEmbed::JSConsoleWidget) kjs> console.childCount() 4 kjs> console.child(1) -CmdEdit (TQComboBox) +CmdEdit (TTQComboBox) kjs> console.child(2) -RunButton (TQPushButton) +RunButton (TTQPushButton) kjs> console.child("RunButton") -RunButton (TQPushButton) +RunButton (TTQPushButton) kjs> console.child("RunButton").text = "Go!" Go! kjs> console.caption = "Different Title" @@ -149,12 +149,12 @@ print( cmd );
In order to find out what the user asked us to search for we need to extract the contents of the various fields in our dialog. We know that the field for - entering the text to be searched for is a TQLineEdit called 'search_edit', so + entering the text to be searched for is a TTQLineEdit called 'search_edit', so we can use the child() method to get hold of it (this method searches through the children of an object until it finds one with a matching name). Once we've - found the right object getting hold of the text is easy because all QLineEdits + found the right object getting hold of the text is easy because all TQLineEdits make their contents available as a property called 'text'. The code that gets - the value of the check boxes is almost identical, except that these are QCheckBoxes + the value of the check boxes is almost identical, except that these are TQCheckBoxes so it's the 'checked' property we're interested in.
-- cgit v1.2.1