qwebenginescriptcollection.html 11.6 KB
Newer Older
xuebingbing's avatar
xuebingbing committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qwebenginescriptcollection.cpp -->
  <title>QWebEngineScriptCollection Class | Qt WebEngine 5.11</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.11</a></td><td ><a href="qtwebengine-index.html">Qt WebEngine</a></td><td ><a href="qtwebengine-modules.html">C++ Classes</a></td><td >QWebEngineScriptCollection</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.11.2 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<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="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QWebEngineScriptCollection Class</h1>
<!-- $$$QWebEngineScriptCollection-brief -->
<p>The <a href="qwebenginescriptcollection.html">QWebEngineScriptCollection</a> class represents a collection of user scripts. <a href="#details">More...</a></p>
<!-- @@@QWebEngineScriptCollection -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QWebEngineScriptCollection&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += webenginewidgets</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.5</td></tr></table></div><ul>
<li><a href="qwebenginescriptcollection-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#dtor.QWebEngineScriptCollection">~QWebEngineScriptCollection</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#clear">clear</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#contains">contains</a></b>(const QWebEngineScript &amp;<i>value</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#count">count</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QWebEngineScript </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#findScript">findScript</a></b>(const QString &amp;<i>name</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QWebEngineScript&gt; </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#findScripts">findScripts</a></b>(const QString &amp;<i>name</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#insert">insert</a></b>(const QWebEngineScript &amp;<i>s</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#insert-1">insert</a></b>(const QList&lt;QWebEngineScript&gt; &amp;<i>list</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#isEmpty">isEmpty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#remove">remove</a></b>(const QWebEngineScript &amp;<i>script</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#size">size</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QWebEngineScript&gt; </td><td class="memItemRight bottomAlign"><b><a href="qwebenginescriptcollection.html#toList">toList</a></b>() const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QWebEngineScriptCollection-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qwebenginescriptcollection.html">QWebEngineScriptCollection</a> class represents a collection of user scripts.</p>
<p><a href="qwebenginescriptcollection.html">QWebEngineScriptCollection</a> manages a set of user scripts.</p>
<p>Use <a href="qwebenginepage.html#scripts">QWebEnginePage::scripts</a>() and <a href="qwebengineprofile.html#scripts">QWebEngineProfile::scripts</a>() to access the collection of scripts associated with a single page or a number of pages sharing the same profile.</p>
</div>
<!-- @@@QWebEngineScriptCollection -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$~QWebEngineScriptCollection[overload1]$$$~QWebEngineScriptCollection -->
<h3 class="fn" id="dtor.QWebEngineScriptCollection"><a name="dtor.QWebEngineScriptCollection"></a>QWebEngineScriptCollection::<span class="name">~QWebEngineScriptCollection</span>()</h3>
<p>Destroys the collection.</p>
<!-- @@@~QWebEngineScriptCollection -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><a name="clear"></a><span class="type">void</span> QWebEngineScriptCollection::<span class="name">clear</span>()</h3>
<p>Removes all scripts from this collection.</p>
<!-- @@@clear -->
<!-- $$$contains[overload1]$$$containsconstQWebEngineScript& -->
<h3 class="fn" id="contains"><a name="contains"></a><span class="type">bool</span> QWebEngineScriptCollection::<span class="name">contains</span>(const <span class="type"><a href="qwebenginescript.html">QWebEngineScript</a></span> &amp;<i>value</i>) const</h3>
<p>Returns <code>true</code> if the collection contains an occurrence of <i>value</i>; otherwise returns <code>false</code>.</p>
<!-- @@@contains -->
<!-- $$$count[overload1]$$$count -->
<h3 class="fn" id="count"><a name="count"></a><span class="type">int</span> QWebEngineScriptCollection::<span class="name">count</span>() const</h3>
<p>Returns the number of elements in the collection.</p>
<!-- @@@count -->
<!-- $$$findScript[overload1]$$$findScriptconstQString& -->
<h3 class="fn" id="findScript"><a name="findScript"></a><span class="type"><a href="qwebenginescript.html">QWebEngineScript</a></span> QWebEngineScriptCollection::<span class="name">findScript</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>) const</h3>
<p>Returns the first script found in the collection with the name <i>name</i>, or a null <a href="qwebenginescript.html">QWebEngineScript</a> if none was found.</p>
<p><b>Note: </b>The order in which the script collection is traversed is undefined, which means this should be used when the unicity is guaranteed at the application level.</p><p><b>See also </b><a href="qwebenginescriptcollection.html#findScripts">findScripts</a>().</p>
<!-- @@@findScript -->
<!-- $$$findScripts[overload1]$$$findScriptsconstQString& -->
<h3 class="fn" id="findScripts"><a name="findScripts"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qwebenginescript.html">QWebEngineScript</a></span>&gt; QWebEngineScriptCollection::<span class="name">findScripts</span>(const <span class="type"><a href="../qtcore/qstring.html">QString</a></span> &amp;<i>name</i>) const</h3>
<p>Returns the list of scripts in the collection with the name <i>name</i>, or an empty list if none was found.</p>
<!-- @@@findScripts -->
<!-- $$$insert[overload1]$$$insertconstQWebEngineScript& -->
<h3 class="fn" id="insert"><a name="insert"></a><span class="type">void</span> QWebEngineScriptCollection::<span class="name">insert</span>(const <span class="type"><a href="qwebenginescript.html">QWebEngineScript</a></span> &amp;<i>s</i>)</h3>
<p>Inserts the script <i>s</i> into the collection.</p>
<!-- @@@insert -->
<!-- $$$insert$$$insertconstQList<QWebEngineScript>& -->
<h3 class="fn" id="insert-1"><a name="insert-1"></a><span class="type">void</span> QWebEngineScriptCollection::<span class="name">insert</span>(const <span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qwebenginescript.html">QWebEngineScript</a></span>&gt; &amp;<i>list</i>)</h3>
<p>Inserts scripts from the list <i>list</i> into the collection.</p>
<!-- @@@insert -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn" id="isEmpty"><a name="isEmpty"></a><span class="type">bool</span> QWebEngineScriptCollection::<span class="name">isEmpty</span>() const</h3>
<p>Returns <code>true</code> if the collection is empty; otherwise returns <code>false</code>.</p>
<!-- @@@isEmpty -->
<!-- $$$remove[overload1]$$$removeconstQWebEngineScript& -->
<h3 class="fn" id="remove"><a name="remove"></a><span class="type">bool</span> QWebEngineScriptCollection::<span class="name">remove</span>(const <span class="type"><a href="qwebenginescript.html">QWebEngineScript</a></span> &amp;<i>script</i>)</h3>
<p>Removes <i>script</i> from the collection.</p>
<p>Returns <code>true</code> if the script was found and successfully removed from the collection; otherwise returns <code>false</code>.</p>
<!-- @@@remove -->
<!-- $$$size[overload1]$$$size -->
<h3 class="fn" id="size"><a name="size"></a><span class="type">int</span> QWebEngineScriptCollection::<span class="name">size</span>() const</h3>
<p>Returns the number of elements in the collection.</p>
<!-- @@@size -->
<!-- $$$toList[overload1]$$$toList -->
<h3 class="fn" id="toList"><a name="toList"></a><span class="type"><a href="../qtcore/qlist.html">QList</a></span>&lt;<span class="type"><a href="qwebenginescript.html">QWebEngineScript</a></span>&gt; QWebEngineScriptCollection::<span class="name">toList</span>() const</h3>
<p>Returns a list with the values of the scripts used in this collection.</p>
<!-- @@@toList -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2018 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    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.<br/>    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. </p>
</div>
</body>
</html>