.TH "KHTMLPart" 3 "28 Jan 2004" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KHTMLPart \- This class is khtml's main class. HTML Browser Widget.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <khtml_part.h>\fP
.PP
Inherits \fBKParts::ReadOnlyPart\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBGUIProfile\fP { \fBDefaultGUI\fP, \fBBrowserViewGUI\fP }"
.br
.in -1c
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBsetActiveNode\fP (const  \fBDOM::Node\fP &node)"
.br
.RI "\fISets the focussed node of the document to the specified node. \fP"
.ti -1c
.RI "void \fBstopAnimations\fP ()"
.br
.RI "\fIStops all animated images on the current and child pages. \fP"
.ti -1c
.RI "\fBQCString\fP \fBdcopObjectId\fP () const "
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBonURL\fP (const  \fBQString\fP &\fBurl\fP)"
.br
.RI "\fIEmitted if the cursor is moved over an URL. \fP"
.ti -1c
.RI "void \fBpopupMenu\fP (const  \fBQString\fP &\fBurl\fP, const  \fBQPoint\fP &point)"
.br
.RI "\fIEmitted when the user clicks the right mouse button on the document. \fP"
.ti -1c
.RI "void \fBselectionChanged\fP ()"
.br
.RI "\fIThis signal is emitted when the selection changes. \fP"
.ti -1c
.RI "void \fBnodeActivated\fP (const  \fBDOM::Node\fP &)"
.br
.RI "\fIThis signal is emitted when an element retrieves the keyboard focus. \fP"
.ti -1c
.RI "void \fBdocCreated\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKHTMLPart\fP (\fBQWidget\fP *parentWidget=0, const  char *widgetname=0, \fBQObject\fP *\fBparent\fP=0, const  char *\fBname\fP=0, GUIProfile prof=DefaultGUI)"
.br
.RI "\fIConstructs a new KHTMLPart. \fP"
.ti -1c
.RI "\fBKHTMLPart\fP (\fBKHTMLView\fP *view, \fBQObject\fP *\fBparent\fP=0, const  char *\fBname\fP=0, GUIProfile prof=DefaultGUI)"
.br
.ti -1c
.RI "virtual \fB~KHTMLPart\fP ()"
.br
.RI "\fIDestructor. \fP"
.ti -1c
.RI "virtual bool \fBopenURL\fP (const  \fBKURL\fP &\fBurl\fP)"
.br
.RI "\fIOpens the specified URL \fCurl\fP. \fP"
.ti -1c
.RI "virtual bool \fBcloseURL\fP ()"
.br
.RI "\fIStops loading the document and kill all data requests (for images, etc.). \fP"
.ti -1c
.RI "virtual void \fBshowError\fP (\fBKIO::Job\fP *job)"
.br
.RI "\fIis called when a certain error situation (i.e. \fP"
.ti -1c
.RI "\fBDOM::HTMLDocument\fP \fBhtmlDocument\fP () const "
.br
.RI "\fIReturns a reference to the \fBDOM\fP HTML document (for non-HTML documents, returns null). \fP"
.ti -1c
.RI "\fBDOM::Document\fP \fBdocument\fP () const "
.br
.RI "\fIReturns a reference to the \fBDOM\fP document. \fP"
.ti -1c
.RI "\fBDOM::Node\fP \fBactiveNode\fP () const "
.br
.RI "\fIReturns the node that has the keyboard focus. \fP"
.ti -1c
.RI "\fBKParts::BrowserExtension\fP * \fBbrowserExtension\fP () const "
.br
.RI "\fIReturns a pointer to the \fBKParts::BrowserExtension\fP. \fP"
.ti -1c
.RI "\fBKParts::LiveConnectExtension\fP * \fBliveConnectExtension\fP (const  khtml::RenderPart *) const "
.br
.ti -1c
.RI "\fBKHTMLView\fP * \fBview\fP () const "
.br
.RI "\fIReturns a pointer to the HTML document's view. \fP"
.ti -1c
.RI "void \fBsetJScriptEnabled\fP (bool enable)"
.br
.RI "\fIEnable/disable Javascript support. \fP"
.ti -1c
.RI "bool \fBjScriptEnabled\fP () const "
.br
.RI "\fIReturns \fCtrue\fP if Javascript support is enabled or \fCfalse\fP otherwise. \fP"
.ti -1c
.RI "void \fBsetMetaRefreshEnabled\fP (bool enable)"
.br
.RI "\fIEnable/disable the automatic forwarding by <meta http-equiv='refresh' ....>. \fP"
.ti -1c
.RI "bool \fBmetaRefreshEnabled\fP () const "
.br
.RI "\fIReturns \fCtrue\fP if automatic forwarding is enabled. \fP"
.ti -1c
.RI "\fBQVariant\fP \fBexecuteScript\fP (const  \fBQString\fP &script)"
.br
.RI "\fIExecute the specified snippet of JavaScript code. \fP"
.ti -1c
.RI "\fBQVariant\fP \fBexecuteScript\fP (const  \fBDOM::Node\fP &n, const  \fBQString\fP &script)"
.br
.RI "\fISame as above except the Node parameter specifying the 'this' value. \fP"
.ti -1c
.RI "void \fBsetDNDEnabled\fP (bool b)"
.br
.RI "\fIEnables or disables Drag'n'Drop support. \fP"
.ti -1c
.RI "bool \fBdndEnabled\fP () const "
.br
.RI "\fIReturns whether Dragn'n'Drop support is enabled or not. \fP"
.ti -1c
.RI "void \fBsetJavaEnabled\fP (bool enable)"
.br
.RI "\fIEnables/disables Java applet support. \fP"
.ti -1c
.RI "bool \fBjavaEnabled\fP () const "
.br
.RI "\fIReturn if Java applet support is enabled/disabled. \fP"
.ti -1c
.RI "KJavaAppletContext * \fBjavaContext\fP ()"
.br
.RI "\fIReturns the java context of the applets. \fP"
.ti -1c
.RI "KJavaAppletContext * \fBcreateJavaContext\fP ()"
.br
.RI "\fIReturns the java context of the applets. \fP"
.ti -1c
.RI "void \fBsetPluginsEnabled\fP (bool enable)"
.br
.RI "\fIEnables or disables plugins via, default is enabled. \fP"
.ti -1c
.RI "bool \fBpluginsEnabled\fP () const "
.br
.RI "\fIReturns trie if plugins are enabled/disabled. \fP"
.ti -1c
.RI "void \fBsetAutoloadImages\fP (bool enable)"
.br
.RI "\fISpecifies whether images contained in the document should be loaded automatically or not. \fP"
.ti -1c
.RI "bool \fBautoloadImages\fP () const "
.br
.RI "\fIReturns whether images contained in the document are loaded automatically or not. \fP"
.ti -1c
.RI "void \fBsetOnlyLocalReferences\fP (bool enable)"
.br
.RI "\fISecurity option. \fP"
.ti -1c
.RI "bool \fBonlyLocalReferences\fP () const "
.br
.RI "\fIReturnd whether references should be loaded ( default false ). \fP"
.ti -1c
.RI "void \fBenableJScript\fP (bool e)"
.br
.ti -1c
.RI "void \fBenableJava\fP (bool e)"
.br
.ti -1c
.RI "void \fBenablePlugins\fP (bool e)"
.br
.ti -1c
.RI "void \fBautoloadImages\fP (bool e)"
.br
.ti -1c
.RI "void \fBenableMetaRefresh\fP (bool e)"
.br
.ti -1c
.RI "bool \fBsetCharset\fP (const  \fBQString\fP &, bool)"
.br
.ti -1c
.RI "\fBKURL\fP \fBbaseURL\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBbaseTarget\fP () const "
.br
.ti -1c
.RI "\fBKURL\fP \fBbackgroundURL\fP () const "
.br
.RI "\fIReturns the URL for the background Image (used by save background). \fP"
.ti -1c
.RI "void \fBscheduleRedirection\fP (int delay, const  \fBQString\fP &\fBurl\fP, bool lockHistory=true)"
.br
.RI "\fISchedules a redirection after \fCdelay\fP seconds. \fP"
.ti -1c
.RI "virtual void \fBbegin\fP (const  \fBKURL\fP &\fBurl\fP=\fBKURL\fP(), int xOffset=0, int yOffset=0)"
.br
.RI "\fIClears the widget and prepares it for new content. \fP"
.ti -1c
.RI "virtual void \fBwrite\fP (const  char *str, int len=-1)"
.br
.RI "\fIWrites another part of the HTML code to the widget. \fP"
.ti -1c
.RI "virtual void \fBwrite\fP (const  \fBQString\fP &str)"
.br
.RI "\fIWrites another part of the HTML code to the widget. \fP"
.ti -1c
.RI "virtual void \fBend\fP ()"
.br
.RI "\fICall this after your last call to \fBwrite\fP(). \fP"
.ti -1c
.RI "void \fBpaint\fP (\fBQPainter\fP *, const  \fBQRect\fP &, int=0, bool *=0)"
.br
.RI "\fIPaints the HTML page to a \fBQPainter\fP. \fP"
.ti -1c
.RI "bool \fBsetEncoding\fP (const  \fBQString\fP &\fBname\fP, bool override=false)"
.br
.RI "\fISets the encoding the page uses. \fP"
.ti -1c
.RI "\fBQString\fP \fBencoding\fP () const "
.br
.RI "\fIReturns the encoding the page currently uses. \fP"
.ti -1c
.RI "void \fBsetUserStyleSheet\fP (const  \fBKURL\fP &\fBurl\fP)"
.br
.RI "\fISets a user defined style sheet to be used on top of the HTML 4 default style sheet. \fP"
.ti -1c
.RI "void \fBsetUserStyleSheet\fP (const  \fBQString\fP &styleSheet)"
.br
.RI "\fISets a user defined style sheet to be used on top of the HTML 4 default style sheet. \fP"
.ti -1c
.RI "void \fBsetStandardFont\fP (const  \fBQString\fP &\fBname\fP)"
.br
.RI "\fISets the standard font style. \fP"
.ti -1c
.RI "void \fBsetFixedFont\fP (const  \fBQString\fP &\fBname\fP)"
.br
.RI "\fISets the fixed font style. \fP"
.ti -1c
.RI "bool \fBgotoAnchor\fP (const  \fBQString\fP &\fBname\fP)"
.br
.RI "\fIFinds the anchor named \fCname\fP. \fP"
.ti -1c
.RI "void \fBsetURLCursor\fP (const  \fBQCursor\fP &c)"
.br
.RI "\fISets the cursor to use when the cursor is on a link. \fP"
.ti -1c
.RI "\fBQCursor\fP \fBurlCursor\fP () const "
.br
.RI "\fIReturns the cursor which is used when the cursor is on a link. \fP"
.ti -1c
.RI "void \fBfindTextBegin\fP ()"
.br
.RI "\fIInitiates a text search. \fP"
.ti -1c
.RI "bool \fBfindTextNext\fP (const  \fBQString\fP &str, bool forward, bool caseSensitive, bool isRegExp)"
.br
.RI "\fIFinds the next occurence of the string or expression. \fP"
.ti -1c
.RI "void \fBsetZoomFactor\fP (int percent)"
.br
.RI "\fISets the Zoom factor. \fP"
.ti -1c
.RI "int \fBzoomFactor\fP () const "
.br
.RI "\fIReturns the current zoom factor. \fP"
.ti -1c
.RI "virtual \fBQString\fP \fBselectedText\fP () const "
.br
.RI "\fIReturns the text the user has marked. \fP"
.ti -1c
.RI "DOM::Range \fBselection\fP () const "
.br
.RI "\fIReturns the selected part of the HTML. \fP"
.ti -1c
.RI "void \fBsetSelection\fP (const  DOM::Range &)"
.br
.RI "\fISets the current selection. \fP"
.ti -1c
.RI "bool \fBhasSelection\fP () const "
.br
.RI "\fIHas the user selected anything? \fP"
.ti -1c
.RI "void \fBselectAll\fP ()"
.br
.RI "\fIMarks all text in the document as selected. \fP"
.ti -1c
.RI "void \fBshow\fP ()"
.br
.RI "\fIConvenience method to show the document's view. \fP"
.ti -1c
.RI "void \fBhide\fP ()"
.br
.RI "\fIConvenience method to hide the document's view. \fP"
.ti -1c
.RI "\fBKParts::PartManager\fP * \fBpartManager\fP ()"
.br
.RI "\fIReturns a reference to the partmanager instance which manages html frame objects. \fP"
.ti -1c
.RI "virtual void \fBsaveState\fP (\fBQDataStream\fP &stream)"
.br
.RI "\fISaves the KHTMLPart's complete state (including child frame objects) to the provided \fBQDataStream\fP. \fP"
.ti -1c
.RI "virtual void \fBrestoreState\fP (\fBQDataStream\fP &stream)"
.br
.RI "\fIRestores the KHTMLPart's previously saved state (including child frame objects) from the provided \fBQDataStream\fP. \fP"
.ti -1c
.RI "\fBDOM::Node\fP \fBnodeUnderMouse\fP () const "
.br
.RI "\fIReturns the \fCNode\fP currently under the mouse. \fP"
.ti -1c
.RI "const  \fBKHTMLSettings\fP * \fBsettings\fP () const "
.br
.ti -1c
.RI "\fBKHTMLPart\fP * \fBparentPart\fP ()"
.br
.RI "\fIReturns a pointer to the parent KHTMLPart if the part is a frame in an HTML frameset. \fP"
.ti -1c
.RI "\fBQStringList\fP \fBframeNames\fP () const "
.br
.RI "\fIReturns a list of names of all frame (including iframe) objects of the current document. \fP"
.ti -1c
.RI "\fBQPtrList\fP< \fBKParts::ReadOnlyPart\fP > \fBframes\fP () const "
.br
.ti -1c
.RI "\fBKHTMLPart\fP * \fBfindFrame\fP (const  \fBQString\fP &f)"
.br
.RI "\fIFinds a frame by name. \fP"
.ti -1c
.RI "\fBKParts::ReadOnlyPart\fP * \fBcurrentFrame\fP () const "
.br
.RI "\fIReturn the current frame (the one that has focus) Not necessarily a direct child of ours, framesets can be nested. \fP"
.ti -1c
.RI "bool \fBframeExists\fP (const  \fBQString\fP &frameName)"
.br
.RI "\fIReturns whether a frame with the specified name is exists or not. \fP"
.ti -1c
.RI "void \fBsetJSStatusBarText\fP (const  \fBQString\fP &text)"
.br
.RI "\fICalled by KJS. \fP"
.ti -1c
.RI "void \fBsetJSDefaultStatusBarText\fP (const  \fBQString\fP &text)"
.br
.RI "\fICalled by KJS. \fP"
.ti -1c
.RI "\fBQString\fP \fBjsStatusBarText\fP () const "
.br
.RI "\fICalled by KJS. \fP"
.ti -1c
.RI "\fBQString\fP \fBjsDefaultStatusBarText\fP () const "
.br
.RI "\fICalled by KJS. \fP"
.ti -1c
.RI "\fBQString\fP \fBreferrer\fP () const "
.br
.RI "\fIReferrer used for links in this page. \fP"
.ti -1c
.RI "\fBQString\fP \fBpageReferrer\fP () const "
.br
.RI "\fIReferrer used to obtain this page. \fP"
.ti -1c
.RI "\fBQString\fP \fBlastModified\fP () const "
.br
.RI "\fILast-modified date (in raw string format), if received in the [HTTP] headers. \fP"
.ti -1c
.RI "void \fBpreloadStyleSheet\fP (const  \fBQString\fP &\fBurl\fP, const  \fBQString\fP &stylesheet)"
.br
.RI "\fILoads a style sheet into the stylesheet cache. \fP"
.ti -1c
.RI "void \fBpreloadScript\fP (const  \fBQString\fP &\fBurl\fP, const  \fBQString\fP &script)"
.br
.RI "\fILoads a script into the script cache. \fP"
.ti -1c
.RI "bool \fBrestored\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBKURL\fP \fBcompleteURL\fP (const  \fBQString\fP &\fBurl\fP)"
.br
.RI "\fIreturns a \fBKURL\fP object for the given url. \fP"
.ti -1c
.RI "void \fBhtmlError\fP (int errorCode, const  \fBQString\fP &text, const  \fBKURL\fP &reqUrl)"
.br
.RI "\fIpresents a detailed error message to the user. \fP"
.ti -1c
.RI "virtual void \fBcustomEvent\fP (\fBQCustomEvent\fP *\fBevent\fP)"
.br
.ti -1c
.RI "virtual void \fBkhtmlMousePressEvent\fP (khtml::MousePressEvent *\fBevent\fP)"
.br
.RI "\fIEventhandler of the khtml::MousePressEvent. \fP"
.ti -1c
.RI "virtual void \fBkhtmlMouseDoubleClickEvent\fP (khtml::MouseDoubleClickEvent *)"
.br
.RI "\fIEventhandler for the khtml::MouseDoubleClickEvent. \fP"
.ti -1c
.RI "virtual void \fBkhtmlMouseMoveEvent\fP (khtml::MouseMoveEvent *\fBevent\fP)"
.br
.RI "\fIEventhandler for the khtml::MouseDoubleMoveEvent. \fP"
.ti -1c
.RI "virtual void \fBkhtmlMouseReleaseEvent\fP (khtml::MouseReleaseEvent *\fBevent\fP)"
.br
.RI "\fIEventhandler for the khtml::MouseMoveEvent. \fP"
.ti -1c
.RI "virtual void \fBkhtmlDrawContentsEvent\fP (khtml::DrawContentsEvent *)"
.br
.RI "\fIEventhandler for the khtml::DrawContentsEvent. \fP"
.ti -1c
.RI "virtual void \fBguiActivateEvent\fP (\fBKParts::GUIActivateEvent\fP *\fBevent\fP)"
.br
.RI "\fIInternal reimplementation of \fBKParts::Part::guiActivateEvent\fP . \fP"
.ti -1c
.RI "virtual bool \fBopenFile\fP ()"
.br
.RI "\fIInternal empty reimplementation of \fBKParts::ReadOnlyPart::openFile\fP . \fP"
.ti -1c
.RI "virtual void \fBurlSelected\fP (const  \fBQString\fP &\fBurl\fP, int button, int state, const  \fBQString\fP &_target, \fBKParts::URLArgs\fP args=\fBKParts::URLArgs\fP())"
.br
.ti -1c
.RI "virtual \fBKParts::ReadOnlyPart\fP * \fBcreatePart\fP (\fBQWidget\fP *parentWidget, const  char *widgetName, \fBQObject\fP *\fBparent\fP, const  char *\fBname\fP, const  \fBQString\fP &mimetype, \fBQString\fP &serviceName, \fBQStringList\fP &serviceTypes, const  \fBQStringList\fP &params)"
.br
.RI "\fIThis method is called when a new embedded object (include html frames) is to be created. \fP"
.ti -1c
.RI "bool \fBpluginPageQuestionAsked\fP (const  \fBQString\fP &mimetype) const "
.br
.ti -1c
.RI "void \fBsetPluginPageQuestionAsked\fP (const  \fBQString\fP &mimetype)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBDOM::HTMLTitleElementImpl\fP"
.br
.ti -1c
.RI "class \fBDOM::HTMLFrameElementImpl\fP"
.br
.ti -1c
.RI "class \fBDOM::HTMLIFrameElementImpl\fP"
.br
.ti -1c
.RI "class \fBDOM::HTMLObjectElementImpl\fP"
.br
.ti -1c
.RI "class \fBDOM::HTMLAnchorElementImpl\fP"
.br
.ti -1c
.RI "class \fBDOM::HTMLMetaElementImpl\fP"
.br
.ti -1c
.RI "class \fBDOM::NodeImpl\fP"
.br
.ti -1c
.RI "class \fBKHTMLRun\fP"
.br
.ti -1c
.RI "class \fBDOM::HTMLFormElementImpl\fP"
.br
.ti -1c
.RI "class \fBkhtml::RenderPartObject\fP"
.br
.ti -1c
.RI "class \fBKJS::Window\fP"
.br
.ti -1c
.RI "class \fBKJS::WindowFunc\fP"
.br
.ti -1c
.RI "class \fBKJS::JSEventListener\fP"
.br
.ti -1c
.RI "class \fBKJS::DOMDocument\fP"
.br
.ti -1c
.RI "class \fBKJSProxy\fP"
.br
.ti -1c
.RI "class \fBKHTMLPartBrowserExtension\fP"
.br
.ti -1c
.RI "class \fBDOM::DocumentImpl\fP"
.br
.ti -1c
.RI "class \fBDOM::HTMLDocumentImpl\fP"
.br
.ti -1c
.RI "class \fBKHTMLPartBrowserHostExtension\fP"
.br
.ti -1c
.RI "class \fBkhtml::HTMLTokenizer\fP"
.br
.ti -1c
.RI "class \fBXMLTokenizer\fP"
.br
.ti -1c
.RI "class \fBkhtml::RenderWidget\fP"
.br
.ti -1c
.RI "class \fBkhtml::CSSStyleSelector\fP"
.br
.ti -1c
.RI "class \fBKHTMLPartIface\fP"
.br
.ti -1c
.RI "class \fBKHTMLPartFunction\fP"
.br
.ti -1c
.RI "class \fBKHTMLPartPrivate\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class is khtml's main class. HTML Browser Widget. 

