PyKDE - Python Bindings for KDE
class KHTMLPart
Table of contents
Modules
khtml Classes
All Classes
Module
khtml
Class
KHTMLPart
Inherits
KParts.ReadOnlyPart
enums
CaretDisplayPolicy
= {CaretVisible, CaretInvisible, CaretBlink }
FindOptions
= {FindLinksOnly, FindNoPopups }
FormNotification
= {NoNotification = 0, Before, Only, Unused = 255 }
GUIProfile
= {DefaultGUI, BrowserViewGUI }
methods
KHTMLPart
(parentWidget = 0, widgetname = 0, parent = 0, name = 0, prof = DefaultGUI)
returns
a KHTMLPart instance
Argument
Type
Default
parentWidget
QWidget
0
widgetname
char
0
parent
QObject
0
name
char
0
prof
KHTMLPart.GUIProfile
DefaultGUI
KHTMLPart
(view, parent = 0, name = 0, prof = DefaultGUI)
returns
a KHTMLPart instance
Argument
Type
Default
view
KHTMLView
parent
QObject
0
name
char
0
prof
KHTMLPart.GUIProfile
DefaultGUI
activeNode
()
returns
(DOM.Node)
autoloadImages
()
returns
(bool)
autoloadImages
(e)
returns
nothing
Argument
Type
Default
e
bool
backgroundURL
()
returns
(KURL)
baseTarget
()
returns
(QString)
baseURL
()
returns
(KURL)
begin
(url = KURL (), xOffset = 0, yOffset = 0)
returns
nothing
Argument
Type
Default
url
KURL
KURL ()
xOffset
int
0
yOffset
int
0
browserExtension
()
returns
(KParts.BrowserExtension)
browserHostExtension
()
returns
(KParts.BrowserHostExtension)
caretDisplayPolicyNonFocused
()
returns
(KHTMLPart.CaretDisplayPolicy)
In versions KDE 3.2.0 and above only
caretPositionChanged
(node, offset)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
node
DOM.Node
offset
long
closeURL
()
returns
(bool)
completeURL
(url)
returns
(KURL)
Argument
Type
Default
url
QString
createJavaContext
()
Not Implemented
createPart
(parentWidget, widgetName, parent, name, mimetype, serviceName, serviceTypes, params)
returns
(KParts.ReadOnlyPart)
Argument
Type
Default
parentWidget
QWidget
widgetName
char
parent
QObject
name
char
mimetype
QString
serviceName
QString
serviceTypes
QStringList
params
QStringList
currentFrame
()
returns
(KParts.ReadOnlyPart)
customEvent
(event)
returns
nothing
Argument
Type
Default
event
QCustomEvent
dcopObjectId
()
returns
(QCString)
dndEnabled
()
returns
(bool)
doCloseStream
()
returns
(bool)
In versions KDE 3.2.0 and above only
doOpenStream
(mimeType)
returns
(bool)
In versions KDE 3.2.0 and above only
Argument
Type
Default
mimeType
QString
doWriteStream
(data)
returns
(bool)
In versions KDE 3.2.0 and above only
Argument
Type
Default
data
QByteArray
docCreated
()
returns
nothing
In versions KDE 3.1.0 and above only
document
()
returns
(DOM.Document)
documentSource
()
returns
(QString)
enableJScript
(e)
returns
nothing
Argument
Type
Default
e
bool
enableJava
(e)
returns
nothing
Argument
Type
Default
e
bool
enableMetaRefresh
(e)
returns
nothing
Argument
Type
Default
e
bool
enablePlugins
(e)
returns
nothing
Argument
Type
Default
e
bool
encoding
()
returns
(QString)
end
()
returns
nothing
executeScript
(n, script)
returns
(QVariant)
Argument
Type
Default
n
DOM.Node
script
QString
executeScript
(script)
returns
(QVariant)
In versions KDE 3.2.0 and above only
Argument
Type
Default
script
QString
executeScript
(a0)
returns
(QVariant)
In versions
less than
KDE 3.2.0 only
Argument
Type
Default
a0
QString
findFrame
(f)
returns
(KHTMLPart)
Argument
Type
Default
f
QString
findFrameParent
(callingPart, f)
returns
(KHTMLPart) childFrame (khtml.ChildFrame)
Argument
Type
Default
callingPart
KParts.ReadOnlyPart
f
QString
findFramePart
(f)
returns
(KParts.ReadOnlyPart)
Argument
Type
Default
f
QString
findText
()
returns
nothing
In versions KDE 3.3.0 and above only
findText
(str, options, parent = 0, findDialog = 0)
returns
nothing
In versions KDE 3.3.0 and above only
Argument
Type
Default
str
QString
options
long
parent
QWidget
0
findDialog
KFindDialog
0
findTextBegin
()
returns
nothing
findTextNext
(str, forward, caseSensitive, isRegExp)
returns
(bool)
Argument
Type
Default
str
QString
forward
bool
caseSensitive
bool
isRegExp
bool
findTextNext
()
returns
(bool)
In versions KDE 3.3.0 and above only
findTextNext
(reverse)
returns
(bool)
Argument
Type
Default
reverse
bool
formNotification
()
returns
(KHTMLPart.FormNotification)
In versions KDE 3.2.0 and above only
formSubmitNotification
(action, url, formData, target, contentType, boundary)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
action
char
url
QString
formData
QByteArray
target
QString
contentType
QString
boundary
QString
frameExists
(frameName)
returns
(bool)
Argument
Type
Default
frameName
QString
frameNames
()
returns
(QStringList)
framejScript
(framePart)
returns
(KJSProxy)
Argument
Type
Default
framePart
KParts.ReadOnlyPart
frames
()
returns
(QPtrList
)
gotoAnchor
(name)
returns
(bool)
Argument
Type
Default
name
QString
guiActivateEvent
(event)
returns
nothing
Argument
Type
Default
event
KParts.GUIActivateEvent
hasSelection
()
returns
(bool)
hide
()
returns
nothing
htmlDocument
()
returns
(DOM.HTMLDocument)
htmlError
(errorCode, text, reqUrl)
returns
nothing
Argument
Type
Default
errorCode
int
text
QString
reqUrl
KURL
inProgress
()
returns
(bool)
isCaretMode
()
returns
(bool)
In versions KDE 3.2.0 and above only
isEditable
()
returns
(bool)
In versions KDE 3.2.0 and above only
isModified
()
returns
(bool)
In versions KDE 3.3.0 and above only
jScriptEnabled
()
returns
(bool)
jScriptInterpreter
()
Not Implemented
javaContext
()
Not Implemented
javaEnabled
()
returns
(bool)
jsDefaultStatusBarText
()
returns
(QString)
jsStatusBarText
()
returns
(QString)
khtmlDrawContentsEvent
(a0)
Not Implemented
khtmlMouseDoubleClickEvent
(a0)
Not Implemented
khtmlMouseMoveEvent
(event)
Not Implemented
khtmlMousePressEvent
(event)
Not Implemented
khtmlMouseReleaseEvent
(event)
Not Implemented
lastModified
()
returns
(QString)
liveConnectExtension
(a0)
Not Implemented
metaRefreshEnabled
()
returns
(bool)
nextAnchor
()
returns
(bool)
In versions KDE 3.2.0 and above only
nodeActivated
(a0)
returns
nothing
Argument
Type
Default
a0
DOM.Node
nodeUnderMouse
()
returns
(DOM.Node)
nonSharedNodeUnderMouse
()
returns
(DOM.Node)
onURL
(url)
returns
nothing
Argument
Type
Default
url
QString
onlyLocalReferences
()
returns
(bool)
openFile
()
returns
(bool)
openURL
(url)
returns
(bool)
Argument
Type
Default
url
KURL
pageReferrer
()
returns
(QString)
In versions KDE 3.1.3 and above only
paint
(a0, a1, a2 = 0)
returns
a3 (bool)
Argument
Type
Default
a0
QPainter
a1
QRect
a2
int
0
parentPart
()
returns
(KHTMLPart)
partManager
()
returns
(KParts.PartManager)
pluginPageQuestionAsked
(mimetype)
returns
(bool)
In versions KDE 3.1.0 and above only
Argument
Type
Default
mimetype
QString
pluginsEnabled
()
returns
(bool)
popupMenu
(url, point)
returns
nothing
Argument
Type
Default
url
QString
point
QPoint
preloadScript
(url, script)
returns
nothing
Argument
Type
Default
url
QString
script
QString
preloadStyleSheet
(url, stylesheet)
returns
nothing
Argument
Type
Default
url
QString
stylesheet
QString
prevAnchor
()
returns
(bool)
In versions KDE 3.2.0 and above only
referrer
()
returns
(QString)
restoreState
(stream)
returns
nothing
Argument
Type
Default
stream
QDataStream
restored
()
returns
(bool)
saveState
(stream)
returns
nothing
Argument
Type
Default
stream
QDataStream
scheduleRedirection
(delay, url, lockHistory = 1)
returns
nothing
Argument
Type
Default
delay
int
url
QString
lockHistory
bool
1
selectAll
()
returns
nothing
selectedText
()
returns
(QString)
selectedTextAsHTML
()
returns
(QString)
selection
()
returns
(DOM.Range)
selection
(startNode, endNode)
returns
startOffset (long) endOffset (long)
In versions KDE 3.2.0 and above only
Argument
Type
Default
startNode
DOM.Node
endNode
DOM.Node
selectionChanged
()
returns
nothing
setActiveNode
(node)
returns
nothing
Argument
Type
Default
node
DOM.Node
setAutoloadImages
(enable)
returns
nothing
Argument
Type
Default
enable
bool
setCaretDisplayPolicyNonFocused
(policy)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
policy
KHTMLPart.CaretDisplayPolicy
setCaretMode
(enable)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
enable
bool
setCaretPosition
(node, offset, extendSelection = 0)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
node
DOM.Node
offset
long
extendSelection
bool
0
setCaretVisible
(show)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
show
bool
setCharset
(a0, a1 = 0)
returns
(bool)
Argument
Type
Default
a0
QString
a1
bool
0
setDNDEnabled
(b)
returns
nothing
Argument
Type
Default
b
bool
setEditable
(enable)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
enable
bool
setEncoding
(name, override = 0)
returns
(bool)
Argument
Type
Default
name
QString
override
bool
0
setFixedFont
(name)
returns
nothing
Argument
Type
Default
name
QString
setFormNotification
(fn)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
fn
KHTMLPart.FormNotification
setJSDefaultStatusBarText
(text)
returns
nothing
Argument
Type
Default
text
QString
setJSStatusBarText
(text)
returns
nothing
Argument
Type
Default
text
QString
setJScriptEnabled
(enable)
returns
nothing
Argument
Type
Default
enable
bool
setJavaEnabled
(enable)
returns
nothing
Argument
Type
Default
enable
bool
setMetaRefreshEnabled
(enable)
returns
nothing
Argument
Type
Default
enable
bool
setOnlyLocalReferences
(enable)
returns
nothing
Argument
Type
Default
enable
bool
setPageSecurity
(sec)
Not Implemented
setPluginPageQuestionAsked
(mimetype)
returns
nothing
In versions KDE 3.1.0 and above only
Argument
Type
Default
mimetype
QString
setPluginsEnabled
(enable)
returns
nothing
Argument
Type
Default
enable
bool
setSelection
(a0)
returns
nothing
Argument
Type
Default
a0
DOM.Range
setStandardFont
(name)
returns
nothing
Argument
Type
Default
name
QString
setStatusBarText
(a0, a1)
returns
nothing
Argument
Type
Default
a0
QString
a1
int
setStatusMessagesEnabled
(enable)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
enable
bool
setSuppressedPopupIndicator
(enable)
returns
nothing
Argument
Type
Default
enable
bool
setSuppressedPopupIndicator
(enable, originPart)
returns
nothing
Argument
Type
Default
enable
bool
originPart
KHTMLPart
setURLCursor
(c)
returns
nothing
Argument
Type
Default
c
QCursor
setUserStyleSheet
(url)
returns
nothing
Argument
Type
Default
url
KURL
setUserStyleSheet
(styleSheet)
returns
nothing
Argument
Type
Default
styleSheet
QString
setZoomFactor
(percent)
returns
nothing
Argument
Type
Default
percent
int
settings
()
returns
(KHTMLSettings)
show
()
returns
nothing
showError
(job)
returns
nothing
Argument
Type
Default
job
KIO.Job
statusMessagesEnabled
()
returns
(bool)
In versions KDE 3.2.0 and above only
stopAnimations
()
returns
nothing
submitFormProxy
(action, url, formData, target, contentType = QString .null, boundary = QString .null)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
action
char
url
QString
formData
QByteArray
target
QString
contentType
QString
QString .null
boundary
QString
QString .null
toplevelURL
()
returns
(KURL)
In versions KDE 3.2.0 and above only
urlCursor
()
returns
(QCursor)
urlSelected
(url, button, state, _target, args = KParts .URLArgs ())
returns
nothing
Argument
Type
Default
url
QString
button
int
state
int
_target
QString
args
KParts.URLArgs
KParts .URLArgs ()
view
()
returns
(KHTMLView)
write
(str, len = -1)
returns
nothing
Argument
Type
Default
str
char
len
int
-1
write
(str)
returns
nothing
Argument
Type
Default
str
QString
zoomFactor
()
returns
(int)