Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 3f684444755c5ad1181cdd5a97348f3c > files > 1692

PyQt4-devel-4.7.4-2.fc14.i686.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QWebDatabase Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QWebDatabase Class Reference<br /><sup><sup>[<a href="qtwebkit.html">QtWebKit</a> module]</sup></sup></h1><p>The QWebDatabase class provides access to HTML 5 databases created with JavaScript. <a href="#details">More...</a></p>
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qwebdatabase.html#QWebDatabase">__init__</a></b> (<i>self</i>, QWebDatabase)</li><li><div class="fn" />QString <b><a href="qwebdatabase.html#displayName">displayName</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qwebdatabase.html#expectedSize">expectedSize</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebdatabase.html#fileName">fileName</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qwebdatabase.html#name">name</a></b> (<i>self</i>)</li><li><div class="fn" />QWebSecurityOrigin <b><a href="qwebdatabase.html#origin">origin</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qwebdatabase.html#size">size</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" /><b><a href="qwebdatabase.html#removeAllDatabases">removeAllDatabases</a></b> ()</li><li><div class="fn" /><b><a href="qwebdatabase.html#removeDatabase">removeDatabase</a></b> (QWebDatabase)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QWebDatabase class provides access to HTML 5 databases created with JavaScript.</p>
<p>The upcoming HTML 5 standard includes support for SQL databases that web sites can create and access on a local computer through JavaScript. QWebDatabase is the C++ interface to these databases.</p>
<p>To get access to all databases defined by a security origin, use <a href="qwebsecurityorigin.html#databases">QWebSecurityOrigin.databases</a>(). Each database has an internal <a href="qwebdatabase.html#name">name</a>(), as well as a user-friendly name, provided by <a href="qwebdatabase.html#displayName">displayName</a>().</p>
<p><a href="examples.html#webkit">WebKit</a> uses SQLite to create and access the local SQL databases. The location of the database file in the local file system is returned by <a href="qwebdatabase.html#fileName">fileName</a>(). You can access the database directly through the <a href="qtsql.html">QtSql</a> database module.</p>
<p>For each database the web site can define an <a href="qwebdatabase.html#expectedSize">expectedSize</a>(). The current size of the database in bytes is returned by <a href="qwebdatabase.html#size">size</a>().</p>
<p>For more information refer to the <a href="http://dev.w3.org/html5/webdatabase/">HTML 5 Draft Standard</a>.</p>
<p>See also <a href="qwebsecurityorigin.html">QWebSecurityOrigin</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QWebDatabase" />QWebDatabase.__init__ (<i>self</i>, <a href="qwebdatabase.html">QWebDatabase</a>)</h3><p>Constructs a web database from <i>other</i>.</p>
<a name="//apple_ref/cpp/instm/QWebDatabase/~QWebDatabase" />
<h3 class="fn"><a name="displayName" />QString QWebDatabase.displayName (<i>self</i>)</h3><p>Returns the name of the database as seen by the user.</p>
<a name="//apple_ref/cpp/instm/QWebDatabase/expectedSize" />
<h3 class="fn"><a name="expectedSize" />int QWebDatabase.expectedSize (<i>self</i>)</h3><p>Returns the expected size of the database in bytes as defined by the web author.</p>
<a name="//apple_ref/cpp/instm/QWebDatabase/fileName" />
<h3 class="fn"><a name="fileName" />QString QWebDatabase.fileName (<i>self</i>)</h3><p>Returns the file name of the web database.</p>
<p>The name can be used to access the database through the <a href="qtsql.html">QtSql</a> database module, for example:</p>
<pre> QWebDatabase webdb = ...
 QSqlDatabase sqldb = QSqlDatabase.addDatabase("QSQLITE", "myconnection");
 sqldb.setDatabaseName(webdb.fileName());
 if (sqldb.open()) {
     QStringList tables = sqldb.tables();
     ...
 }</pre>
<p><b>Note:</b> Concurrent access to a database from multiple threads or processes is not very efficient because SQLite is used as <a href="examples.html#webkit">WebKit</a>'s database backend.</p>
<a name="//apple_ref/cpp/instm/QWebDatabase/name" />
<h3 class="fn"><a name="name" />QString QWebDatabase.name (<i>self</i>)</h3><p>Returns the name of the database.</p>
<a name="//apple_ref/cpp/instm/QWebDatabase/origin" />
<h3 class="fn"><a name="origin" /><a href="qwebsecurityorigin.html">QWebSecurityOrigin</a> QWebDatabase.origin (<i>self</i>)</h3><p>Returns the databases's security origin.</p>
<a name="//apple_ref/cpp/clm/QWebDatabase/removeAllDatabases" />
<h3 class="fn"><a name="removeAllDatabases" />QWebDatabase.removeAllDatabases ()</h3><p>Deletes all web databases in the configured offline storage path.</p>
<p>This function was introduced in Qt 4.6.</p>
<p>See also <a href="qwebsettings.html#setOfflineStoragePath">QWebSettings.setOfflineStoragePath</a>().</p>
<a name="//apple_ref/cpp/clm/QWebDatabase/removeDatabase" />
<h3 class="fn"><a name="removeDatabase" />QWebDatabase.removeDatabase (<a href="qwebdatabase.html">QWebDatabase</a>)</h3><p>Removes the database <i>db</i> from its security origin. All data stored in the database <i>db</i> will be destroyed.</p>
<a name="//apple_ref/cpp/instm/QWebDatabase/size" />
<h3 class="fn"><a name="size" />int QWebDatabase.size (<i>self</i>)</h3><p>Returns the current size of the database in bytes.</p>
<a name="//apple_ref/cpp/instm/QWebDatabase/operator=" />
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.4 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.3</td></tr></table></div></address></body></html>