It features an almost complete web browser, and html renderer.
.PP
The easiest way to use this class (if you just want to display a an HTML page at some URL) is the following:
.PP
.PP
.nf

 \fBKURL\fP url = 'http://www.kde.org';
 KHTMLPart *w = new \fBKHTMLPart()\fP;
 w->openURL(url);
 w->\fBview()\fP->resize(500, 400);
 w->\fBshow()\fP;
 
.PP
.PP
If Java and JavaScript are enabled by default depends on the user's settings. If you do not need them, and escpecially if you display unfiltered data from untrusted sources, it is strongly recommended to turn them off. In that case, you should also turn off the automatic redirect and plugins:
.PP
.PP
.nf

 w->setJScriptEnabled(false);
 w->setJavaEnabled(false);
 w->setMetaRefreshEnabled(false);
 w->setPluginsEnabled(false);
 
.PP
.PP
Some apps want to write their HTML code directly into the widget instead of it opening an url. You can also do that in the following way:
.PP
.PP
.nf

 \fBQString\fP myHTMLCode = ...;
 KHTMLPart *w = new \fBKHTMLPart()\fP;
 w->\fBbegin()\fP;
 w->write(myHTMLCode);
 ...
 w->\fBend()\fP;
 
.PP
.PP
You can do as many calls to write as you want. But there are two \fBwrite\fP() methods, one accepting a \fBQString\fP one accepting a \fCchar\fP \fC*\fP argument. You should use one or the other (but not both) since the method using the \fCchar\fP \fC*\fP argument does an additional decoding step to convert the written data to Unicode.
.PP
\fBAuthor:\fP
.RS 4
Lars Knoll (knoll@kde.org) 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkhtml_part.h\fP,v 1.197.2.6 2003/07/10 12:13:14 waba Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 145 of file khtml_part.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KHTMLPart::KHTMLPart (\fBQWidget\fP * parentWidget = 0, const char * widgetname = 0, \fBQObject\fP * parent = 0, const char * name = 0, GUIProfile prof = DefaultGUI)"
.PP
Constructs a new KHTMLPart. KHTML basically consists of two objects: The KHTMLPart itself, holding the document data (\fBDOM\fP document), and the \fBKHTMLView\fP, derived from \fBQScrollView\fP, in which the document content is rendered in. You can specify two different parent objects for a KHTMLPart, one parent for the KHTMLPart document and on parent for the \fBKHTMLView\fP. If the second \fCparent\fP argument is 0L, then \fCparentWidget\fP is used as parent for both objects, the part and the view. Definition at line 138 of file khtml_part.cpp.
.PP
References KStdAccel::name(), parentPart(), and KParts::PartBase::setInstance().
.SS "KHTMLPart::~\fBKHTMLPart\fP ()\fC [virtual]\fP"
.PP
Destructor. Definition at line 262 of file khtml_part.cpp.
.PP
References closeURL(), and QObject::disconnect().
.SH "Member Function Documentation"
.PP 
.SS "bool KHTMLPart::openURL (const \fBKURL\fP & url)\fC [virtual]\fP"
.PP
Opens the specified URL \fCurl\fP. Reimplemented from \fBKParts::ReadOnlyPart::openURL\fP . Reimplemented from \fBKParts::ReadOnlyPart\fP.
.PP
Definition at line 337 of file khtml_part.cpp.
.PP
References closeURL(), KParts::ReadOnlyPart::completed(), QObject::connect(), KParts::URLArgs::contentType(), QValueList< KURL >::count(), KParts::URLArgs::doPost(), QValueList< KURL >::first(), KIO::get(), gotoAnchor(), KURL::hasRef(), KURL::hasSubURL(), KURL::host(), htmlError(), KIO::http_post(), QMap< QString, QString >::insert(), QString::isEmpty(), KURL::join(), KParts::ReadOnlyPart::m_url, KParts::URLArgs::metaData(), parentPart(), KURL::path(), QValueList< KURL >::pop_front(), KParts::URLArgs::postData, KURL::prettyURL(), KURL::protocol(), KURL::queryItem(), KParts::URLArgs::redirectedRequest(), KParts::URLArgs::reload, KURL::setPath(), KURL::split(), KParts::ReadOnlyPart::started(), QString::startsWith(), QString::toInt(), KURL::url(), and KParts::Part::widget().
.PP
Referenced by restoreState(), and setEncoding().
.SS "bool KHTMLPart::closeURL ()\fC [virtual]\fP"
.PP
Stops loading the document and kill all data requests (for images, etc.). Reimplemented from \fBKParts::ReadOnlyPart\fP.
.PP
Definition at line 492 of file khtml_part.cpp.
.PP
References KHTMLPageCache::cancelEntry(), KHTMLPageCache::cancelFetch(), KStdAccel::end(), end(), KParts::ReadOnlyPart::m_url, nodeActivated(), KURL::prettyURL(), and KHTMLPageCache::self().
.PP
Referenced by openURL(), restoreState(), setEncoding(), and ~KHTMLPart().
.SS "void KHTMLPart::showError (\fBKIO::Job\fP * job)\fC [virtual]\fP"
.PP
is called when a certain error situation (i.e. connection timed out) occured. default implementation either shows a \fBKIO\fP error dialog or loads a more verbose error description a as page, depending on the users configuration. \fCjob\fP is the job that signaled the error situation Definition at line 1149 of file khtml_part.cpp.
.PP
References KIO::Job::error(), KIO::Job::errorText(), htmlError(), and KIO::Job::showErrorDialog().
.SS "\fBDOM::HTMLDocument\fP KHTMLPart::htmlDocument () const"
.PP
Returns a reference to the \fBDOM\fP HTML document (for non-HTML documents, returns null). Definition at line 561 of file khtml_part.cpp.
.SS "\fBDOM::Document\fP KHTMLPart::document () const"
.PP
Returns a reference to the \fBDOM\fP document. Definition at line 569 of file khtml_part.cpp.
.PP
Referenced by selection().
.SS "\fBDOM::Node\fP KHTMLPart::activeNode () const"
.PP
Returns the node that has the keyboard focus. Definition at line 5044 of file khtml_part.cpp.
.SS "\fBKParts::BrowserExtension\fP * KHTMLPart::browserExtension () const"
.PP
Returns a pointer to the \fBKParts::BrowserExtension\fP. Definition at line 575 of file khtml_part.cpp.
.SS "\fBKHTMLView\fP * KHTMLPart::view () const"
.PP
Returns a pointer to the HTML document's view. Definition at line 580 of file khtml_part.cpp.
.PP
Referenced by khtmlMouseMoveEvent().
.SS "void KHTMLPart::setJScriptEnabled (bool enable)"
.PP
Enable/disable Javascript support. Note that this will in either case permanently override the default usersetting. If you want to have the default UserSettings, don't call this method. Definition at line 585 of file khtml_part.cpp.
.PP
References jScriptEnabled().
.SS "bool KHTMLPart::jScriptEnabled () const"
.PP
Returns \fCtrue\fP if Javascript support is enabled or \fCfalse\fP otherwise. Definition at line 594 of file khtml_part.cpp.
.PP
Referenced by setJScriptEnabled().
.SS "void KHTMLPart::setMetaRefreshEnabled (bool enable)"
.PP
Enable/disable the automatic forwarding by <meta http-equiv='refresh' ....>. Definition at line 601 of file khtml_part.cpp.
.SS "bool KHTMLPart::metaRefreshEnabled () const"
.PP
Returns \fCtrue\fP if automatic forwarding is enabled. Definition at line 606 of file khtml_part.cpp.
.SS "\fBQVariant\fP KHTMLPart::executeScript (const \fBQString\fP & script)"
.PP
Execute the specified snippet of JavaScript code. Returns \fCtrue\fP if JavaScript was enabled, no error occured and the code returned true itself or \fCfalse\fP otherwise. \fBThis class or method is obsolete, it is provided for compatibility only.\fP, use the one below. Definition at line 658 of file khtml_part.cpp.
.SS "\fBQVariant\fP KHTMLPart::executeScript (const \fBDOM::Node\fP & n, const \fBQString\fP & script)"
.PP
Same as above except the Node parameter specifying the 'this' value. Definition at line 666 of file khtml_part.cpp.
.PP
References DOM::Node::isNull(), QString::latin1(), DOM::Node::nodeName(), DOM::Node::nodeType(), and DOM::DOMString::string().
.SS "void KHTMLPart::setDNDEnabled (bool b)"
.PP
Enables or disables Drag'n'Drop support. A drag operation is started if the users drags a link. Definition at line 4290 of file khtml_part.cpp.
.SS "bool KHTMLPart::dndEnabled () const"
.PP
Returns whether Dragn'n'Drop support is enabled or not. Definition at line 4295 of file khtml_part.cpp.
.SS "void KHTMLPart::setJavaEnabled (bool enable)"
.PP
Enables/disables Java applet support. Note that calling this function will permanently override the User settings about Java applet support. Not calling this function is the only way to let the default settings apply. Definition at line 711 of file khtml_part.cpp.
.SS "bool KHTMLPart::javaEnabled () const"
.PP
Return if Java applet support is enabled/disabled. Definition at line 717 of file khtml_part.cpp.
.SS "KJavaAppletContext * KHTMLPart::javaContext ()"
.PP
Returns the java context of the applets. If no applet exists, 0 is returned. Definition at line 728 of file khtml_part.cpp.
.SS "KJavaAppletContext * KHTMLPart::createJavaContext ()"
.PP
Returns the java context of the applets. If no context exists yet, a new one is created. Definition at line 737 of file khtml_part.cpp.
.PP
References QObject::connect(), and KParts::Part::setStatusBarText().
.SS "void KHTMLPart::setPluginsEnabled (bool enable)"
.PP
Enables or disables plugins via, default is enabled. Definition at line 756 of file khtml_part.cpp.
.SS "bool KHTMLPart::pluginsEnabled () const"
.PP
Returns trie if plugins are enabled/disabled. Definition at line 762 of file khtml_part.cpp.
.SS "void KHTMLPart::setAutoloadImages (bool enable)"
.PP
Specifies whether images contained in the document should be loaded automatically or not. \fBNote:\fP
.RS 4
Request will be ignored if called before \fBbegin\fP(). 
.RE
.PP
Definition at line 842 of file khtml_part.cpp.
.PP
References KXMLGUIClient::actionCollection(), QPtrList::append(), KXMLGUIClient::plugActionList(), and KXMLGUIClient::unplugActionList().
.PP
Referenced by begin().
.SS "bool KHTMLPart::autoloadImages () const"
.PP
Returns whether images contained in the document are loaded automatically or not. \fBNote:\fP
.RS 4
that the returned information is unrelieable as long as no \fBbegin()\fP was called. 
.RE
.PP
Definition at line 866 of file khtml_part.cpp.
.SS "void KHTMLPart::setOnlyLocalReferences (bool enable)"
.PP
Security option. Specify whether only local references ( stylesheets, images, scripts, subdocuments ) should be loaded. ( default false - everything is loaded, if the more specific options allow ) Definition at line 1906 of file khtml_part.cpp.
.SS "bool KHTMLPart::onlyLocalReferences () const"
.PP
Returnd whether references should be loaded ( default false ). Definition at line 1901 of file khtml_part.cpp.
.SS "\fBKURL\fP KHTMLPart::backgroundURL () const"
.PP
Returns the URL for the background Image (used by save background). Definition at line 2792 of file khtml_part.cpp.
.PP
References KParts::ReadOnlyPart::m_url.
.SS "void KHTMLPart::scheduleRedirection (int delay, const \fBQString\fP & url, bool lockHistory = true)"
.PP
Schedules a redirection after \fCdelay\fP seconds. Definition at line 1728 of file khtml_part.cpp.
.SS "void KHTMLPart::begin (const \fBKURL\fP & url = \fBKURL\fP(), int xOffset = 0, int yOffset = 0)\fC [virtual]\fP"
.PP
Clears the widget and prepares it for new content. If you want \fBurl\fP() to return for example 'file:/tmp/test.html', you can use the following code: 
.PP
.nf

 view->begin( \fBKURL\fP('file:/tmp/test.html' ) );
 
