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
TQWidget
0
widgetname
char
0
parent
TQObject
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
TQObject
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
(TQString)
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
TQString
createJavaContext
()
Not Implemented
createPart
(parentWidget, widgetName, parent, name, mimetype, serviceName, serviceTypes, params)
returns
(KParts.ReadOnlyPart)
Argument
Type
Default
parentWidget
TQWidget
widgetName
char
parent
TQObject
name
char
mimetype
TQString
serviceName
TQString
serviceTypes
TQStringList
params
TQStringList
currentFrame
()
returns
(KParts.ReadOnlyPart)
customEvent
(event)
returns
nothing
Argument
Type
Default
event
TQCustomEvent
dcopObjectId
()
returns
(TQCString)
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
TQString
doWriteStream
(data)
returns
(bool)
In versions KDE 3.2.0 and above only
Argument
Type
Default
data
TQByteArray
docCreated
()
returns
nothing
In versions KDE 3.1.0 and above only
document
()
returns
(DOM.Document)
documentSource
()
returns
(TQString)
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
(TQString)
end
()
returns
nothing
executeScript
(n, script)
returns
(TQVariant)
Argument
Type
Default
n
DOM.Node
script
TQString
executeScript
(script)
returns
(TQVariant)
In versions KDE 3.2.0 and above only
Argument
Type
Default
script
TQString
executeScript
(a0)
returns
(TQVariant)
In versions
less than
KDE 3.2.0 only
Argument
Type
Default
a0
TQString
findFrame
(f)
returns
(KHTMLPart)
Argument
Type
Default
f
TQString
findFrameParent
(callingPart, f)
returns
(KHTMLPart) childFrame (khtml.ChildFrame)
Argument
Type
Default
callingPart
KParts.ReadOnlyPart
f
TQString
findFramePart
(f)
returns
(KParts.ReadOnlyPart)
Argument
Type
Default
f
TQString
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
TQString
options
long
parent
TQWidget
0
findDialog
KFindDialog
0
findTextBegin
()
returns
nothing
findTextNext
(str, forward, caseSensitive, isRegExp)
returns
(bool)
Argument
Type
Default
str
TQString
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
TQString
formData
TQByteArray
target
TQString
contentType
TQString
boundary
TQString
frameExists
(frameName)
returns
(bool)
Argument
Type
Default
frameName
TQString
frameNames
()
returns
(TQStringList)
framejScript
(framePart)
returns
(KJSProxy)
Argument
Type
Default
framePart
KParts.ReadOnlyPart
frames
()
returns
(TQPtrList
)
gotoAnchor
(name)
returns
(bool)
Argument
Type
Default
name
TQString
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
TQString
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
(TQString)
jsStatusBarText
()
returns
(TQString)
khtmlDrawContentsEvent
(a0)
Not Implemented
khtmlMouseDoubleClickEvent
(a0)
Not Implemented
khtmlMouseMoveEvent
(event)
Not Implemented
khtmlMousePressEvent
(event)
Not Implemented
khtmlMouseReleaseEvent
(event)
Not Implemented
lastModified
()
returns
(TQString)
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
TQString
onlyLocalReferences
()
returns
(bool)
openFile
()
returns
(bool)
openURL
(url)
returns
(bool)
Argument
Type
Default
url
KURL
pageReferrer
()
returns
(TQString)
In versions KDE 3.1.3 and above only
paint
(a0, a1, a2 = 0)
returns
a3 (bool)
Argument
Type
Default
a0
TQPainter
a1
TQRect
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
TQString
pluginsEnabled
()
returns
(bool)
popupMenu
(url, point)
returns
nothing
Argument
Type
Default
url
TQString
point
TQPoint
preloadScript
(url, script)
returns
nothing
Argument
Type
Default
url
TQString
script
TQString
preloadStyleSheet
(url, stylesheet)
returns
nothing
Argument
Type
Default
url
TQString
stylesheet
TQString
prevAnchor
()
returns
(bool)
In versions KDE 3.2.0 and above only
referrer
()
returns
(TQString)
restoreState
(stream)
returns
nothing
Argument
Type
Default
stream
TQDataStream
restored
()
returns
(bool)
saveState
(stream)
returns
nothing
Argument
Type
Default
stream
TQDataStream
scheduleRedirection
(delay, url, lockHistory = 1)
returns
nothing
Argument
Type
Default
delay
int
url
TQString
lockHistory
bool
1
selectAll
()
returns
nothing
selectedText
()
returns
(TQString)
selectedTextAsHTML
()
returns
(TQString)
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
TQString
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
TQString
override
bool
0
setFixedFont
(name)
returns
nothing
Argument
Type
Default
name
TQString
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
TQString
setJSStatusBarText
(text)
returns
nothing
Argument
Type
Default
text
TQString
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
TQString
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
TQString
setStatusBarText
(a0, a1)
returns
nothing
Argument
Type
Default
a0
TQString
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
TQCursor
setUserStyleSheet
(url)
returns
nothing
Argument
Type
Default
url
KURL
setUserStyleSheet
(styleSheet)
returns
nothing
Argument
Type
Default
styleSheet
TQString
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 = TQString .null, boundary = TQString .null)
returns
nothing
In versions KDE 3.2.0 and above only
Argument
Type
Default
action
char
url
TQString
formData
TQByteArray
target
TQString
contentType
TQString
TQString .null
boundary
TQString
TQString .null
toplevelURL
()
returns
(KURL)
In versions KDE 3.2.0 and above only
urlCursor
()
returns
(TQCursor)
urlSelected
(url, button, state, _target, args = KParts .URLArgs ())
returns
nothing
Argument
Type
Default
url
TQString
button
int
state
int
_target
TQString
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
TQString
zoomFactor
()
returns
(int)