Sophie

Sophie

distrib > Mageia > 7 > i586 > by-pkgid > 1dd17e0d683ef79b4bb6872bbf359d7f > files > 4899

qt4-doc-4.8.7-26.2.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qaxscript.cpp -->
  <title>Qt 4.8: QAxScriptManager Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/style.css" />
  <script src="scripts/jquery.js" type="text/javascript"></script>
  <script src="scripts/functions.js" type="text/javascript"></script>
  <link rel="stylesheet" type="text/css" href="style/superfish.css" />
  <link rel="stylesheet" type="text/css" href="style/narrow.css" />
  <!--[if IE]>
<meta name="MSSmartTagsPreventParsing" content="true">
<meta http-equiv="imagetoolbar" content="no">
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie6.css">
<![endif]-->
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="style/style_ie7.css">
<![endif]-->
<!--[if IE 8]>
<link rel="stylesheet" type="text/css" href="style/style_ie8.css">
<![endif]-->

<script src="scripts/superfish.js" type="text/javascript"></script>
<script src="scripts/narrow.js" type="text/javascript"></script>

</head>
<body class="" onload="CheckEmptyAndLoadList();">
 <div class="header" id="qtdocheader">
    <div class="content"> 
    <div id="nav-logo">
      <a href="index.html">Home</a></div>
    <a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
    <div id="narrowsearch"></div>
    <div id="nav-topright">
      <ul>
        <li class="nav-topright-home"><a href="http://qt.digia.com/">Qt HOME</a></li>
        <li class="nav-topright-dev"><a href="http://qt-project.org/">DEV</a></li>
        <li class="nav-topright-doc nav-topright-doc-active"><a href="http://qt-project.org/doc/">
          DOC</a></li>
        <li class="nav-topright-blog"><a href="http://blog.qt.digia.com/">BLOG</a></li>
      </ul>
    </div>
    <div id="shortCut">
      <ul>
        <li class="shortCut-topleft-inactive"><span><a href="index.html">Qt 4.8</a></span></li>
        <li class="shortCut-topleft-active"><a href="http://qt-project.org/doc/">ALL VERSIONS        </a></li>
      </ul>
     </div>
 <ul class="sf-menu" id="narrowmenu"> 
             <li><a href="#">API Lookup</a> 
                 <ul> 
                     <li><a href="classes.html">Class index</a></li> 
           <li><a href="functions.html">Function index</a></li> 
           <li><a href="modules.html">Modules</a></li> 
           <li><a href="namespaces.html">Namespaces</a></li> 
           <li><a href="qtglobal.html">Global Declarations</a></li> 
           <li><a href="qdeclarativeelements.html">QML elements</a></li> 
             </ul> 
             </li> 
             <li><a href="#">Qt Topics</a> 
                 <ul> 
                        <li><a href="qt-basic-concepts.html">Programming with Qt</a></li>  
                        <li><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li>  
                        <li><a href="qt-gui-concepts.html">UI Design with Qt</a></li>  
                        <li><a href="supported-platforms.html">Supported Platforms</a></li>  
                        <li><a href="technology-apis.html">Qt and Key Technologies</a></li>  
                        <li><a href="best-practices.html">How-To's and Best Practices</a></li>  
              </ul> 
                 </li> 
                 <li><a href="#">Examples</a> 
                     <ul> 
                       <li><a href="all-examples.html">Examples</a></li> 
                       <li><a href="tutorials.html">Tutorials</a></li> 
                       <li><a href="demos.html">Demos</a></li> 
                       <li><a href="qdeclarativeexamples.html">QML Examples</a></li> 
                </ul> 
                     </li> 
                 </ul> 
    </div>
  </div>
  <div class="wrapper">
    <div class="hd">
      <span></span>
    </div>
    <div class="bd group">
      <div class="sidebar">
        <div class="searchlabel">
          Search index:</div>
        <div class="search" id="sidebarsearch">
          <form id="qtdocsearch" action="" onsubmit="return false;">
            <fieldset>
              <input type="text" name="searchstring" id="pageType" value="" />
 <div id="resultdialog"> 
 <a href="#" id="resultclose">Close</a> 
 <p id="resultlinks" class="all"><a href="#" id="showallresults">All</a> | <a href="#" id="showapiresults">API</a> | <a href="#" id="showarticleresults">Articles</a> | <a href="#" id="showexampleresults">Examples</a></p> 
 <p id="searchcount" class="all"><span id="resultcount"></span><span id="apicount"></span><span id="articlecount"></span><span id="examplecount"></span>&nbsp;results:</p> 
 <ul id="resultlist" class="all"> 
 </ul> 
 </div> 
            </fieldset>
          </form>
        </div>
        <div class="box first bottombar" id="lookup">
          <h2 title="API Lookup"><span></span>
            API Lookup</h2>
          <div  id="list001" class="list">
          <ul id="ul001" >
              <li class="defaultLink"><a href="classes.html">Class index</a></li>
              <li class="defaultLink"><a href="functions.html">Function index</a></li>
              <li class="defaultLink"><a href="modules.html">Modules</a></li>
              <li class="defaultLink"><a href="namespaces.html">Namespaces</a></li>
              <li class="defaultLink"><a href="qtglobal.html">Global Declarations</a></li>
              <li class="defaultLink"><a href="qdeclarativeelements.html">QML elements</a></li>
            </ul> 
          </div>
        </div>
        <div class="box bottombar" id="topics">
          <h2 title="Qt Topics"><span></span>
            Qt Topics</h2>
          <div id="list002" class="list">
            <ul id="ul002" >
               <li class="defaultLink"><a href="qt-basic-concepts.html">Programming with Qt</a></li> 
               <li class="defaultLink"><a href="qtquick.html">Device UIs &amp; Qt Quick</a></li> 
               <li class="defaultLink"><a href="qt-gui-concepts.html">UI Design with Qt</a></li> 
               <li class="defaultLink"><a href="supported-platforms.html">Supported Platforms</a></li>  
               <li class="defaultLink"><a href="technology-apis.html">Qt and Key Technologies</a></li> 
               <li class="defaultLink"><a href="best-practices.html">How-To's and Best Practices</a></li> 
            </ul>  
          </div>
        </div>
        <div class="box" id="examples">
          <h2 title="Examples"><span></span>
            Examples</h2>
          <div id="list003" class="list">
        <ul id="ul003">
              <li class="defaultLink"><a href="all-examples.html">Examples</a></li>
              <li class="defaultLink"><a href="tutorials.html">Tutorials</a></li>
              <li class="defaultLink"><a href="demos.html">Demos</a></li>
              <li class="defaultLink"><a href="qdeclarativeexamples.html">QML Examples</a></li>
            </ul> 
          </div>
        </div>
      </div>
      <div class="wrap">
        <div class="toolbar">
          <div class="breadcrumb toolblock">
            <ul>
              <li class="first"><a href="index.html">Home</a></li>
              <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qaxcontainer.html">QAxContainer</a></li>
