Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtWebKit.QWebDatabase Class Reference

The QWebDatabase class provides access to HTML 5 databases created with JavaScript. More...

Inheritance diagram for QtWebKit.QWebDatabase:
Collaboration diagram for QtWebKit.QWebDatabase:

Public Member Functions

 QWebDatabase (QWebDatabase other)
  More...
 
virtual void CreateProxy ()
 
new void Dispose ()
 

Static Public Member Functions

static void RemoveAllDatabases ()
  More...
 
static void RemoveDatabase (QWebDatabase db)
  More...
 

Protected Member Functions

 QWebDatabase (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

string DisplayName [get]
  More...
 
long ExpectedSize [get]
  More...
 
string FileName [get]
  More...
 
string Name [get]
  More...
 
QWebSecurityOrigin Origin [get]
  More...
 
long Size [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QWebDatabase class provides access to HTML 5 databases created with JavaScript.

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.

Databases are grouped together in security origins. To get access to all databases defined by a security origin, use QWebSecurityOrigin::databases(). Each database has an internal name(), as well as a user-friendly name, provided by displayName(). These names are specified when creating the database in the JavaScript code.

WebKit uses SQLite to create and access the local SQL databases. The location of the database file in the local file system is returned by fileName(). You can access the database directly through the QtSql database module.

For each database the web site can define an expectedSize(). The current size of the database in bytes is returned by size().

For more information refer to the HTML5 Web SQL Database Draft Standard.

See also QWebSecurityOrigin.

Constructor & Destructor Documentation

QtWebKit.QWebDatabase.QWebDatabase ( System.Type  dummy)
protected
QtWebKit.QWebDatabase.QWebDatabase ( QWebDatabase  other)

Constructs a web database from other.

Here is the call graph for this function:

Member Function Documentation

virtual void QtWebKit.QWebDatabase.CreateProxy ( )
virtual

Here is the caller graph for this function:

new void QtWebKit.QWebDatabase.Dispose ( )
static void QtWebKit.QWebDatabase.RemoveAllDatabases ( )
static

Deletes all web databases in the configured offline storage path.

This function was introduced in Qt 4.6.

See also QWebSettings::setOfflineStoragePath().

static void QtWebKit.QWebDatabase.RemoveDatabase ( QWebDatabase  db)
static

Removes the database db from its security origin. All data stored in the database db will be destroyed.

Member Data Documentation

SmokeInvocation QtWebKit.QWebDatabase.interceptor
protected

Property Documentation

string QtWebKit.QWebDatabase.DisplayName
get

Returns the name of the database in a format that is suitable for display to the user.

long QtWebKit.QWebDatabase.ExpectedSize
get

Returns the expected size of the database in bytes as defined by the web author.

string QtWebKit.QWebDatabase.FileName
get

Returns the file name of the web database.

The name can be used to access the database through the QtSql database module, for example:

QWebDatabase webdb = ...

QSqlDatabase sqldb = QSqlDatabase::addDatabase("QSQLITE", "myconnection");

sqldb.setDatabaseName(webdb.fileName());

if (sqldb.open()) {

QStringList tables = sqldb.tables();

...

}

Note: Concurrent access to a database from multiple threads or processes is not very efficient because SQLite is used as WebKit's database backend.

string QtWebKit.QWebDatabase.Name
get

Returns the name of the database.

QWebSecurityOrigin QtWebKit.QWebDatabase.Origin
get

Returns the databases's security origin.

long QtWebKit.QWebDatabase.Size
get

Returns the current size of the database in bytes.

virtual System.IntPtr QtWebKit.QWebDatabase.SmokeObject
getset