~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qaxscriptengine.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<!-- qaxscript.cpp -->
 
6
<head>
 
7
  <title>Qt 4.6: QAxScriptEngine Class Reference</title>
 
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
 
9
</head>
 
10
<body>
 
11
<a name="//apple_ref/cpp/cl//QAxScriptEngine" />
 
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
13
<tr>
 
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
15
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
16
</tr></table><h1 class="title">QAxScriptEngine Class Reference<br /><span class="small-subtitle">[<a href="qaxcontainer.html">QAxContainer</a> module]</span>
 
17
</h1>
 
18
<p>The QAxScriptEngine class provides a wrapper around a script engine. <a href="#details">More...</a></p>
 
19
<pre> #include &lt;QAxScriptEngine&gt;</pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
 
20
<p>Inherits <a href="qaxobject.html">QAxObject</a>.</p>
 
21
<ul>
 
22
<li><a href="qaxscriptengine-members.html">List of all members, including inherited members</a></li>
 
23
</ul>
 
24
<hr />
 
25
<a name="public-types"></a>
 
26
<h2>Public Types</h2>
 
27
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
28
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#State-enum">State</a></b> { Uninitialized, Initialized, Started, Connected, Disconnected, Closed }</td></tr>
 
29
</table>
 
30
<hr />
 
31
<a name="public-functions"></a>
 
32
<h2>Public Functions</h2>
 
33
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
34
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#QAxScriptEngine">QAxScriptEngine</a></b> ( const QString &amp; <i>language</i>, QAxScript * <i>script</i> )</td></tr>
 
35
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#dtor.QAxScriptEngine">~QAxScriptEngine</a></b> ()</td></tr>
 
36
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#addItem">addItem</a></b> ( const QString &amp; <i>name</i> )</td></tr>
 
37
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#hasIntrospection">hasIntrospection</a></b> () const</td></tr>
 
38
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#isValid">isValid</a></b> () const</td></tr>
 
39
<tr><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#queryInterface">queryInterface</a></b> ( const QUuid &amp; <i>uuid</i>, void ** <i>iface</i> ) const</td></tr>
 
40
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#scriptLanguage">scriptLanguage</a></b> () const</td></tr>
 
41
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#setState">setState</a></b> ( State <i>st</i> )</td></tr>
 
42
<tr><td class="memItemLeft" align="right" valign="top">State </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#state">state</a></b> () const</td></tr>
 
43
</table>
 
44
<ul>
 
45
<li><div bar="2" class="fn"></div>1 public function inherited from <a href="qaxobject.html#public-functions">QAxObject</a></li>
 
46
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
47
<li><div bar="2" class="fn"></div>19 public functions inherited from <a href="qaxbase.html#public-functions">QAxBase</a></li>
 
48
</ul>
 
49
<hr />
 
50
<a name="reimplemented-protected-functions"></a>
 
51
<h2>Reimplemented Protected Functions</h2>
 
52
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
 
53
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qaxscriptengine.html#initialize">initialize</a></b> ( IUnknown ** <i>ptr</i> )</td></tr>
 
54
</table>
 
55
<ul>
 
56
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qaxobject.html#protected-functions">QAxObject</a></li>
 
57
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
58
<li><div bar="2" class="fn"></div>5 protected functions inherited from <a href="qaxbase.html#protected-functions">QAxBase</a></li>
 
59
</ul>
 
60
<h3>Additional Inherited Members</h3>
 
61
<ul>
 
62
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
63
<li><div class="fn"></div>1 property inherited from <a href="qaxbase.html#properties">QAxBase</a></li>
 
64
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
65
<li><div class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
66
<li><div class="fn"></div>3 signals inherited from <a href="qaxbase.html#signals">QAxBase</a></li>
 
67
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
68
<li><div class="fn"></div>1 protected function inherited from <a href="qaxobject.html#protected-functions">QAxObject</a></li>
 