.PP
.PP
\fBParameters:\fP
.RS 4
\fIurl\fP is the url of the document to be displayed. Even if you are generating the HTML on the fly, it may be useful to specify a directory so that any pixmaps are found.
.br
\fIxOffset\fP is the initial horizontal scrollbar value. Usually you don't want to use this.
.br
\fIyOffset\fP is the initial vertical scrollbar value. Usually you don't want to use this.
.RE
.PP
All child frames and the old document are removed if you call this method. Definition at line 1300 of file khtml_part.cpp.
.PP
References QValueList< KURL >::begin(), QObject::connect(), KParts::URLArgs::docState, QString::fromLatin1(), QString::isEmpty(), QValueList< KURL >::isEmpty(), KURL::isEmpty(), KURL::isValid(), KParts::ReadOnlyPart::m_url, KURL::prettyURL(), KURL::protocol(), KParts::URLArgs::serviceType, setAutoloadImages(), KURL::setPass(), KURL::setQuery(), KURL::setRef(), KURL::setUser(), setUserStyleSheet(), KParts::Part::setWindowCaption(), KURL::split(), QString::startsWith(), KURL::url(), KParts::URLArgs::xOffset, and KParts::URLArgs::yOffset.
.PP
Referenced by htmlError().
.SS "void KHTMLPart::write (const char * str, int len = -1)\fC [virtual]\fP"
.PP
Writes another part of the HTML code to the widget. You may call this function many times in sequence. But remember: The fewer calls you make, the faster the widget will be.
.PP
The HTML code is send through a decoder which decodes the stream to Unicode.
.PP
The \fClen\fP parameter is needed for streams encoded in utf-16, since these can have  chars in them. In case the encoding you're using isn't utf-16, you can safely leave out the length parameter.
.PP
Attention: Don't mix calls to \fBwrite\fP( const char *) with calls to \fBwrite\fP( const \fBQString\fP & ).
.PP
The result might not be what you want. Definition at line 1386 of file khtml_part.cpp.
.PP
References encoding(), QString::isEmpty(), KParts::ReadOnlyPart::m_url, and KURL::url().
.PP
Referenced by end(), and htmlError().
.SS "void KHTMLPart::write (const \fBQString\fP & str)\fC [virtual]\fP"
.PP
Writes another part of the HTML code to the widget. You may call this function many times in sequence. But remember: The fewer calls you make, the faster the widget will be. Definition at line 1424 of file khtml_part.cpp.
.PP
References QString::isNull(), KParts::ReadOnlyPart::m_url, and KURL::url().
.SS "void KHTMLPart::end ()\fC [virtual]\fP"
.PP
Call this after your last call to \fBwrite\fP(). Definition at line 1441 of file khtml_part.cpp.
.PP
References write().
.PP
Referenced by closeURL(), htmlError(), and stopAnimations().
.SS "void KHTMLPart::paint (\fBQPainter\fP *, const \fBQRect\fP &, int = 0, bool * = 0)"
.PP
Paints the HTML page to a \fBQPainter\fP. See \fBKHTMLView::paint\fP for details Definition at line 1450 of file khtml_part.cpp.
.SS "bool KHTMLPart::setEncoding (const \fBQString\fP & name, bool override = false)"
.PP
Sets the encoding the page uses. This can be different from the charset. The widget will try to reload the current page in the new encoding, if \fBurl()\fP is not empty. Definition at line 1800 of file khtml_part.cpp.
.PP
References closeURL(), KURL::isEmpty(), KParts::ReadOnlyPart::m_url, KStdAccel::name(), and openURL().
.SS "\fBQString\fP KHTMLPart::encoding () const"
.PP
Returns the encoding the page currently uses. Note that the encoding might be different from the charset. Definition at line 1818 of file khtml_part.cpp.
.PP
References KHTMLSettings::encoding().
.PP
Referenced by restoreState(), and write().
.SS "void KHTMLPart::setUserStyleSheet (const \fBKURL\fP & url)"
.PP
Sets a user defined style sheet to be used on top of the HTML 4 default style sheet. This gives a wide range of possibilities to change the layout of the page. Definition at line 1829 of file khtml_part.cpp.
.PP
References KURL::url().
.PP
Referenced by begin().
.SS "void KHTMLPart::setUserStyleSheet (const \fBQString\fP & styleSheet)"
.PP
Sets a user defined style sheet to be used on top of the HTML 4 default style sheet. This gives a wide range of possibilities to change the layout of the page. Definition at line 1835 of file khtml_part.cpp.
.SS "void KHTMLPart::setStandardFont (const \fBQString\fP & name)"
.PP
Sets the standard font style. \fBParameters:\fP
.RS 4
\fIname\fP The font name to use for standard text. 
.RE
.PP
Definition at line 1881 of file khtml_part.cpp.
.PP
References KStdAccel::name().
.SS "void KHTMLPart::setFixedFont (const \fBQString\fP & name)"
.PP
Sets the fixed font style. \fBParameters:\fP
.RS 4
\fIname\fP The font name to use for fixed text, e.g. the \fC<pre>\fP tag. 
.RE
.PP
Definition at line 1886 of file khtml_part.cpp.
.PP
References KStdAccel::name().
.SS "bool KHTMLPart::gotoAnchor (const \fBQString\fP & name)"
.PP
Finds the anchor named \fCname\fP. If the anchor is found, the widget scrolls to the closest position. Returns \fCif\fP the anchor has been found. Definition at line 1841 of file khtml_part.cpp.
.PP
References KStdAccel::name().
.PP
Referenced by openURL().
.SS "void KHTMLPart::setURLCursor (const \fBQCursor\fP & c)"
.PP
Sets the cursor to use when the cursor is on a link. Definition at line 1891 of file khtml_part.cpp.
.SS "\fBQCursor\fP KHTMLPart::urlCursor () const"
.PP
Returns the cursor which is used when the cursor is on a link. Definition at line 1896 of file khtml_part.cpp.
.SS "void KHTMLPart::findTextBegin ()"
.PP
Initiates a text search. Definition at line 1911 of file khtml_part.cpp.
.SS "bool KHTMLPart::findTextNext (const \fBQString\fP & str, bool forward, bool caseSensitive, bool isRegExp)"
.PP
Finds the next occurence of the string or expression. If isRegExp is true then str is converted to a \fBQRegExp\fP, and caseSensitive is ignored. Definition at line 1972 of file khtml_part.cpp.
.PP
References KStdAccel::forward(), DOM::DOMString::implementation(), QString::length(), QRegExp::matchedLength(), KStdAccel::next(), QRegExp::search(), QRegExp::setCaseSensitive(), and QConstString::string().
.SS "void KHTMLPart::setZoomFactor (int percent)"
.PP
Sets the Zoom factor. The value is given in percent, larger values mean a generally larger font and larger page contents. It is not guaranteed that all parts of the page are scaled with the same factor though.
.PP
The given value should be in the range of 20..300, values outside that range are not guaranteed to work. A value of 100 will disable all zooming and show the page with the sizes determined via the given lengths in the stylesheets. Definition at line 4096 of file khtml_part.cpp.
.PP
References KStdAccel::end(), QApplication::restoreOverrideCursor(), and QApplication::setOverrideCursor().
.PP
Referenced by restoreState().
.SS "int KHTMLPart::zoomFactor () const"
.PP
Returns the current zoom factor. Definition at line 4056 of file khtml_part.cpp.
.PP
Referenced by khtml::CSSStyleSelector::CSSStyleSelector(), KHTMLView::print(), and restoreState().
.SS "\fBQString\fP KHTMLPart::selectedText () const\fC [virtual]\fP"
.PP
Returns the text the user has marked. Definition at line 2300 of file khtml_part.cpp.
.PP
References DOM::Node::elementId(), KStdAccel::end(), DOM::Node::firstChild(), DOM::Node::handle(), QString::isEmpty(), DOM::Node::isNull(), QString::left(), QString::length(), QString::mid(), KStdAccel::next(), DOM::Node::nextSibling(), DOM::Node::nodeType(), DOM::Node::nodeValue(), DOM::Node::parentNode(), and DOM::DOMString::string().
.PP
Referenced by khtmlMouseReleaseEvent().
.SS "DOM::Range KHTMLPart::selection () const"
.PP
Returns the selected part of the HTML. Definition at line 2428 of file khtml_part.cpp.
.PP
References DOM::Document::createRange(), and document().
.SS "void KHTMLPart::setSelection (const DOM::Range &)"
.PP
Sets the current selection. Definition at line 2437 of file khtml_part.cpp.
.SS "bool KHTMLPart::hasSelection () const"
.PP
Has the user selected anything? Call \fBselectedText\fP() to retrieve the selected text.
.PP
\fBReturns:\fP
.RS 4
\fCtrue\fP if there is text selected. 
.RE
.PP
Definition at line 2418 of file khtml_part.cpp.
.SS "void KHTMLPart::selectAll ()"
.PP
Marks all text in the document as selected. Definition at line 4849 of file khtml_part.cpp.
.PP
References KStdAccel::next().
.SS "void KHTMLPart::show ()"
.PP
Convenience method to show the document's view. Equivalent to \fBwidget()\fP->\fBshow()\fP or \fBview()\fP->\fBshow()\fP . Definition at line 4032 of file khtml_part.cpp.
.SS "void KHTMLPart::hide ()"
.PP
Convenience method to hide the document's view. Equivalent to \fBwidget()\fP->\fBhide()\fP or \fBview()\fP->\fBhide()\fP. Definition at line 4038 of file khtml_part.cpp.
.SS "\fBKParts::PartManager\fP * KHTMLPart::partManager ()"
.PP
Returns a reference to the partmanager instance which manages html frame objects. Definition at line 3287 of file khtml_part.cpp.
.PP
References QObject::connect().
.PP
Referenced by currentFrame().
.SS "void KHTMLPart::saveState (\fBQDataStream\fP & stream)\fC [virtual]\fP"
.PP
Saves the KHTMLPart's complete state (including child frame objects) to the provided \fBQDataStream\fP. This is called from the \fBsaveState\fP() method of the \fBbrowserExtension\fP(). Definition at line 3770 of file khtml_part.cpp.
.PP
References KStdAccel::end(), KParts::ReadOnlyPart::m_url, and KURL::url().
.SS "void KHTMLPart::restoreState (\fBQDataStream\fP & stream)\fC [virtual]\fP"
.PP
Restores the KHTMLPart's previously saved state (including child frame objects) from the provided \fBQDataStream\fP. \fBSee also:\fP
.RS 4
\fBsaveState()\fP
.RE
.PP
This is called from the \fBrestoreState\fP() method of the \fBbrowserExtension\fP() . Definition at line 3848 of file khtml_part.cpp.
.PP
References QValueList< KURL >::begin(), closeURL(), QValueList< KURL >::ConstIterator(), KParts::URLArgs::docState, encoding(), frameNames(), KHTMLPageCache::isValid(), openURL(), KHTMLPageCache::self(), setZoomFactor(), KParts::URLArgs::xOffset, KParts::URLArgs::yOffset, and zoomFactor().
.SS "\fBDOM::Node\fP KHTMLPart::nodeUnderMouse () const"
.PP
Returns the \fCNode\fP currently under the mouse. Definition at line 4044 of file khtml_part.cpp.
.SS "\fBKHTMLPart\fP * KHTMLPart::parentPart ()"
.PP
Returns a pointer to the parent KHTMLPart if the part is a frame in an HTML frameset. Returns 0L otherwise. Definition at line 3726 of file khtml_part.cpp.
.PP
References QObject::parent().
.PP
Referenced by khtmlMouseMoveEvent(), khtmlMousePressEvent(), khtmlMouseReleaseEvent(), KHTMLPart(), and openURL().
.SS "\fBQStringList\fP KHTMLPart::frameNames () const"
.PP
Returns a list of names of all frame (including iframe) objects of the current document. Note that this method is not working recursively for sub-frames. Definition at line 4248 of file khtml_part.cpp.
.PP
References KStdAccel::end().
.PP
Referenced by restoreState().
.SS "\fBKHTMLPart\fP * KHTMLPart::findFrame (const \fBQString\fP & f)"
.PP
Finds a frame by name. Returns 0L if frame can't be found. Definition at line 3659 of file khtml_part.cpp.
.PP
References QObject::className(), KStdAccel::end(), and QObject::inherits().
.SS "\fBKParts::ReadOnlyPart\fP * KHTMLPart::currentFrame () const"
.PP
Return the current frame (the one that has focus) Not necessarily a direct child of ours, framesets can be nested. Returns 'this' if this part isn't a frameset. Definition at line 3699 of file khtml_part.cpp.
.PP
References KParts::PartManager::activePart(), QObject::inherits(), and partManager().
.SS "bool KHTMLPart::frameExists (const \fBQString\fP & frameName)"
.PP
Returns whether a frame with the specified name is exists or not. In contrary to the \fBfindFrame\fP method this one also returns true if the frame is defined but no displaying component has been found/loaded, yet. Definition at line 3714 of file khtml_part.cpp.
.SS "void KHTMLPart::setJSStatusBarText (const \fBQString\fP & text)"
.PP
Called by KJS. Sets the StatusBarText assigned via window.status Definition at line 4152 of file khtml_part.cpp.
.PP
References KParts::Part::setStatusBarText().
.SS "void KHTMLPart::setJSDefaultStatusBarText (const \fBQString\fP & text)"
.PP
Called by KJS. Sets the DefaultStatusBarText assigned via window.defaultStatus Definition at line 4157 of file khtml_part.cpp.
.PP
References KParts::Part::setStatusBarText().
.SS "\fBQString\fP KHTMLPart::jsStatusBarText () const"
.PP
Called by KJS. Returns the StatusBarText assigned via window.status Definition at line 4162 of file khtml_part.cpp.
.SS "\fBQString\fP KHTMLPart::jsDefaultStatusBarText () const"
.PP
Called by KJS. Returns the DefaultStatusBarText assigned via window.defaultStatus Definition at line 4167 of file khtml_part.cpp.
.SS "\fBQString\fP KHTMLPart::referrer () const"
.PP
Referrer used for links in this page. Definition at line 4172 of file khtml_part.cpp.
.SS "\fBQString\fP KHTMLPart::pageReferrer () const"
.PP
Referrer used to obtain this page. Definition at line 4177 of file khtml_part.cpp.
.PP
References KURL::isValid(), KParts::ReadOnlyPart::m_url, KURL::protocol(), KURL::setPass(), KURL::setRef(), KURL::setUser(), and KURL::url().
.SS "\fBQString\fP KHTMLPart::lastModified () const"
.PP
Last-modified date (in raw string format), if received in the [HTTP] headers. Definition at line 4197 of file khtml_part.cpp.
.PP
References KURL::isLocalFile(), KParts::ReadOnlyPart::m_url, KURL::path(), and QDateTime::toString().
.SS "void KHTMLPart::preloadStyleSheet (const \fBQString\fP & url, const \fBQString\fP & stylesheet)"
.PP
Loads a style sheet into the stylesheet cache. Definition at line 5079 of file khtml_part.cpp.
.SS "void KHTMLPart::preloadScript (const \fBQString\fP & url, const \fBQString\fP & script)"
.PP
Loads a script into the script cache. Definition at line 5084 of file khtml_part.cpp.
.SS "void KHTMLPart::onURL (const \fBQString\fP & url)\fC [signal]\fP"
.PP
Emitted if the cursor is moved over an URL. Referenced by khtmlMouseMoveEvent().
.SS "void KHTMLPart::popupMenu (const \fBQString\fP & url, const \fBQPoint\fP & point)\fC [signal]\fP"
.PP
Emitted when the user clicks the right mouse button on the document. Referenced by khtmlMouseMoveEvent(), and khtmlMousePressEvent().
.SS "void KHTMLPart::selectionChanged ()\fC [signal]\fP"
.PP
This signal is emitted when the selection changes. Referenced by khtmlMouseReleaseEvent().
.SS "void KHTMLPart::nodeActivated (const \fBDOM::Node\fP &)\fC [signal]\fP"
.PP
This signal is emitted when an element retrieves the keyboard focus. Note that the signal argument can be a null node if no element is active, meaning a node has explicitly been deactivated without a new one becoming active. Referenced by closeURL().
.SS "\fBKURL\fP KHTMLPart::completeURL (const \fBQString\fP & url)\fC [protected]\fP"
.PP
returns a \fBKURL\fP object for the given url. Use when you know what you're doing. Definition at line 1718 of file khtml_part.cpp.
.PP
Referenced by khtmlMouseMoveEvent().
.SS "void KHTMLPart::htmlError (int errorCode, const \fBQString\fP & text, const \fBKURL\fP & reqUrl)\fC [protected]\fP"
.PP
presents a detailed error message to the user. \fCerrorCode\fP kio error code, eg KIO::ERR_SERVER_TIMEOUT. \fCtext\fP kio additional information text. \fCurl\fP the url that triggered the error. Definition at line 1166 of file khtml_part.cpp.
.PP
References QString::arg(), begin(), KIO::buildErrorString(), KParts::ReadOnlyPart::completed(), QDateTime::currentDateTime(), KStdAccel::description(), end(), KLocale::formatDateTime(), QString::fromLatin1(), KURL::htmlURL(), QStringList::join(), KGlobal::locale(), KParts::ReadOnlyPart::m_url, KIO::rawErrorDetail(), QString::replace(), KParts::ReadOnlyPart::started(), and write().
.PP
Referenced by openURL(), and showError().
.SS "void KHTMLPart::khtmlMousePressEvent (khtml::MousePressEvent * event)\fC [protected, virtual]\fP"
.PP
Eventhandler of the khtml::MousePressEvent. Definition at line 4335 of file khtml_part.cpp.
.PP
References QMouseEvent::button(), KNotifyClient::event(), QMouseEvent::globalPos(), DOM::Node::handle(), DOM::Node::isNull(), parentPart(), popupMenu(), and QMouseEvent::pos().
.SS "void KHTMLPart::khtmlMouseDoubleClickEvent (khtml::MouseDoubleClickEvent *)\fC [protected, virtual]\fP"
.PP
Eventhandler for the khtml::MouseDoubleClickEvent. Definition at line 4400 of file khtml_part.cpp.
.PP
References QMouseEvent::button(), KNotifyClient::event(), DOM::Node::handle(), and DOM::Node::isNull().
.SS "void KHTMLPart::khtmlMouseMoveEvent (khtml::MouseMoveEvent * event)\fC [protected, virtual]\fP"
.PP
Eventhandler for the khtml::MouseDoubleMoveEvent. Definition at line 4504 of file khtml_part.cpp.
.PP
References khtml::RenderObject::absolutePosition(), KMultipleDrag::addDragObject(), QString::arg(), completeURL(), QScrollView::contentsToViewport(), KGlobalSettings::dndEventDelay(), QDragObject::drag(), DOM::Node::elementId(), KNotifyClient::event(), DOM::Node::firstChild(), QMouseEvent::globalPos(), DOM::Node::handle(), DOM::Node::isNull(), QPixmap::isNull(), DOM::DOMString::length(), KURLDrag::metaData(), KMimeType::mimeType(), KURLDrag::newDrag(), KStdAccel::next(), DOM::Node::nextSibling(), onURL(), DOM::Node::parentNode(), parentPart(), KMimeType::pixmapForURL(), popupMenu(), QMouseEvent::pos(), QDragObject::setPixmap(), KParts::Part::setStatusBarText(), KIcon::SizeMedium, QMouseEvent::state(), DOM::DOMString::string(), view(), QPoint::x(), QMouseEvent::x(), QPoint::y(), and QMouseEvent::y().
.SS "void KHTMLPart::khtmlMouseReleaseEvent (khtml::MouseReleaseEvent * event)\fC [protected, virtual]\fP"
.PP
Eventhandler for the khtml::MouseMoveEvent. Definition at line 4674 of file khtml_part.cpp.
.PP
References QMouseEvent::button(), KParts::BrowserInterface::callMethod(), QApplication::clipboard(), QObject::connect(), QObject::disconnect(), KNotifyClient::event(), KURIFilter::filterURI(), DOM::Node::firstChild(), DOM::Node::isNull(), KStdAccel::next(), DOM::Node::nextSibling(), DOM::Node::parentNode(), parentPart(), QString::replace(), selectedText(), selectionChanged(), KURIFilter::self(), KURIFilterData::setData(), KParts::Part::setStatusBarText(), QClipboard::setText(), QClipboard::text(), KURIFilterData::uri(), KURIFilterData::uriType(), and KURL::url().
.SS "void KHTMLPart::khtmlDrawContentsEvent (khtml::DrawContentsEvent *)\fC [protected, virtual]\fP"
.PP
Eventhandler for the khtml::DrawContentsEvent. Definition at line 4777 of file khtml_part.cpp.
.SS "void KHTMLPart::guiActivateEvent (\fBKParts::GUIActivateEvent\fP * event)\fC [protected, virtual]\fP"
.PP
Internal reimplementation of \fBKParts::Part::guiActivateEvent\fP . Reimplemented from \fBKParts::ReadOnlyPart\fP.
.PP
Definition at line 4781 of file khtml_part.cpp.
.PP
References QPtrList::append(), KNotifyClient::event(), and KXMLGUIClient::plugActionList().
.SS "bool KHTMLPart::openFile ()\fC [protected, virtual]\fP"
.PP
Internal empty reimplementation of \fBKParts::ReadOnlyPart::openFile\fP . Implements \fBKParts::ReadOnlyPart\fP.
.PP
Definition at line 980 of file khtml_part.cpp.
.SS "\fBKParts::ReadOnlyPart\fP * KHTMLPart::createPart (\fBQWidget\fP * parentWidget, const char * widgetName, \fBQObject\fP * parent, const char * name, const \fBQString\fP & mimetype, \fBQString\fP & serviceName, \fBQStringList\fP & serviceTypes, const \fBQStringList\fP & params)\fC [protected, virtual]\fP"
.PP
This method is called when a new embedded object (include html frames) is to be created. Reimplement it if you want to add support for certain embeddable objects without registering them in the \fBKDE\fP wide registry system (KSyCoCa) . Another reason for re-implementing this method could be if you want to derive from KTHMLPart and also want all html frame objects to be a object of your derived type, in which case you should return a new instance for the mimetype 'text/html' . Definition at line 3246 of file khtml_part.cpp.
.PP
References QString::append(), QObject::className(), KLibFactory::create(), QFile::encodeName(), KLibLoader::factory(), KXMLGUIClient::factory(), QString::fromLatin1(), QObject::inherits(), QString::isEmpty(), KIO::mimetype(), KStdAccel::name(), KTrader::OfferList, KService::Ptr, KTrader::query(), KLibLoader::self(), and KTrader::self().
.SS "void KHTMLPart::setActiveNode (const \fBDOM::Node\fP & node)\fC [slot]\fP"
.PP
Sets the focussed node of the document to the specified node. If the node is a form control, the control will receive focus in the same way that it would if the user had clicked on it or tabbed to it with the keyboard. For most other types of elements, there is no visul indiction of whether or not they are focussed.
.PP
See \fBactiveNode\fP
.PP
\fBParameters:\fP
.RS 4
\fInode\fP The node to focus 
.RE
.PP
Definition at line 5030 of file khtml_part.cpp.
.PP
References QRect::bottom(), DOM::Node::handle(), QRect::left(), QRect::right(), and QRect::top().
.SS "void KHTMLPart::stopAnimations ()\fC [slot]\fP"
.PP
Stops all animated images on the current and child pages. Definition at line 1456 of file khtml_part.cpp.
.PP
References KStdAccel::end(), and end().

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