<li>QAxScriptManager</li>
            </ul>
          </div>
          <div class="toolbuttons toolblock">
            <ul>
              <li id="smallA" class="t_button">A</li>
              <li id="medA" class="t_button active">A</li>
              <li id="bigA" class="t_button">A</li>
              <li id="print" class="t_button"><a href="javascript:this.print();">
                <span>Print</span></a></li>
            </ul>
        </div>
        </div>
        <div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QAxScriptManager Class Reference</h1>
<!-- $$$QAxScriptManager-brief -->
<p>The QAxScriptManager class provides a bridge between application objects and script code. <a href="#details">More...</a></p>
<!-- @@@QAxScriptManager -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QAxScriptManager&gt;</span></pre><p><b>Inherits: </b><a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qaxscriptmanager-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#QAxScriptManager">QAxScriptManager</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#dtor.QAxScriptManager">~QAxScriptManager</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#addObject">addObject</a></b> ( QAxBase * <i>object</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#addObject-2">addObject</a></b> ( QObject * <i>object</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#call">call</a></b> ( const QString &amp; <i>function</i>, const QVariant &amp; <i>var1</i> = QVariant(), const QVariant &amp; <i>var2</i> = QVariant(), const QVariant &amp; <i>var3</i> = QVariant(), const QVariant &amp; <i>var4</i> = QVariant(), const QVariant &amp; <i>var5</i> = QVariant(), const QVariant &amp; <i>var6</i> = QVariant(), const QVariant &amp; <i>var7</i> = QVariant(), const QVariant &amp; <i>var8</i> = QVariant() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVariant </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#call-2">call</a></b> ( const QString &amp; <i>function</i>, QList&lt;QVariant&gt; &amp; <i>arguments</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#functions">functions</a></b> ( QAxScript::FunctionFlags <i>flags</i> = QAxScript::FunctionNames ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAxScript * </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#load">load</a></b> ( const QString &amp; <i>code</i>, const QString &amp; <i>name</i>, const QString &amp; <i>language</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAxScript * </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#load-2">load</a></b> ( const QString &amp; <i>file</i>, const QString &amp; <i>name</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAxScript * </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#script">script</a></b> ( const QString &amp; <i>name</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#scriptNames">scriptNames</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#error">error</a></b> ( QAxScript * <i>script</i>, int <i>code</i>, const QString &amp; <i>description</i>, int <i>sourcePosition</i>, const QString &amp; <i>sourceText</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#registerEngine">registerEngine</a></b> ( const QString &amp; <i>name</i>, const QString &amp; <i>extension</i>, const QString &amp; <i>code</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qaxscriptmanager.html#scriptFileFilter">scriptFileFilter</a></b> ()</td></tr>
</table>
<ul>
<li class="fn">7 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li class="fn">8 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QAxScriptManager-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QAxScriptManager class provides a bridge between application objects and script code.</p>
<p>The QAxScriptManager acts as a bridge between the COM objects embedded in the Qt application through <a href="qaxobject.html">QAxObject</a> or <a href="qaxwidget.html">QAxWidget</a>, and the scripting languages available through the Windows Script technologies, usually JScript and VBScript.</p>
<p>Create one QAxScriptManager for each separate document in your application, and add the COM objects the scripts need to access using <a href="qaxscriptmanager.html#addObject">addObject</a>(). Then <a href="qaxscriptmanager.html#load">load</a>() the script sources and invoke the functions using <a href="qaxscriptmanager.html#call">call</a>().</p>
<p><b>Warning:</b> This class is not available with the bcc5.5 and MingW compilers.</p>
</div>
<p><b>See also </b><a href="qaxscript.html">QAxScript</a>, <a href="qaxscriptengine.html">QAxScriptEngine</a>, <a href="qaxbase.html">QAxBase</a>, and <a href="activeqt.html#activeqt-framework">ActiveQt Framework</a>.</p>
<!-- @@@QAxScriptManager -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QAxScriptManager[overload1]$$$QAxScriptManagerQObject* -->
<h3 class="fn"><a name="QAxScriptManager"></a>QAxScriptManager::<span class="name">QAxScriptManager</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Creates a <a href="qaxscriptmanager.html">QAxScriptManager</a> object. <i>parent</i> is passed on to the <a href="qobject.html">QObject</a> constructor.</p>
<p>It is usual to create one <a href="qaxscriptmanager.html">QAxScriptManager</a> for each document in an application.</p>
<!-- @@@QAxScriptManager -->
<!-- $$$~QAxScriptManager[overload1]$$$~QAxScriptManager -->
<h3 class="fn"><a name="dtor.QAxScriptManager"></a>QAxScriptManager::<span class="name">~QAxScriptManager</span> ()</h3>
<p>Destroys the objects, releasing all allocated resources.</p>
<!-- @@@~QAxScriptManager -->
<!-- $$$addObject[overload1]$$$addObjectQAxBase* -->
<h3 class="fn"><a name="addObject"></a><span class="type">void</span> QAxScriptManager::<span class="name">addObject</span> ( <span class="type"><a href="qaxbase.html">QAxBase</a></span> * <i>object</i> )</h3>
<p>Adds <i>object</i> to the manager. Scripts handled by this manager can access the object in the code using the object's <a href="qobject.html#objectName-prop">objectName</a> property.</p>
<p>You must add all the necessary objects before loading any scripts.</p>
<!-- @@@addObject -->
<!-- $$$addObject$$$addObjectQObject* -->
<h3 class="fn"><a name="addObject-2"></a><span class="type">void</span> QAxScriptManager::<span class="name">addObject</span> ( <span class="type"><a href="qobject.html">QObject</a></span> * <i>object</i> )</h3>
<p>This is an overloaded function.</p>
<p>Adds a generic COM wrapper for <i>object</i> to the manager. <i>object</i> must be exposed as a COM object using the functionality provided by the <a href="qaxserver.html">QAxServer</a> module. Applications using this function you must link against the qaxserver library.</p>
<!-- @@@addObject -->
<!-- $$$call[overload1]$$$callconstQString&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant&constQVariant& -->
<h3 class="fn"><a name="call"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QAxScriptManager::<span class="name">call</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>function</i>, const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var1</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var2</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var3</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var4</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var5</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var6</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var7</i> = QVariant(), const <span class="type"><a href="qvariant.html">QVariant</a></span> &amp; <i>var8</i> = QVariant() )</h3>
<p>Calls <i>function</i>, passing the parameters <i>var1</i>, <i>var1</i>, <i>var2</i>, <i>var3</i>, <i>var4</i>, <i>var5</i>, <i>var6</i>, <i>var7</i> and <i>var8</i> as arguments and returns the value returned by the function, or an invalid <a href="qvariant.html">QVariant</a> if the function does not return a value or when the function call failed. The call returns when the script's execution has finished.</p>
<p>In most script engines the only supported parameter type is &quot;const <a href="qvariant.html">QVariant</a>&amp;&quot;, for example, to call a JavaScript function</p>
<pre class="cpp"> function setNumber(number)
 {
     n <span class="operator">=</span> number;
 }</pre>
