|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.webkit.QWebSettings
public final class QWebSettings
The QWebSettings
class provides an object to store the settings used by QWebPage
and QWebFrame
. Each QWebPage
object has its own QWebSettings
object, which configures the settings for that page. If a setting is not configured, then it is looked up in the global settings object, which can be accessed using QWebSettings::globalSettings()
.
QWebSettings
allows configuring font properties such as font size and font family, the location of a custom stylesheet, and generic attributes like java script, plugins, etc. The WebAttribute
enum further describes this.
QWebSettings
also configures global properties such as the web page memory cache and the web page icon database.
QWebPage::settings()
, QWebView::settings()
, and Browser.
Nested Class Summary | |
---|---|
static class |
QWebSettings.FontFamily
This enum describes the generic font families defined by CSS 2. |
static class |
QWebSettings.FontSize
This enum describes the font sizes configurable through QWebSettings . |
static class |
QWebSettings.WebAttribute
This enum describes various attributes that are configurable through QWebSettings . |
static class |
QWebSettings.WebGraphic
This enums describes the standard graphical elements used in webpages. |
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Method Summary | |||
---|---|---|---|
static void |
clearIconDatabase()
Clears the icon database. |
||
java.lang.String |
fontFamily(QWebSettings.FontFamily which)
Returns the actual font family for the specified generic font family, which. |
||
int |
fontSize(QWebSettings.FontSize type)
Returns the default font size for type. |
||
static QWebSettings |
fromNativePointer(QNativePointer nativePointer)
|
||
static QWebSettings |
globalSettings()
Returns the global settings object. |
||
static java.lang.String |
iconDatabasePath()
Returns the path of the icon database or an empty string if the icon database is disabled. |
||
static QIcon |
iconForUrl(QUrl url)
Returns the web site's icon for url. |
||
static int |
maximumPagesInCache()
Returns the maximum number of web pages that are kept in the memory cache. |
||
void |
resetAttribute(QWebSettings.WebAttribute attr)
Resets the setting of attribute. |
||
void |
resetFontFamily(QWebSettings.FontFamily which)
Resets the actual font family to the default font family, specified by which. |
||
void |
resetFontSize(QWebSettings.FontSize type)
Resets the font size for type to the size specified in the global settings object. |
||
void |
setAttribute(QWebSettings.WebAttribute attr,
boolean on)
Enables or disables the specified attribute feature depending on the value of on. |
||
void |
setFontFamily(QWebSettings.FontFamily which,
java.lang.String family)
Sets the actual font family to family for the specified generic family, which. |
||
void |
setFontSize(QWebSettings.FontSize type,
int size)
Sets the font size for type to size. |
||
static void |
setIconDatabasePath(java.lang.String location)
Sets the path of the icon database to path. |
||
static void |
setMaximumPagesInCache(int pages)
Sets the maximum number of pages to hold in the memory cache to pages. |
||
static void |
setObjectCacheCapacities(int cacheMinDeadCapacity,
int cacheMaxDead,
int totalCapacity)
Specifies the capacities for the memory cache for dead objects such as stylesheets or scripts. |
||
void |
setUserStyleSheetUrl(QUrl location)
Specifies the location of a user stylesheet to load with every web page. |
||
static void |
setWebGraphic(QWebSettings.WebGraphic type,
QPixmap graphic)
Sets graphic to be drawn when {@link |
boolean |
testAttribute(QWebSettings.WebAttribute attr)
Returns true if attribute is enabled; otherwise returns false. |
QUrl |
userStyleSheetUrl()
Returns the location of the user stylesheet. |
||
static QPixmap |
webGraphic(QWebSettings.WebGraphic type)
Returns a previously set pixmap used to draw replacement graphics of the specified type. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Method Detail |
---|
public final java.lang.String fontFamily(QWebSettings.FontFamily which)
setFontFamily()
.
public final int fontSize(QWebSettings.FontSize type)
setFontSize()
.
public final void resetAttribute(QWebSettings.WebAttribute attr)
QWebSettings
instance. globalSettings()
.
public final void resetFontFamily(QWebSettings.FontFamily which)
This function has no effect on the global QWebSettings
instance.
public final void resetFontSize(QWebSettings.FontSize type)
This function has no effect on the global QWebSettings
instance.
public final void setAttribute(QWebSettings.WebAttribute attr, boolean on)
public final void setFontFamily(QWebSettings.FontFamily which, java.lang.String family)
fontFamily()
.
public final void setFontSize(QWebSettings.FontSize type, int size)
fontSize()
.
public final void setUserStyleSheetUrl(QUrl location)
The location can be a URL or a path on the local filesystem.
userStyleSheetUrl()
.
public final boolean testAttribute(QWebSettings.WebAttribute attr)
public final QUrl userStyleSheetUrl()
setUserStyleSheetUrl()
.
public static void clearIconDatabase()
public static QWebSettings globalSettings()
Any setting changed on the default object is automatically applied to all QWebPage
instances where the particular setting is not overriden already.
public static java.lang.String iconDatabasePath()
setIconDatabasePath()
, and clearIconDatabase()
.
public static QIcon iconForUrl(QUrl url)
If the web site does not specify an icon, or the icon is not in the database, a null QIcon
is returned.
Note: The returned icon's size is arbitrary.
setIconDatabasePath()
.
public static int maximumPagesInCache()
setMaximumPagesInCache()
.
public static void setIconDatabasePath(java.lang.String location)
path must point to an existing directory where the icons are stored.
Setting an empty path disables the icon database.
iconDatabasePath()
.
public static void setMaximumPagesInCache(int pages)
maximumPagesInCache()
.
public static void setObjectCacheCapacities(int cacheMinDeadCapacity, int cacheMaxDead, int totalCapacity)
The cacheMinDeadCapacity specifies the minimum number of bytes that dead objects should consume when the cache is under pressure.
cacheMaxDead is the maximum number of bytes that dead objects should consume when the cache is not under pressure.
totalCapacity specifies the maximum number of bytes that the cache should consume overall.
The cache is enabled by default. Calling setObjectCacheCapacities
(0, 0, 0) will disable the cache. Calling it with one non-zero enables it again.
public static void setWebGraphic(QWebSettings.WebGraphic type, QPixmap graphic)
For example, when an image cannot be loaded the pixmap specified by MissingImageGraphic
is drawn instead.
webGraphic()
.
public static QPixmap webGraphic(QWebSettings.WebGraphic type)
For example, when an image cannot be loaded the pixmap specified by MissingImageGraphic
is drawn instead.
setWebGraphic()
.
public static QWebSettings fromNativePointer(QNativePointer nativePointer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |