QCefView
|
Represents the CEF setting. For more details please refer to: https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-cefsettings. More...
#include <QCefConfig.h>
Public Types | |
enum | LogLevel |
Represents the log severity. More... | |
Public Member Functions | |
QCefConfig () | |
Constructs a CEF config instance. | |
QCefConfig (const QCefConfig &other) | |
Constructs a CEF setting from existing one. | |
QCefConfig & | operator= (const QCefConfig &other) |
Assigns an existing config to current. | |
~QCefConfig () | |
Destructs the config. | |
void | addCommandLineSwitch (const QString &smitch) |
Adds a switch to the commandline args used to initialize the CEF. | |
void | addCommandLineSwitchWithValue (const QString &smitch, const QString &v) |
Adds a switch with value to the command line args used to initialize the CEF. | |
void | setWindowlessRenderingEnabled (const bool enabled) |
Sets the flag to enable/disable OSR mode. | |
const QVariant | windowlessRenderingEnabled () const |
Gets the OSR mode flag. | |
void | setStandaloneMessageLoopEnabled (const bool enabled) |
Sets the flag to enable/disable standalone message loop thread for CEF main thread. | |
const QVariant | standaloneMessageLoopEnabled () const |
Gets the standalone message loop flag. | |
void | setSandboxDisabled (const bool disabled) |
Sets the flag to enable/disable sandbox. | |
const QVariant | sandboxDisabled () const |
Gets the flag of sandbox status. | |
void | setCommandLinePassthroughDisabled (const bool disabled) |
Sets the flag to disable the command line pass through. | |
const QVariant | commandLinePassthroughDisabled () const |
Gets the flag of disable command line pass through. | |
void | setLogLevel (const LogLevel lvl) |
Sets the log level. | |
const QCefConfig::LogLevel | logLevel () const |
Gets the log level. | |
void | setLocale (const QString &locale) |
Sets the locale. | |
const QString | locale () const |
Gets the locale. | |
void | setUserAgent (const QString &agent) |
Sets the user agent. | |
const QString | userAgent () const |
Gets the user agent. | |
void | setCachePath (const QString &path) |
Sets the cache directory path. | |
const QString | cachePath () const |
Gets the cache directory path. | |
void | setUserDataPath (const QString &path) |
Sets the user data directory path. | |
const QString | userDataPath () const |
Gets the user data directory path. | |
void | setRootCachePath (const QString &path) |
Sets the root cache directory path. | |
const QString | rootCachePath () const |
Gets the root cache directory path. | |
void | setBridgeObjectName (const QString &name) |
Sets the bridge object name. | |
const QString | bridgeObjectName () const |
Gets the bridge object name. | |
void | setBuiltinSchemeName (const QString &name) |
Sets the built-in scheme name. | |
const QString | builtinSchemeName () const |
Gets the built-in scheme object name. | |
void | setBackgroundColor (const QColor &color) |
Sets the background color of the web page. | |
const QVariant | backgroundColor () const |
Gets the background color. | |
void | setAcceptLanguageList (const QString &languages) |
Sets the acceptable language list. | |
const QString | acceptLanguageList () const |
Get the acceptable language list. | |
void | setPersistSessionCookies (bool enabled) |
Sets whether to persist session cookie. | |
const QVariant | persistSessionCookies () const |
Gets whether to persist session cookie. | |
void | setPersistUserPreferences (bool enabled) |
Sets whether to persist user preferences. | |
const QVariant | persistUserPreferences () const |
Gets whether to persist user preferences. | |
void | setRemoteDebuggingPort (short port) |
Sets the remote debugging port. | |
const QVariant | remoteDebuggingPort () const |
Gets the remote debugging port. | |
Represents the CEF setting. For more details please refer to: https://bitbucket.org/chromiumembedded/cef/wiki/GeneralUsage.md#markdown-header-cefsettings.
enum QCefConfig::LogLevel |
Represents the log severity.
QCefConfig::QCefConfig | ( | ) |
Constructs a CEF config instance.
QCefConfig::QCefConfig | ( | const QCefConfig & | other | ) |
Constructs a CEF setting from existing one.
QCefConfig::~QCefConfig | ( | ) |
Destructs the config.
QCefConfig & QCefConfig::operator= | ( | const QCefConfig & | other | ) |
Assigns an existing config to current.
void QCefConfig::addCommandLineSwitch | ( | const QString & | smitch | ) |
Adds a switch to the commandline args used to initialize the CEF.
smitch | The switch name |
void QCefConfig::addCommandLineSwitchWithValue | ( | const QString & | smitch, |
const QString & | v ) |
Adds a switch with value to the command line args used to initialize the CEF.
smitch | The swtich name |
v | The switch value |
void QCefConfig::setWindowlessRenderingEnabled | ( | const bool | enabled | ) |
Sets the flag to enable/disable OSR mode.
enabled | True to enable OSR mode, false to disable |
const QVariant QCefConfig::windowlessRenderingEnabled | ( | ) | const |
Gets the OSR mode flag.
void QCefConfig::setStandaloneMessageLoopEnabled | ( | const bool | enabled | ) |
Sets the flag to enable/disable standalone message loop thread for CEF main thread.
enabled | True to use standalone thread, false to disable |
const QVariant QCefConfig::standaloneMessageLoopEnabled | ( | ) | const |
Gets the standalone message loop flag.
void QCefConfig::setSandboxDisabled | ( | const bool | disabled | ) |
Sets the flag to enable/disable sandbox.
disabled | True to enable sandbox, false to disable |
const QVariant QCefConfig::sandboxDisabled | ( | ) | const |
Gets the flag of sandbox status.
void QCefConfig::setCommandLinePassthroughDisabled | ( | const bool | disabled | ) |
Sets the flag to disable the command line pass through.
disabled | True to disable the command line pass through, false to enable |
const QVariant QCefConfig::commandLinePassthroughDisabled | ( | ) | const |
Gets the flag of disable command line pass through.
void QCefConfig::setLogLevel | ( | const LogLevel | lvl | ) |
Sets the log level.
lvl |
const QCefConfig::LogLevel QCefConfig::logLevel | ( | ) | const |
Gets the log level.
void QCefConfig::setLocale | ( | const QString & | locale | ) |
Sets the locale.
locale | The locale to use. If empty the default locale of "en-US" will be used. This value is ignored on Linux where locale is determined using environment variable parsing with the precedence order: LANGUAGE, LC_ALL, LC_MESSAGES and LANG. Also configurable using the "lang" command-line switch. |
const QString QCefConfig::locale | ( | ) | const |
Gets the locale.
void QCefConfig::setUserAgent | ( | const QString & | agent | ) |
Sets the user agent.
agent | The user agent |
const QString QCefConfig::userAgent | ( | ) | const |
Gets the user agent.
void QCefConfig::setCachePath | ( | const QString & | path | ) |
Sets the cache directory path.
path | The cache path |
const QString QCefConfig::cachePath | ( | ) | const |
Gets the cache directory path.
void QCefConfig::setUserDataPath | ( | const QString & | path | ) |
Sets the user data directory path.
path | The user data directory path |
const QString QCefConfig::userDataPath | ( | ) | const |
Gets the user data directory path.
void QCefConfig::setRootCachePath | ( | const QString & | path | ) |
Sets the root cache directory path.
path | The root cache directory path |
const QString QCefConfig::rootCachePath | ( | ) | const |
Gets the root cache directory path.
void QCefConfig::setBridgeObjectName | ( | const QString & | name | ) |
Sets the bridge object name.
name | The bridge object name |
The bridge object represents a Javascript object which will be inserted into all browser and frames. This object is designated for communicating between Javascript in web content and native context(C/C++) code. This object is set as an property of window object. That means it can be obtained by calling window.bridgeObject in the Javascript code
const QString QCefConfig::bridgeObjectName | ( | ) | const |
Gets the bridge object name.
void QCefConfig::setBuiltinSchemeName | ( | const QString & | name | ) |
Sets the built-in scheme name.
name | The scheme name |
The default value is CefView
const QString QCefConfig::builtinSchemeName | ( | ) | const |
Gets the built-in scheme object name.
void QCefConfig::setBackgroundColor | ( | const QColor & | color | ) |
Sets the background color of the web page.
color | The color to be set |
This only works if the web page has no background color set. The alpha component value will be adjusted to 0 or 255, it means if you pass a value with alpha value in the range of [1, 255], it will be accepted as 255. The default value is qRgba(255, 255, 255, 255)
const QVariant QCefConfig::backgroundColor | ( | ) | const |
Gets the background color.
void QCefConfig::setAcceptLanguageList | ( | const QString & | languages | ) |
Sets the acceptable language list.
languages | Comma delimited ordered list of language codes without any whitespace that will be used in the "Accept-Language" HTTP header. |
const QString QCefConfig::acceptLanguageList | ( | ) | const |
Get the acceptable language list.
void QCefConfig::setPersistSessionCookies | ( | bool | enabled | ) |
Sets whether to persist session cookie.
enabled | True if to persist session cookie |
const QVariant QCefConfig::persistSessionCookies | ( | ) | const |
Gets whether to persist session cookie.
void QCefConfig::setPersistUserPreferences | ( | bool | enabled | ) |
Sets whether to persist user preferences.
enabled | True if to persist user preferences |
const QVariant QCefConfig::persistUserPreferences | ( | ) | const |
Gets whether to persist user preferences.
void QCefConfig::setRemoteDebuggingPort | ( | short | port | ) |
Sets the remote debugging port.
port | The port to use |
CEF supports the remote debugging with Dev Tools in Chrome/Edge. if this value is set then you can debug the web application by accessing http://127.0.0.1:port from Chrome/Edge
const QVariant QCefConfig::remoteDebuggingPort | ( | ) | const |
Gets the remote debugging port.