<p>use</p>
<pre class="cpp"> <span class="type">QValueList</span> args;
 args <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">5</span>;
 script<span class="operator">-</span><span class="operator">&gt;</span>call(<span class="string">&quot;setNumber(const QVariant&amp;)&quot;</span><span class="operator">,</span> args);</pre>
<p>As with <a href="qaxbase.html#dynamicCall">dynamicCall</a> the parameters can directly be embedded in the function string.</p>
<pre class="cpp"> script<span class="operator">-</span><span class="operator">&gt;</span>call(<span class="string">&quot;setNumber(5)&quot;</span>);</pre>
<p>However, this is slower.</p>
<p>Functions provided by script engines that don't support introspection are not available and must be called directly using <a href="qaxscript.html#call">QAxScript::call</a>() on the respective <a href="qaxscriptmanager.html#script">script</a> object.</p>
<p>Note that calling this function can be significantely slower than using call() on the respective <a href="qaxscript.html">QAxScript</a> directly.</p>
<!-- @@@call -->
<!-- $$$call$$$callconstQString&QList<QVariant>& -->
<h3 class="fn"><a name="call-2"></a><span class="type"><a href="qvariant.html">QVariant</a></span> QAxScriptManager::<span class="name">call</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>function</i>, <span class="type"><a href="qlist.html">QList</a></span>&lt;<span class="type"><a href="qvariant.html">QVariant</a></span>&gt; &amp; <i>arguments</i> )</h3>
<p>This is an overloaded function.</p>
<p>Calls <i>function</i> passing <i>arguments</i> as parameters, and returns the result. Returns when the script's execution has finished.</p>
<!-- @@@call -->
<!-- $$$error[overload1]$$$errorQAxScript*intconstQString&intconstQString& -->
<h3 class="fn"><a name="error"></a><span class="type">void</span> QAxScriptManager::<span class="name">error</span> ( <span class="type"><a href="qaxscript.html">QAxScript</a></span> * <i>script</i>, <span class="type">int</span> <i>code</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>description</i>, <span class="type">int</span> <i>sourcePosition</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>sourceText</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when an execution error occurred while running <i>script</i>.</p>
<p><i>code</i>, <i>description</i>, <i>sourcePosition</i> and <i>sourceText</i> contain information about the execution error.</p>
<p><b>Warning:</b> Do not delete <i>script</i> in a slot connected to this signal. Use <a href="qobject.html#deleteLater">deleteLater</a>() instead.</p>
<!-- @@@error -->
<!-- $$$functions[overload1]$$$functionsQAxScript::FunctionFlags -->
<h3 class="fn"><a name="functions"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QAxScriptManager::<span class="name">functions</span> ( <span class="type"><a href="qaxscript.html#FunctionFlags-enum">QAxScript::FunctionFlags</a></span> <i>flags</i> = QAxScript::FunctionNames ) const</h3>
<p>Returns a list with all the functions that are available. Functions provided by script engines that don't support introspection are not included in the list. The functions are either provided with full prototypes or only as names, depending on the value of <i>flags</i>.</p>
<!-- @@@functions -->
<!-- $$$load[overload1]$$$loadconstQString&constQString&constQString& -->
<h3 class="fn"><a name="load"></a><span class="type"><a href="qaxscript.html">QAxScript</a></span> * QAxScriptManager::<span class="name">load</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>code</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>language</i> )</h3>
<p>Loads the script source <i>code</i> using the script engine for <i>language</i>. The script can later be referred to using its <i>name</i> which should not be empty.</p>
<p>The function returns a pointer to the script for the given <i>code</i> if the <i>code</i> was loaded successfully; otherwise it returns 0.</p>
<p>If <i>language</i> is empty it will be determined heuristically. If <i>code</i> contains the string &quot;End Sub&quot; it will be interpreted as VBScript, otherwise as JScript. Additional script engines can be registered using <a href="qaxscriptmanager.html#registerEngine">registerEngine</a>().</p>
<p>You must add all the objects necessary (using <a href="qaxscriptmanager.html#addObject">addObject</a>()) <i>before</i> loading any scripts. If <i>code</i> declares a function that is already available (no matter in which language) the first function is overloaded and can no longer be called via <a href="qaxscriptmanager.html#call">call</a>(); but it will still be available by calling its <a href="qaxscriptmanager.html#script">script</a> directly.</p>
<p><b>See also </b><a href="qaxscriptmanager.html#addObject">addObject</a>(), <a href="qaxscriptmanager.html#scriptNames">scriptNames</a>(), and <a href="qaxscriptmanager.html#functions">functions</a>().</p>
<!-- @@@load -->
<!-- $$$load$$$loadconstQString&constQString& -->
<h3 class="fn"><a name="load-2"></a><span class="type"><a href="qaxscript.html">QAxScript</a></span> * QAxScriptManager::<span class="name">load</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>file</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> )</h3>
<p>This is an overloaded function.</p>
<p>Loads the source code from the <i>file</i>. The script can later be referred to using its <i>name</i> which should not be empty.</p>
<p>The function returns a pointer to the script engine for the code in <i>file</i> if <i>file</i> was loaded successfully; otherwise it returns 0.</p>
<p>The script engine used is determined from the file's extension. By default &quot;.js&quot; files are interpreted as JScript files, and &quot;.vbs&quot; and &quot;.dsm&quot; files are interpreted as VBScript. Additional script engines can be registered using <a href="qaxscriptmanager.html#registerEngine">registerEngine</a>().</p>
<!-- @@@load -->
<!-- $$$registerEngine[overload1]$$$registerEngineconstQString&constQString&constQString& -->
<h3 class="fn"><a name="registerEngine"></a><span class="type">bool</span> QAxScriptManager::<span class="name">registerEngine</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>extension</i>, const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>code</i> = QString() )<tt> [static]</tt></h3>
<p>Registers the script engine called <i>name</i> and returns true if the engine was found; otherwise does nothing and returns false.</p>
<p>The script engine will be used when loading files with the given <i>extension</i>, or when loading source code that contains the string <i>code</i>.</p>
<!-- @@@registerEngine -->
<!-- $$$script[overload1]$$$scriptconstQString& -->
<h3 class="fn"><a name="script"></a><span class="type"><a href="qaxscript.html">QAxScript</a></span> * QAxScriptManager::<span class="name">script</span> ( const <span class="type"><a href="qstring.html">QString</a></span> &amp; <i>name</i> ) const</h3>
<p>Returns the script called <i>name</i>.</p>
<p>You can use the returned pointer to call functions directly through <a href="qaxscript.html#call">QAxScript::call</a>(), to access the script engine directly, or to delete and thus unload the script.</p>
<!-- @@@script -->
<!-- $$$scriptFileFilter[overload1]$$$scriptFileFilter -->
<h3 class="fn"><a name="scriptFileFilter"></a><span class="type"><a href="qstring.html">QString</a></span> QAxScriptManager::<span class="name">scriptFileFilter</span> ()<tt> [static]</tt></h3>
<p>Returns a file filter listing all the supported script languages. This filter string is convenient for use with <a href="qfiledialog.html">QFileDialog</a>.</p>
<!-- @@@scriptFileFilter -->
<!-- $$$scriptNames[overload1]$$$scriptNames -->
<h3 class="fn"><a name="scriptNames"></a><span class="type"><a href="qstringlist.html">QStringList</a></span> QAxScriptManager::<span class="name">scriptNames</span> () const</h3>
<p>Returns a list with the names of all the scripts.</p>
<!-- @@@scriptNames -->
</div>
      </div>
    </div>
    </div> 
    <div class="ft">
      <span></span>
    </div>
  </div> 
  <div class="footer">
    <p>
      <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
      Documentation contributions included herein are the copyrights of
      their respective owners.</p>
    <br />
    <p>
      The documentation provided herein is licensed under the terms of the
      <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
      License version 1.3</a> as published by the Free Software Foundation.</p>
    <p>
      Documentation sources may be obtained from <a href="http://www.qt-project.org">
      www.qt-project.org</a>.</p>
    <br />
    <p>
      Qt and respective logos are trademarks of The Qt Company Ltd 
      in Finland and/or other countries worldwide. All other trademarks are property
      of their respective owners. <a title="Privacy Policy"
      href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
  </div>

  <script src="scripts/functions.js" type="text/javascript"></script>
</body>
</html>