69
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
70
<li><div class="fn"></div>5 protected functions inherited from <a href="qaxbase.html#protected-functions">QAxBase</a></li>
 
71
</ul>
 
72
<a name="details"></a>
 
73
<hr />
 
74
<h2>Detailed Description</h2>
 
75
<p>The QAxScriptEngine class provides a wrapper around a script engine.</p>
 
76
<p>Every instance of the QAxScriptEngine class represents an interpreter for script code in a particular scripting language. The class is usually not used directly. The <a href="qaxscript.html">QAxScript</a> and <a href="qaxscriptmanager.html">QAxScriptManager</a> classes provide convenient functions to handle and call script code.</p>
 
77
<p>Direct access to the script engine is provided through <a href="qaxscriptengine.html#queryInterface">queryInterface</a>().</p>
 
78
<p><b>Warning:</b> This class is not available with the bcc5.5 and MingW compilers.</p>
 
79
<p>See also <a href="qaxscript.html">QAxScript</a>, <a href="qaxscriptmanager.html">QAxScriptManager</a>, <a href="qaxbase.html">QAxBase</a>, and <a href="activeqt.html">ActiveQt Framework</a>.</p>
 
80
<hr />
 
81
<h2>Member Type Documentation</h2>
 
82
<a name="//apple_ref/cpp/tag/QAxScriptEngine/State" />
 
83
<a name="//apple_ref/cpp/econst/QAxScriptEngine/Uninitialized" />
 
84
<a name="//apple_ref/cpp/econst/QAxScriptEngine/Initialized" />
 
85
<a name="//apple_ref/cpp/econst/QAxScriptEngine/Started" />
 
86
<a name="//apple_ref/cpp/econst/QAxScriptEngine/Connected" />
 
87
<a name="//apple_ref/cpp/econst/QAxScriptEngine/Disconnected" />
 
88
<a name="//apple_ref/cpp/econst/QAxScriptEngine/Closed" />
 
89
<h3 class="fn"><a name="State-enum"></a>enum QAxScriptEngine::State</h3>
 
90
<p>The State enumeration defines the different states a script engine can be in.</p>
 
91
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
 
92
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
 
93
<tr><td valign="top"><tt>QAxScriptEngine::Uninitialized</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The script has been created, but not yet initialized</td></tr>
 
94
<tr><td valign="top"><tt>QAxScriptEngine::Initialized</tt></td><td align="center" valign="top"><tt>5</tt></td><td valign="top">The script has been initialized, but is not running</td></tr>
 
95
<tr><td valign="top"><tt>QAxScriptEngine::Started</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The script can execute code, but does not yet handle events</td></tr>
 
96
<tr><td valign="top"><tt>QAxScriptEngine::Connected</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The script can execute code and is connected so that it can handle events</td></tr>
 
97
<tr><td valign="top"><tt>QAxScriptEngine::Disconnected</tt></td><td align="center" valign="top"><tt>3</tt></td><td valign="top">The script is loaded, but is not connected to event sources</td></tr>
 
98
<tr><td valign="top"><tt>QAxScriptEngine::Closed</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">The script has been closed.</td></tr>
 
99
</table></p>
 
100
<hr />
 
101
<h2>Member Function Documentation</h2>
 
102
<a name="//apple_ref/cpp/instm/QAxScriptEngine/QAxScriptEngine" />
 
103
<h3 class="fn"><a name="QAxScriptEngine"></a>QAxScriptEngine::QAxScriptEngine ( const <a href="qstring.html">QString</a> &amp; <i>language</i>, <a href="qaxscript.html">QAxScript</a> * <i>script</i> )</h3>
 
104
<p>Constructs a <a href="qaxscriptengine.html">QAxScriptEngine</a> object interpreting script code in <i>language</i> provided by the code in <i>script</i>. This is usually done by the <a href="qaxscript.html">QAxScript</a> class when <a href="qaxscript.html#load">loading a script</a>.</p>
 
105
<p>Instances of <a href="qaxscriptengine.html">QAxScriptEngine</a> should always have both a language and a script.</p>
 
106
<a name="//apple_ref/cpp/instm/QAxScriptEngine/~QAxScriptEngine" />
 
107
<h3 class="fn"><a name="dtor.QAxScriptEngine"></a>QAxScriptEngine::~QAxScriptEngine ()</h3>
 
108
<p>Destroys the <a href="qaxscriptengine.html">QAxScriptEngine</a> object, releasing all allocated resources.</p>
 
109
<a name="//apple_ref/cpp/instm/QAxScriptEngine/addItem" />
 
110
<h3 class="fn"><a name="addItem"></a>void QAxScriptEngine::addItem ( const <a href="qstring.html">QString</a> &amp; <i>name</i> )</h3>
 
111
<p>Registers an item with the script engine. Script code can refer to this item using <i>name</i>.</p>
 
112
<a name="//apple_ref/cpp/instm/QAxScriptEngine/hasIntrospection" />
 
113
<h3 class="fn"><a name="hasIntrospection"></a>bool QAxScriptEngine::hasIntrospection () const</h3>
 
114
<p>Returns true if the script engine supports introspection; otherwise returns false.</p>
 
115
<a name="//apple_ref/cpp/instm/QAxScriptEngine/initialize" />
 
116
<h3 class="fn"><a name="initialize"></a>bool QAxScriptEngine::initialize ( IUnknown ** <i>ptr</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
 
117
<p>Reimplemented from <a href="qaxbase.html#initialize">QAxBase::initialize</a>().</p>
 
118
<a name="//apple_ref/cpp/instm/QAxScriptEngine/isValid" />
 
119
<h3 class="fn"><a name="isValid"></a>bool QAxScriptEngine::isValid () const</h3>
 
120
<p>Returns true if the script engine has been initialized correctly; otherwise returns false.</p>
 
121
<a name="//apple_ref/cpp/instm/QAxScriptEngine/queryInterface" />
 
122
<h3 class="fn"><a name="queryInterface"></a>long QAxScriptEngine::queryInterface ( const <a href="quuid.html">QUuid</a> &amp; <i>uuid</i>, void ** <i>iface</i> ) const</h3>
 
123
<p>Requests the interface <i>uuid</i> from the script engine object and sets the value of <i>iface</i> to the provided interface, or to 0 if the requested interface could not be provided.</p>
 
124
<p>Returns the result of the QueryInterface implementation of the COM object.</p>
 
125
<a name="//apple_ref/cpp/instm/QAxScriptEngine/scriptLanguage" />
 
126
<h3 class="fn"><a name="scriptLanguage"></a><a href="qstring.html">QString</a> QAxScriptEngine::scriptLanguage () const</h3>
 
127
<p>Returns the scripting language, for example &quot;VBScript&quot;, or &quot;JScript&quot;.</p>
 
128
<a name="//apple_ref/cpp/instm/QAxScriptEngine/setState" />
 
129
<h3 class="fn"><a name="setState"></a>void QAxScriptEngine::setState ( <a href="qaxscriptengine.html#State-enum">State</a> <i>st</i> )</h3>
 
130
<p>Sets the state of the script engine to <i>st</i>. Calling this function is usually not necessary.</p>
 
131
<p>See also <a href="qaxscriptengine.html#state">state</a>().</p>
 
132
<a name="//apple_ref/cpp/instm/QAxScriptEngine/state" />
 
133
<h3 class="fn"><a name="state"></a><a href="qaxscriptengine.html#State-enum">State</a> QAxScriptEngine::state () const</h3>
 
134
<p>Returns the state of the script engine.</p>
 
135
<p>See also <a href="qaxscriptengine.html#setState">setState</a>().</p>
 
136
<p /><address><hr /><div align="center">
 
137
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
138
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
139
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
140
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
141
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
 
142
</html>