\section{KHTMLPart Class Reference}
\label{classKHTMLPart}\index{KHTMLPart@{KHTMLPart}}
This class is khtml's main class. HTML Browser Widget.  


{\tt \#include $<$khtml\_\-part.h$>$}

Inheritance diagram for KHTMLPart:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=99pt]{classKHTMLPart__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KHTMLPart:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=138pt]{classKHTMLPart__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf GUIProfile} \{ {\bf Default\-GUI}, 
{\bf Browser\-View\-GUI}
 \}
\end{CompactItemize}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf set\-Active\-Node} (const  {\bf DOM::Node} \&node)
\begin{CompactList}\small\item\em Sets the focussed node of the document to the specified node. \item\end{CompactList}\item 
void {\bf stop\-Animations} ()
\begin{CompactList}\small\item\em Stops all animated images on the current and child pages. \item\end{CompactList}\item 
{\bf QCString} {\bf dcop\-Object\-Id} () const \label{classKHTMLPart_i2}

\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf on\-URL} (const  {\bf QString} \&{\bf url})
\begin{CompactList}\small\item\em Emitted if the cursor is moved over an URL. \item\end{CompactList}\item 
void {\bf popup\-Menu} (const  {\bf QString} \&{\bf url}, const  {\bf QPoint} \&point)
\begin{CompactList}\small\item\em Emitted when the user clicks the right mouse button on the document. \item\end{CompactList}\item 
void {\bf selection\-Changed} ()
\begin{CompactList}\small\item\em This signal is emitted when the selection changes. \item\end{CompactList}\item 
void {\bf node\-Activated} (const  {\bf DOM::Node} \&)
\begin{CompactList}\small\item\em This signal is emitted when an element retrieves the keyboard focus. \item\end{CompactList}\item 
void {\bf doc\-Created} ()\label{classKHTMLPart_l4}

\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KHTMLPart} ({\bf QWidget} $\ast$parent\-Widget=0, const  char $\ast$widgetname=0, {\bf QObject} $\ast${\bf parent}=0, const  char $\ast${\bf name}=0, GUIProfile prof=Default\-GUI)
\begin{CompactList}\small\item\em Constructs a new KHTMLPart. \item\end{CompactList}\item 
{\bf KHTMLPart} ({\bf KHTMLView} $\ast$view, {\bf QObject} $\ast${\bf parent}=0, const  char $\ast${\bf name}=0, GUIProfile prof=Default\-GUI)\label{classKHTMLPart_a1}

\item 
virtual {\bf $\sim$KHTMLPart} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
virtual bool {\bf open\-URL} (const  {\bf KURL} \&{\bf url})
\begin{CompactList}\small\item\em Opens the specified URL {\tt url}. \item\end{CompactList}\item 
virtual bool {\bf close\-URL} ()
\begin{CompactList}\small\item\em Stops loading the document and kill all data requests (for images, etc.). \item\end{CompactList}\item 
virtual void {\bf show\-Error} ({\bf KIO::Job} $\ast$job)
\begin{CompactList}\small\item\em is called when a certain error situation (i.e. \item\end{CompactList}\item 
{\bf DOM::HTMLDocument} {\bf html\-Document} () const 
\begin{CompactList}\small\item\em Returns a reference to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} HTML document (for non-HTML documents, returns null). \item\end{CompactList}\item 
{\bf DOM::Document} {\bf document} () const 
\begin{CompactList}\small\item\em Returns a reference to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} document. \item\end{CompactList}\item 
{\bf DOM::Node} {\bf active\-Node} () const 
\begin{CompactList}\small\item\em Returns the node that has the keyboard focus. \item\end{CompactList}\item 
{\bf KParts::Browser\-Extension} $\ast$ {\bf browser\-Extension} () const 
\begin{CompactList}\small\item\em Returns a pointer to the {\bf KParts::Browser\-Extension}. \item\end{CompactList}\item 
{\bf KParts::Live\-Connect\-Extension} $\ast$ {\bf live\-Connect\-Extension} (const  khtml::Render\-Part $\ast$) const \label{classKHTMLPart_a10}

\item 
{\bf KHTMLView} $\ast$ {\bf view} () const 
\begin{CompactList}\small\item\em Returns a pointer to the HTML document's view. \item\end{CompactList}\item 
void {\bf set\-JScript\-Enabled} (bool enable)
\begin{CompactList}\small\item\em Enable/disable Javascript support. \item\end{CompactList}\item 
bool {\bf j\-Script\-Enabled} () const 
\begin{CompactList}\small\item\em Returns {\tt true} if Javascript support is enabled or {\tt false} otherwise. \item\end{CompactList}\item 
void {\bf set\-Meta\-Refresh\-Enabled} (bool enable)
\begin{CompactList}\small\item\em Enable/disable the automatic forwarding by $<$meta http-equiv=\char`\"{}refresh\char`\"{} ....$>$. \item\end{CompactList}\item 
bool {\bf meta\-Refresh\-Enabled} () const 
\begin{CompactList}\small\item\em Returns {\tt true} if automatic forwarding is enabled. \item\end{CompactList}\item 
{\bf QVariant} {\bf execute\-Script} (const  {\bf QString} \&script)
\begin{CompactList}\small\item\em Execute the specified snippet of Java\-Script code. \item\end{CompactList}\item 
{\bf QVariant} {\bf execute\-Script} (const  {\bf DOM::Node} \&n, const  {\bf QString} \&script)
\begin{CompactList}\small\item\em Same as above except the Node parameter specifying the 'this' value. \item\end{CompactList}\item 
void {\bf set\-DNDEnabled} (bool b)
\begin{CompactList}\small\item\em Enables or disables Drag'n'Drop support. \item\end{CompactList}\item 
bool {\bf dnd\-Enabled} () const 
\begin{CompactList}\small\item\em Returns whether Dragn'n'Drop support is enabled or not. \item\end{CompactList}\item 
void {\bf set\-Java\-Enabled} (bool enable)
\begin{CompactList}\small\item\em Enables/disables Java applet support. \item\end{CompactList}\item 
bool {\bf java\-Enabled} () const 
\begin{CompactList}\small\item\em Return if Java applet support is enabled/disabled. \item\end{CompactList}\item 
KJava\-Applet\-Context $\ast$ {\bf java\-Context} ()
\begin{CompactList}\small\item\em Returns the java context of the applets. \item\end{CompactList}\item 
KJava\-Applet\-Context $\ast$ {\bf create\-Java\-Context} ()
\begin{CompactList}\small\item\em Returns the java context of the applets. \item\end{CompactList}\item 
void {\bf set\-Plugins\-Enabled} (bool enable)
\begin{CompactList}\small\item\em Enables or disables plugins via, default is enabled. \item\end{CompactList}\item 
bool {\bf plugins\-Enabled} () const 
\begin{CompactList}\small\item\em Returns trie if plugins are enabled/disabled. \item\end{CompactList}\item 
void {\bf set\-Autoload\-Images} (bool enable)
\begin{CompactList}\small\item\em Specifies whether images contained in the document should be loaded automatically or not. \item\end{CompactList}\item 
bool {\bf autoload\-Images} () const 
\begin{CompactList}\small\item\em Returns whether images contained in the document are loaded automatically or not. \item\end{CompactList}\item 
void {\bf set\-Only\-Local\-References} (bool enable)
\begin{CompactList}\small\item\em Security option. \item\end{CompactList}\item 
bool {\bf only\-Local\-References} () const 
\begin{CompactList}\small\item\em Returnd whether references should be loaded ( default false ). \item\end{CompactList}\item 
void {\bf enable\-JScript} (bool e)\label{classKHTMLPart_a30}

\item 
void {\bf enable\-Java} (bool e)\label{classKHTMLPart_a31}

\item 
void {\bf enable\-Plugins} (bool e)\label{classKHTMLPart_a32}

\item 
void {\bf autoload\-Images} (bool e)\label{classKHTMLPart_a33}

\item 
void {\bf enable\-Meta\-Refresh} (bool e)\label{classKHTMLPart_a34}

\item 
bool {\bf set\-Charset} (const  {\bf QString} \&, bool)\label{classKHTMLPart_a35}

\item 
{\bf KURL} {\bf base\-URL} () const \label{classKHTMLPart_a36}

\item 
{\bf QString} {\bf base\-Target} () const \label{classKHTMLPart_a37}

\item 
{\bf KURL} {\bf background\-URL} () const 
\begin{CompactList}\small\item\em Returns the URL for the background Image (used by save background). \item\end{CompactList}\item 
void {\bf schedule\-Redirection} (int delay, const  {\bf QString} \&{\bf url}, bool lock\-History=true)
\begin{CompactList}\small\item\em Schedules a redirection after {\tt delay} seconds. \item\end{CompactList}\item 
virtual void {\bf begin} (const  {\bf KURL} \&{\bf url}={\bf KURL}(), int x\-Offset=0, int y\-Offset=0)
\begin{CompactList}\small\item\em Clears the widget and prepares it for new content. \item\end{CompactList}\item 
virtual void {\bf write} (const  char $\ast$str, int len=-1)
\begin{CompactList}\small\item\em Writes another part of the HTML code to the widget. \item\end{CompactList}\item 
virtual void {\bf write} (const  {\bf QString} \&str)
\begin{CompactList}\small\item\em Writes another part of the HTML code to the widget. \item\end{CompactList}\item 
virtual void {\bf end} ()
\begin{CompactList}\small\item\em Call this after your last call to {\bf write}{\rm (p.\,\pageref{classKHTMLPart_a41})}(). \item\end{CompactList}\item 
void {\bf paint} ({\bf QPainter} $\ast$, const  {\bf QRect} \&, int=0, bool $\ast$=0)
\begin{CompactList}\small\item\em Paints the HTML page to a {\bf QPainter}. \item\end{CompactList}\item 
bool {\bf set\-Encoding} (const  {\bf QString} \&{\bf name}, bool override=false)
\begin{CompactList}\small\item\em Sets the encoding the page uses. \item\end{CompactList}\item 
{\bf QString} {\bf encoding} () const 
\begin{CompactList}\small\item\em Returns the encoding the page currently uses. \item\end{CompactList}\item 
void {\bf set\-User\-Style\-Sheet} (const  {\bf KURL} \&{\bf url})
\begin{CompactList}\small\item\em Sets a user defined style sheet to be used on top of the HTML 4 default style sheet. \item\end{CompactList}\item 
void {\bf set\-User\-Style\-Sheet} (const  {\bf QString} \&style\-Sheet)
\begin{CompactList}\small\item\em Sets a user defined style sheet to be used on top of the HTML 4 default style sheet. \item\end{CompactList}\item 
void {\bf set\-Standard\-Font} (const  {\bf QString} \&{\bf name})
\begin{CompactList}\small\item\em Sets the standard font style. \item\end{CompactList}\item 
void {\bf set\-Fixed\-Font} (const  {\bf QString} \&{\bf name})
\begin{CompactList}\small\item\em Sets the fixed font style. \item\end{CompactList}\item 
bool {\bf goto\-Anchor} (const  {\bf QString} \&{\bf name})
\begin{CompactList}\small\item\em Finds the anchor named {\tt name}. \item\end{CompactList}\item 
void {\bf set\-URLCursor} (const  {\bf QCursor} \&c)
\begin{CompactList}\small\item\em Sets the cursor to use when the cursor is on a link. \item\end{CompactList}\item 
{\bf QCursor} {\bf url\-Cursor} () const 
\begin{CompactList}\small\item\em Returns the cursor which is used when the cursor is on a link. \item\end{CompactList}\item 
void {\bf find\-Text\-Begin} ()
\begin{CompactList}\small\item\em Initiates a text search. \item\end{CompactList}\item 
bool {\bf find\-Text\-Next} (const  {\bf QString} \&str, bool forward, bool case\-Sensitive, bool is\-Reg\-Exp)
\begin{CompactList}\small\item\em Finds the next occurence of the string or expression. \item\end{CompactList}\item 
void {\bf set\-Zoom\-Factor} (int percent)
\begin{CompactList}\small\item\em Sets the Zoom factor. \item\end{CompactList}\item 
int {\bf zoom\-Factor} () const 
\begin{CompactList}\small\item\em Returns the current zoom factor. \item\end{CompactList}\item 
virtual {\bf QString} {\bf selected\-Text} () const 
\begin{CompactList}\small\item\em Returns the text the user has marked. \item\end{CompactList}\item 
DOM::Range {\bf selection} () const 
\begin{CompactList}\small\item\em Returns the selected part of the HTML. \item\end{CompactList}\item 
void {\bf set\-Selection} (const  DOM::Range \&)
\begin{CompactList}\small\item\em Sets the current selection. \item\end{CompactList}\item 
bool {\bf has\-Selection} () const 
\begin{CompactList}\small\item\em Has the user selected anything? \item\end{CompactList}\item 
void {\bf select\-All} ()
\begin{CompactList}\small\item\em Marks all text in the document as selected. \item\end{CompactList}\item 
void {\bf show} ()
\begin{CompactList}\small\item\em Convenience method to show the document's view. \item\end{CompactList}\item 
void {\bf hide} ()
\begin{CompactList}\small\item\em Convenience method to hide the document's view. \item\end{CompactList}\item 
{\bf KParts::Part\-Manager} $\ast$ {\bf part\-Manager} ()
\begin{CompactList}\small\item\em Returns a reference to the partmanager instance which manages html frame objects. \item\end{CompactList}\item 
virtual void {\bf save\-State} ({\bf QData\-Stream} \&stream)
\begin{CompactList}\small\item\em Saves the KHTMLPart's complete state (including child frame objects) to the provided {\bf QData\-Stream}. \item\end{CompactList}\item 
virtual void {\bf restore\-State} ({\bf QData\-Stream} \&stream)
\begin{CompactList}\small\item\em Restores the KHTMLPart's previously saved state (including child frame objects) from the provided {\bf QData\-Stream}. \item\end{CompactList}\item 
{\bf DOM::Node} {\bf node\-Under\-Mouse} () const 
\begin{CompactList}\small\item\em Returns the {\tt Node} currently under the mouse. \item\end{CompactList}\item 
const  {\bf KHTMLSettings} $\ast$ {\bf settings} () const \label{classKHTMLPart_a69}

\item 
{\bf KHTMLPart} $\ast$ {\bf parent\-Part} ()
\begin{CompactList}\small\item\em Returns a pointer to the parent KHTMLPart if the part is a frame in an HTML frameset. \item\end{CompactList}\item 
{\bf QString\-List} {\bf frame\-Names} () const 
\begin{CompactList}\small\item\em Returns a list of names of all frame (including iframe) objects of the current document. \item\end{CompactList}\item 
{\bf QPtr\-List}$<$ {\bf KParts::Read\-Only\-Part} $>$ {\bf frames} () const \label{classKHTMLPart_a72}

\item 
{\bf KHTMLPart} $\ast$ {\bf find\-Frame} (const  {\bf QString} \&f)
\begin{CompactList}\small\item\em Finds a frame by name. \item\end{CompactList}\item 
{\bf KParts::Read\-Only\-Part} $\ast$ {\bf current\-Frame} () const 
\begin{CompactList}\small\item\em Return the current frame (the one that has focus) Not necessarily a direct child of ours, framesets can be nested. \item\end{CompactList}\item 
bool {\bf frame\-Exists} (const  {\bf QString} \&frame\-Name)
\begin{CompactList}\small\item\em Returns whether a frame with the specified name is exists or not. \item\end{CompactList}\item 
void {\bf set\-JSStatus\-Bar\-Text} (const  {\bf QString} \&text)
\begin{CompactList}\small\item\em Called by KJS. \item\end{CompactList}\item 
void {\bf set\-JSDefault\-Status\-Bar\-Text} (const  {\bf QString} \&text)
\begin{CompactList}\small\item\em Called by KJS. \item\end{CompactList}\item 
{\bf QString} {\bf js\-Status\-Bar\-Text} () const 
\begin{CompactList}\small\item\em Called by KJS. \item\end{CompactList}\item 
{\bf QString} {\bf js\-Default\-Status\-Bar\-Text} () const 
\begin{CompactList}\small\item\em Called by KJS. \item\end{CompactList}\item 
{\bf QString} {\bf referrer} () const 
\begin{CompactList}\small\item\em Referrer used for links in this page. \item\end{CompactList}\item 
{\bf QString} {\bf page\-Referrer} () const 
\begin{CompactList}\small\item\em Referrer used to obtain this page. \item\end{CompactList}\item 
{\bf QString} {\bf last\-Modified} () const 
\begin{CompactList}\small\item\em Last-modified date (in raw string format), if received in the [HTTP] headers. \item\end{CompactList}\item 
void {\bf preload\-Style\-Sheet} (const  {\bf QString} \&{\bf url}, const  {\bf QString} \&stylesheet)
\begin{CompactList}\small\item\em Loads a style sheet into the stylesheet cache. \item\end{CompactList}\item 
void {\bf preload\-Script} (const  {\bf QString} \&{\bf url}, const  {\bf QString} \&script)
\begin{CompactList}\small\item\em Loads a script into the script cache. \item\end{CompactList}\item 
bool {\bf restored} () const \label{classKHTMLPart_a85}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KURL} {\bf complete\-URL} (const  {\bf QString} \&{\bf url})
\begin{CompactList}\small\item\em returns a {\bf KURL} object for the given url. \item\end{CompactList}\item 
void {\bf html\-Error} (int error\-Code, const  {\bf QString} \&text, const  {\bf KURL} \&req\-Url)
\begin{CompactList}\small\item\em presents a detailed error message to the user. \item\end{CompactList}\item 
virtual void {\bf custom\-Event} ({\bf QCustom\-Event} $\ast${\bf event})\label{classKHTMLPart_b2}

\item 
virtual void {\bf khtml\-Mouse\-Press\-Event} (khtml::Mouse\-Press\-Event $\ast${\bf event})
\begin{CompactList}\small\item\em Eventhandler of the khtml::Mouse\-Press\-Event. \item\end{CompactList}\item 
virtual void {\bf khtml\-Mouse\-Double\-Click\-Event} (khtml::Mouse\-Double\-Click\-Event $\ast$)
\begin{CompactList}\small\item\em Eventhandler for the khtml::Mouse\-Double\-Click\-Event. \item\end{CompactList}\item 
virtual void {\bf khtml\-Mouse\-Move\-Event} (khtml::Mouse\-Move\-Event $\ast${\bf event})
\begin{CompactList}\small\item\em Eventhandler for the khtml::Mouse\-Double\-Move\-Event. \item\end{CompactList}\item 
virtual void {\bf khtml\-Mouse\-Release\-Event} (khtml::Mouse\-Release\-Event $\ast${\bf event})
\begin{CompactList}\small\item\em Eventhandler for the khtml::Mouse\-Move\-Event. \item\end{CompactList}\item 
virtual void {\bf khtml\-Draw\-Contents\-Event} (khtml::Draw\-Contents\-Event $\ast$)
\begin{CompactList}\small\item\em Eventhandler for the khtml::Draw\-Contents\-Event. \item\end{CompactList}\item 
virtual void {\bf gui\-Activate\-Event} ({\bf KParts::GUIActivate\-Event} $\ast${\bf event})
\begin{CompactList}\small\item\em Internal reimplementation of {\bf KParts::Part::gui\-Activate\-Event} . \item\end{CompactList}\item 
virtual bool {\bf open\-File} ()
\begin{CompactList}\small\item\em Internal empty reimplementation of {\bf KParts::Read\-Only\-Part::open\-File} . \item\end{CompactList}\item 
virtual void {\bf url\-Selected} (const  {\bf QString} \&{\bf url}, int button, int state, const  {\bf QString} \&\_\-target, {\bf KParts::URLArgs} args={\bf KParts::URLArgs}())\label{classKHTMLPart_b10}

\item 
virtual {\bf KParts::Read\-Only\-Part} $\ast$ {\bf create\-Part} ({\bf QWidget} $\ast$parent\-Widget, const  char $\ast$widget\-Name, {\bf QObject} $\ast${\bf parent}, const  char $\ast${\bf name}, const  {\bf QString} \&mimetype, {\bf QString} \&service\-Name, {\bf QString\-List} \&service\-Types, const  {\bf QString\-List} \&params)
\begin{CompactList}\small\item\em This method is called when a new embedded object (include html frames) is to be created. \item\end{CompactList}\item 
bool {\bf plugin\-Page\-Question\-Asked} (const  {\bf QString} \&mimetype) const \label{classKHTMLPart_b12}

\item 
void {\bf set\-Plugin\-Page\-Question\-Asked} (const  {\bf QString} \&mimetype)\label{classKHTMLPart_b13}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf DOM::HTMLTitle\-Element\-Impl}\label{classKHTMLPart_n0}

\item 
class {\bf DOM::HTMLFrame\-Element\-Impl}\label{classKHTMLPart_n1}

\item 
class {\bf DOM::HTMLIFrame\-Element\-Impl}\label{classKHTMLPart_n2}

\item 
class {\bf DOM::HTMLObject\-Element\-Impl}\label{classKHTMLPart_n3}

\item 
class {\bf DOM::HTMLAnchor\-Element\-Impl}\label{classKHTMLPart_n4}

\item 
class {\bf DOM::HTMLMeta\-Element\-Impl}\label{classKHTMLPart_n5}

\item 
class {\bf DOM::Node\-Impl}\label{classKHTMLPart_n6}

\item 
class {\bf KHTMLRun}\label{classKHTMLPart_n7}

\item 
class {\bf DOM::HTMLForm\-Element\-Impl}\label{classKHTMLPart_n8}

\item 
class {\bf khtml::Render\-Part\-Object}\label{classKHTMLPart_n9}

\item 
class {\bf KJS::Window}\label{classKHTMLPart_n10}

\item 
class {\bf KJS::Window\-Func}\label{classKHTMLPart_n11}

\item 
class {\bf KJS::JSEvent\-Listener}\label{classKHTMLPart_n12}

\item 
class {\bf KJS::DOMDocument}\label{classKHTMLPart_n13}

\item 
class {\bf KJSProxy}\label{classKHTMLPart_n14}

\item 
class {\bf KHTMLPart\-Browser\-Extension}\label{classKHTMLPart_n15}

\item 
class {\bf DOM::Document\-Impl}\label{classKHTMLPart_n16}

\item 
class {\bf DOM::HTMLDocument\-Impl}\label{classKHTMLPart_n17}

\item 
class {\bf KHTMLPart\-Browser\-Host\-Extension}\label{classKHTMLPart_n18}

\item 
class {\bf khtml::HTMLTokenizer}\label{classKHTMLPart_n19}

\item 
class {\bf XMLTokenizer}\label{classKHTMLPart_n20}

\item 
class {\bf khtml::Render\-Widget}\label{classKHTMLPart_n21}

\item 
class {\bf khtml::CSSStyle\-Selector}\label{classKHTMLPart_n22}

\item 
class {\bf KHTMLPart\-Iface}\label{classKHTMLPart_n23}

\item 
class {\bf KHTMLPart\-Function}\label{classKHTMLPart_n24}

\item 
class {\bf KHTMLPart\-Private}\label{classKHTMLPart_n25}

\end{CompactItemize}


\subsection{Detailed Description}
This class is khtml's main class. HTML Browser Widget. 

It features an almost complete web browser, and html renderer.

The easiest way to use this class (if you just want to display a an HTML page at some URL) is the following:

\small\begin{alltt}
 {\bf KURL} url = "http://www.kde.org";
 KHTMLPart *w = new {\bf KHTMLPart()}{\rm (p.\,\pageref{classKHTMLPart_a0})};
 w-$>$openURL(url);
 w-$>${\bf view()}{\rm (p.\,\pageref{classKHTMLPart_a11})}-$>$resize(500, 400);
 w-$>${\bf show()}{\rm (p.\,\pageref{classKHTMLPart_a63})};
 \end{alltt}\normalsize 


If Java and Java\-Script 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:

\small\begin{alltt}
 w-$>$setJScriptEnabled(false);
 w-$>$setJavaEnabled(false);
 w-$>$setMetaRefreshEnabled(false);
 w-$>$setPluginsEnabled(false);
 \end{alltt}\normalsize 


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:

\small\begin{alltt}
 {\bf QString} myHTMLCode = ...;
 KHTMLPart *w = new {\bf KHTMLPart()}{\rm (p.\,\pageref{classKHTMLPart_a0})};
 w-$>${\bf begin()}{\rm (p.\,\pageref{classKHTMLPart_a40})};
 w-$>$write(myHTMLCode);
 ...
 w-$>${\bf end()}{\rm (p.\,\pageref{classKHTMLPart_a43})};
 \end{alltt}\normalsize 


You can do as many calls to write as you want. But there are two {\bf write}{\rm (p.\,\pageref{classKHTMLPart_a41})}() methods, one accepting a {\bf QString} one accepting a {\tt char} {\tt $\ast$} argument. You should use one or the other (but not both) since the method using the {\tt char} {\tt $\ast$} argument does an additional decoding step to convert the written data to Unicode.

\begin{Desc}
\item[Author:]Lars Knoll ({\tt knoll@kde.org}) \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf khtml\_\-part.h}{\rm (p.\,\pageref{khtml__part_8h})},v 1.197.2.6 2003/07/10 12:13:14 waba Exp \end{Desc}
\end{Desc}




Definition at line 145 of file khtml\_\-part.h.

\subsection{Constructor \& Destructor Documentation}
\index{KHTMLPart@{KHTMLPart}!KHTMLPart@{KHTMLPart}}
\index{KHTMLPart@{KHTMLPart}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KHTMLPart::KHTMLPart ({\bf QWidget} $\ast$ {\em parent\-Widget} = 0, const char $\ast$ {\em widgetname} = 0, {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0, GUIProfile {\em prof} = Default\-GUI)}\label{classKHTMLPart_a0}


Constructs a new KHTMLPart. 

KHTML basically consists of two objects: The KHTMLPart itself, holding the document data ({\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} document), and the {\bf KHTMLView}{\rm (p.\,\pageref{classKHTMLView})}, derived from {\bf QScroll\-View}, 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 {\bf KHTMLView}{\rm (p.\,\pageref{classKHTMLView})}. If the second {\tt parent} argument is 0L, then {\tt parent\-Widget} is used as parent for both objects, the part and the view. 

Definition at line 138 of file khtml\_\-part.cpp.

References KStd\-Accel::name(), parent\-Part(), and KParts::Part\-Base::set\-Instance().\index{KHTMLPart@{KHTMLPart}!~KHTMLPart@{$\sim$KHTMLPart}}
\index{~KHTMLPart@{$\sim$KHTMLPart}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KHTMLPart::$\sim${\bf KHTMLPart} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a2}


Destructor. 



Definition at line 262 of file khtml\_\-part.cpp.

References close\-URL(), and QObject::disconnect().

\subsection{Member Function Documentation}
\index{KHTMLPart@{KHTMLPart}!openURL@{openURL}}
\index{openURL@{openURL}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::open\-URL (const {\bf KURL} \& {\em url})\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a3}


Opens the specified URL {\tt url}. 

Reimplemented from {\bf KParts::Read\-Only\-Part::open\-URL} . 

Reimplemented from {\bf KParts::Read\-Only\-Part}.

Definition at line 337 of file khtml\_\-part.cpp.

References close\-URL(), KParts::Read\-Only\-Part::completed(), QObject::connect(), KParts::URLArgs::content\-Type(), QValue\-List$<$ KURL $>$::count(), KParts::URLArgs::do\-Post(), QValue\-List$<$ KURL $>$::first(), KIO::get(), goto\-Anchor(), KURL::has\-Ref(), KURL::has\-Sub\-URL(), KURL::host(), html\-Error(), KIO::http\_\-post(), QMap$<$ QString, QString $>$::insert(), QString::is\-Empty(), KURL::join(), KParts::Read\-Only\-Part::m\_\-url, KParts::URLArgs::meta\-Data(), parent\-Part(), KURL::path(), QValue\-List$<$ KURL $>$::pop\_\-front(), KParts::URLArgs::post\-Data, KURL::pretty\-URL(), KURL::protocol(), KURL::query\-Item(), KParts::URLArgs::redirected\-Request(), KParts::URLArgs::reload, KURL::set\-Path(), KURL::split(), KParts::Read\-Only\-Part::started(), QString::starts\-With(), QString::to\-Int(), KURL::url(), and KParts::Part::widget().

Referenced by restore\-State(), and set\-Encoding().\index{KHTMLPart@{KHTMLPart}!closeURL@{closeURL}}
\index{closeURL@{closeURL}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::close\-URL ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a4}


Stops loading the document and kill all data requests (for images, etc.). 



Reimplemented from {\bf KParts::Read\-Only\-Part}.

Definition at line 492 of file khtml\_\-part.cpp.

References KHTMLPage\-Cache::cancel\-Entry(), KHTMLPage\-Cache::cancel\-Fetch(), KStd\-Accel::end(), end(), KParts::Read\-Only\-Part::m\_\-url, node\-Activated(), KURL::pretty\-URL(), and KHTMLPage\-Cache::self().

Referenced by open\-URL(), restore\-State(), set\-Encoding(), and $\sim$KHTMLPart().\index{KHTMLPart@{KHTMLPart}!showError@{showError}}
\index{showError@{showError}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::show\-Error ({\bf KIO::Job} $\ast$ {\em job})\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a5}


is called when a certain error situation (i.e. 

connection timed out) occured. default implementation either shows a {\bf KIO} error dialog or loads a more verbose error description a as page, depending on the users configuration. {\tt job} is the job that signaled the error situation 

Definition at line 1149 of file khtml\_\-part.cpp.

References KIO::Job::error(), KIO::Job::error\-Text(), html\-Error(), and KIO::Job::show\-Error\-Dialog().\index{KHTMLPart@{KHTMLPart}!htmlDocument@{htmlDocument}}
\index{htmlDocument@{htmlDocument}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOM::HTMLDocument} KHTMLPart::html\-Document () const}\label{classKHTMLPart_a6}


Returns a reference to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} HTML document (for non-HTML documents, returns null). 



Definition at line 561 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!document@{document}}
\index{document@{document}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOM::Document} KHTMLPart::document () const}\label{classKHTMLPart_a7}


Returns a reference to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} document. 



Definition at line 569 of file khtml\_\-part.cpp.

Referenced by selection().\index{KHTMLPart@{KHTMLPart}!activeNode@{activeNode}}
\index{activeNode@{activeNode}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOM::Node} KHTMLPart::active\-Node () const}\label{classKHTMLPart_a8}


Returns the node that has the keyboard focus. 



Definition at line 5044 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!browserExtension@{browserExtension}}
\index{browserExtension@{browserExtension}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KParts::Browser\-Extension} $\ast$ KHTMLPart::browser\-Extension () const}\label{classKHTMLPart_a9}


Returns a pointer to the {\bf KParts::Browser\-Extension}. 



Definition at line 575 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!view@{view}}
\index{view@{view}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KHTMLView} $\ast$ KHTMLPart::view () const}\label{classKHTMLPart_a11}


Returns a pointer to the HTML document's view. 



Definition at line 580 of file khtml\_\-part.cpp.

Referenced by khtml\-Mouse\-Move\-Event().\index{KHTMLPart@{KHTMLPart}!setJScriptEnabled@{setJScriptEnabled}}
\index{setJScriptEnabled@{setJScriptEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-JScript\-Enabled (bool {\em enable})}\label{classKHTMLPart_a12}


Enable/disable Javascript support. 

Note that this will in either case permanently override the default usersetting. If you want to have the default User\-Settings, don't call this method. 

Definition at line 585 of file khtml\_\-part.cpp.

References j\-Script\-Enabled().\index{KHTMLPart@{KHTMLPart}!jScriptEnabled@{jScriptEnabled}}
\index{jScriptEnabled@{jScriptEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::j\-Script\-Enabled () const}\label{classKHTMLPart_a13}


Returns {\tt true} if Javascript support is enabled or {\tt false} otherwise. 



Definition at line 594 of file khtml\_\-part.cpp.

Referenced by set\-JScript\-Enabled().\index{KHTMLPart@{KHTMLPart}!setMetaRefreshEnabled@{setMetaRefreshEnabled}}
\index{setMetaRefreshEnabled@{setMetaRefreshEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Meta\-Refresh\-Enabled (bool {\em enable})}\label{classKHTMLPart_a14}


Enable/disable the automatic forwarding by $<$meta http-equiv=\char`\"{}refresh\char`\"{} ....$>$. 



Definition at line 601 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!metaRefreshEnabled@{metaRefreshEnabled}}
\index{metaRefreshEnabled@{metaRefreshEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::meta\-Refresh\-Enabled () const}\label{classKHTMLPart_a15}


Returns {\tt true} if automatic forwarding is enabled. 



Definition at line 606 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!executeScript@{executeScript}}
\index{executeScript@{executeScript}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QVariant} KHTMLPart::execute\-Script (const {\bf QString} \& {\em script})}\label{classKHTMLPart_a16}


Execute the specified snippet of Java\-Script code. 

Returns {\tt true} if Java\-Script was enabled, no error occured and the code returned true itself or {\tt false} otherwise. {\bf This class or method is obsolete, it is provided for compatibility only.}, use the one below. 

Definition at line 658 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!executeScript@{executeScript}}
\index{executeScript@{executeScript}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QVariant} KHTMLPart::execute\-Script (const {\bf DOM::Node} \& {\em n}, const {\bf QString} \& {\em script})}\label{classKHTMLPart_a17}


Same as above except the Node parameter specifying the 'this' value. 



Definition at line 666 of file khtml\_\-part.cpp.

References DOM::Node::is\-Null(), QString::latin1(), DOM::Node::node\-Name(), DOM::Node::node\-Type(), and DOM::DOMString::string().\index{KHTMLPart@{KHTMLPart}!setDNDEnabled@{setDNDEnabled}}
\index{setDNDEnabled@{setDNDEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-DNDEnabled (bool {\em b})}\label{classKHTMLPart_a18}


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.\index{KHTMLPart@{KHTMLPart}!dndEnabled@{dndEnabled}}
\index{dndEnabled@{dndEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::dnd\-Enabled () const}\label{classKHTMLPart_a19}


Returns whether Dragn'n'Drop support is enabled or not. 



Definition at line 4295 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!setJavaEnabled@{setJavaEnabled}}
\index{setJavaEnabled@{setJavaEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Java\-Enabled (bool {\em enable})}\label{classKHTMLPart_a20}


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.\index{KHTMLPart@{KHTMLPart}!javaEnabled@{javaEnabled}}
\index{javaEnabled@{javaEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::java\-Enabled () const}\label{classKHTMLPart_a21}


Return if Java applet support is enabled/disabled. 



Definition at line 717 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!javaContext@{javaContext}}
\index{javaContext@{javaContext}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KJava\-Applet\-Context $\ast$ KHTMLPart::java\-Context ()}\label{classKHTMLPart_a22}


Returns the java context of the applets. 

If no applet exists, 0 is returned. 

Definition at line 728 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!createJavaContext@{createJavaContext}}
\index{createJavaContext@{createJavaContext}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KJava\-Applet\-Context $\ast$ KHTMLPart::create\-Java\-Context ()}\label{classKHTMLPart_a23}


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.

References QObject::connect(), and KParts::Part::set\-Status\-Bar\-Text().\index{KHTMLPart@{KHTMLPart}!setPluginsEnabled@{setPluginsEnabled}}
\index{setPluginsEnabled@{setPluginsEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Plugins\-Enabled (bool {\em enable})}\label{classKHTMLPart_a24}


Enables or disables plugins via, default is enabled. 



Definition at line 756 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!pluginsEnabled@{pluginsEnabled}}
\index{pluginsEnabled@{pluginsEnabled}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::plugins\-Enabled () const}\label{classKHTMLPart_a25}


Returns trie if plugins are enabled/disabled. 



Definition at line 762 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!setAutoloadImages@{setAutoloadImages}}
\index{setAutoloadImages@{setAutoloadImages}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Autoload\-Images (bool {\em enable})}\label{classKHTMLPart_a26}


Specifies whether images contained in the document should be loaded automatically or not. 

\begin{Desc}
\item[Note:]Request will be ignored if called before {\bf begin}{\rm (p.\,\pageref{classKHTMLPart_a40})}(). \end{Desc}


Definition at line 842 of file khtml\_\-part.cpp.

References KXMLGUIClient::action\-Collection(), QPtr\-List::append(), KXMLGUIClient::plug\-Action\-List(), and KXMLGUIClient::unplug\-Action\-List().

Referenced by begin().\index{KHTMLPart@{KHTMLPart}!autoloadImages@{autoloadImages}}
\index{autoloadImages@{autoloadImages}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::autoload\-Images () const}\label{classKHTMLPart_a27}


Returns whether images contained in the document are loaded automatically or not. 

\begin{Desc}
\item[Note:]that the returned information is unrelieable as long as no {\bf begin()}{\rm (p.\,\pageref{classKHTMLPart_a40})} was called. \end{Desc}


Definition at line 866 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!setOnlyLocalReferences@{setOnlyLocalReferences}}
\index{setOnlyLocalReferences@{setOnlyLocalReferences}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Only\-Local\-References (bool {\em enable})}\label{classKHTMLPart_a28}


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.\index{KHTMLPart@{KHTMLPart}!onlyLocalReferences@{onlyLocalReferences}}
\index{onlyLocalReferences@{onlyLocalReferences}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::only\-Local\-References () const}\label{classKHTMLPart_a29}


Returnd whether references should be loaded ( default false ). 



Definition at line 1901 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!backgroundURL@{backgroundURL}}
\index{backgroundURL@{backgroundURL}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KURL} KHTMLPart::background\-URL () const}\label{classKHTMLPart_a38}


Returns the URL for the background Image (used by save background). 



Definition at line 2792 of file khtml\_\-part.cpp.

References KParts::Read\-Only\-Part::m\_\-url.\index{KHTMLPart@{KHTMLPart}!scheduleRedirection@{scheduleRedirection}}
\index{scheduleRedirection@{scheduleRedirection}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::schedule\-Redirection (int {\em delay}, const {\bf QString} \& {\em url}, bool {\em lock\-History} = true)}\label{classKHTMLPart_a39}


Schedules a redirection after {\tt delay} seconds. 



Definition at line 1728 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!begin@{begin}}
\index{begin@{begin}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::begin (const {\bf KURL} \& {\em url} = {\bf KURL}(), int {\em x\-Offset} = 0, int {\em y\-Offset} = 0)\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a40}


Clears the widget and prepares it for new content. 

If you want {\bf url}() to return for example \char`\"{}file:/tmp/test.html\char`\"{}, you can use the following code: \small\begin{alltt}
 view-$>$begin( {\bf KURL}("file:/tmp/test.html" ) );
 \end{alltt}\normalsize 


\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]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.\item[{\em x\-Offset}]is the initial horizontal scrollbar value. Usually you don't want to use this.\item[{\em y\-Offset}]is the initial vertical scrollbar value. Usually you don't want to use this.\end{description}
\end{Desc}
All child frames and the old document are removed if you call this method. 

Definition at line 1300 of file khtml\_\-part.cpp.

References QValue\-List$<$ KURL $>$::begin(), QObject::connect(), KParts::URLArgs::doc\-State, QString::from\-Latin1(), QString::is\-Empty(), QValue\-List$<$ KURL $>$::is\-Empty(), KURL::is\-Empty(), KURL::is\-Valid(), KParts::Read\-Only\-Part::m\_\-url, KURL::pretty\-URL(), KURL::protocol(), KParts::URLArgs::service\-Type, set\-Autoload\-Images(), KURL::set\-Pass(), KURL::set\-Query(), KURL::set\-Ref(), KURL::set\-User(), set\-User\-Style\-Sheet(), KParts::Part::set\-Window\-Caption(), KURL::split(), QString::starts\-With(), KURL::url(), KParts::URLArgs::x\-Offset, and KParts::URLArgs::y\-Offset.

Referenced by html\-Error().\index{KHTMLPart@{KHTMLPart}!write@{write}}
\index{write@{write}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::write (const char $\ast$ {\em str}, int {\em len} = -1)\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a41}


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.

The HTML code is send through a decoder which decodes the stream to Unicode.

The {\tt len} 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.

Attention: Don't mix calls to {\bf write}{\rm (p.\,\pageref{classKHTMLPart_a41})}( const char $\ast$) with calls to {\bf write}{\rm (p.\,\pageref{classKHTMLPart_a41})}( const {\bf QString} \& ).

The result might not be what you want. 

Definition at line 1386 of file khtml\_\-part.cpp.

References encoding(), QString::is\-Empty(), KParts::Read\-Only\-Part::m\_\-url, and KURL::url().

Referenced by end(), and html\-Error().\index{KHTMLPart@{KHTMLPart}!write@{write}}
\index{write@{write}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::write (const {\bf QString} \& {\em str})\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a42}


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.

References QString::is\-Null(), KParts::Read\-Only\-Part::m\_\-url, and KURL::url().\index{KHTMLPart@{KHTMLPart}!end@{end}}
\index{end@{end}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::end ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a43}


Call this after your last call to {\bf write}{\rm (p.\,\pageref{classKHTMLPart_a41})}(). 



Definition at line 1441 of file khtml\_\-part.cpp.

References write().

Referenced by close\-URL(), html\-Error(), and stop\-Animations().\index{KHTMLPart@{KHTMLPart}!paint@{paint}}
\index{paint@{paint}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::paint ({\bf QPainter} $\ast$, const {\bf QRect} \&, int = 0, bool $\ast$ = 0)}\label{classKHTMLPart_a44}


Paints the HTML page to a {\bf QPainter}. 

See KHTMLView::paint for details 

Definition at line 1450 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!setEncoding@{setEncoding}}
\index{setEncoding@{setEncoding}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::set\-Encoding (const {\bf QString} \& {\em name}, bool {\em override} = false)}\label{classKHTMLPart_a45}


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 {\bf url()} is not empty. 

Definition at line 1800 of file khtml\_\-part.cpp.

References close\-URL(), KURL::is\-Empty(), KParts::Read\-Only\-Part::m\_\-url, KStd\-Accel::name(), and open\-URL().\index{KHTMLPart@{KHTMLPart}!encoding@{encoding}}
\index{encoding@{encoding}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KHTMLPart::encoding () const}\label{classKHTMLPart_a46}


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.

References KHTMLSettings::encoding().

Referenced by restore\-State(), and write().\index{KHTMLPart@{KHTMLPart}!setUserStyleSheet@{setUserStyleSheet}}
\index{setUserStyleSheet@{setUserStyleSheet}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-User\-Style\-Sheet (const {\bf KURL} \& {\em url})}\label{classKHTMLPart_a47}


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.

References KURL::url().

Referenced by begin().\index{KHTMLPart@{KHTMLPart}!setUserStyleSheet@{setUserStyleSheet}}
\index{setUserStyleSheet@{setUserStyleSheet}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-User\-Style\-Sheet (const {\bf QString} \& {\em style\-Sheet})}\label{classKHTMLPart_a48}


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.\index{KHTMLPart@{KHTMLPart}!setStandardFont@{setStandardFont}}
\index{setStandardFont@{setStandardFont}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Standard\-Font (const {\bf QString} \& {\em name})}\label{classKHTMLPart_a49}


Sets the standard font style. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The font name to use for standard text. \end{description}
\end{Desc}


Definition at line 1881 of file khtml\_\-part.cpp.

References KStd\-Accel::name().\index{KHTMLPart@{KHTMLPart}!setFixedFont@{setFixedFont}}
\index{setFixedFont@{setFixedFont}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Fixed\-Font (const {\bf QString} \& {\em name})}\label{classKHTMLPart_a50}


Sets the fixed font style. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The font name to use for fixed text, e.g. the {\tt $<$pre$>$} tag. \end{description}
\end{Desc}


Definition at line 1886 of file khtml\_\-part.cpp.

References KStd\-Accel::name().\index{KHTMLPart@{KHTMLPart}!gotoAnchor@{gotoAnchor}}
\index{gotoAnchor@{gotoAnchor}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::goto\-Anchor (const {\bf QString} \& {\em name})}\label{classKHTMLPart_a51}


Finds the anchor named {\tt name}. 

If the anchor is found, the widget scrolls to the closest position. Returns {\tt if} the anchor has been found. 

Definition at line 1841 of file khtml\_\-part.cpp.

References KStd\-Accel::name().

Referenced by open\-URL().\index{KHTMLPart@{KHTMLPart}!setURLCursor@{setURLCursor}}
\index{setURLCursor@{setURLCursor}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-URLCursor (const {\bf QCursor} \& {\em c})}\label{classKHTMLPart_a52}


Sets the cursor to use when the cursor is on a link. 



Definition at line 1891 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!urlCursor@{urlCursor}}
\index{urlCursor@{urlCursor}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCursor} KHTMLPart::url\-Cursor () const}\label{classKHTMLPart_a53}


Returns the cursor which is used when the cursor is on a link. 



Definition at line 1896 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!findTextBegin@{findTextBegin}}
\index{findTextBegin@{findTextBegin}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::find\-Text\-Begin ()}\label{classKHTMLPart_a54}


Initiates a text search. 



Definition at line 1911 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!findTextNext@{findTextNext}}
\index{findTextNext@{findTextNext}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::find\-Text\-Next (const {\bf QString} \& {\em str}, bool {\em forward}, bool {\em case\-Sensitive}, bool {\em is\-Reg\-Exp})}\label{classKHTMLPart_a55}


Finds the next occurence of the string or expression. 

If is\-Reg\-Exp is true then str is converted to a {\bf QReg\-Exp}, and case\-Sensitive is ignored. 

Definition at line 1972 of file khtml\_\-part.cpp.

References KStd\-Accel::forward(), DOM::DOMString::implementation(), QString::length(), QReg\-Exp::matched\-Length(), KStd\-Accel::next(), QReg\-Exp::search(), QReg\-Exp::set\-Case\-Sensitive(), and QConst\-String::string().\index{KHTMLPart@{KHTMLPart}!setZoomFactor@{setZoomFactor}}
\index{setZoomFactor@{setZoomFactor}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Zoom\-Factor (int {\em percent})}\label{classKHTMLPart_a56}


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.

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.

References KStd\-Accel::end(), QApplication::restore\-Override\-Cursor(), and QApplication::set\-Override\-Cursor().

Referenced by restore\-State().\index{KHTMLPart@{KHTMLPart}!zoomFactor@{zoomFactor}}
\index{zoomFactor@{zoomFactor}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KHTMLPart::zoom\-Factor () const}\label{classKHTMLPart_a57}


Returns the current zoom factor. 



Definition at line 4056 of file khtml\_\-part.cpp.

Referenced by khtml::CSSStyle\-Selector::CSSStyle\-Selector(), KHTMLView::print(), and restore\-State().\index{KHTMLPart@{KHTMLPart}!selectedText@{selectedText}}
\index{selectedText@{selectedText}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KHTMLPart::selected\-Text () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a58}


Returns the text the user has marked. 



Definition at line 2300 of file khtml\_\-part.cpp.

References DOM::Node::element\-Id(), KStd\-Accel::end(), DOM::Node::first\-Child(), DOM::Node::handle(), QString::is\-Empty(), DOM::Node::is\-Null(), QString::left(), QString::length(), QString::mid(), KStd\-Accel::next(), DOM::Node::next\-Sibling(), DOM::Node::node\-Type(), DOM::Node::node\-Value(), DOM::Node::parent\-Node(), and DOM::DOMString::string().

Referenced by khtml\-Mouse\-Release\-Event().\index{KHTMLPart@{KHTMLPart}!selection@{selection}}
\index{selection@{selection}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}DOM::Range KHTMLPart::selection () const}\label{classKHTMLPart_a59}


Returns the selected part of the HTML. 



Definition at line 2428 of file khtml\_\-part.cpp.

References DOM::Document::create\-Range(), and document().\index{KHTMLPart@{KHTMLPart}!setSelection@{setSelection}}
\index{setSelection@{setSelection}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Selection (const DOM::Range \&)}\label{classKHTMLPart_a60}


Sets the current selection. 



Definition at line 2437 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!hasSelection@{hasSelection}}
\index{hasSelection@{hasSelection}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::has\-Selection () const}\label{classKHTMLPart_a61}


Has the user selected anything? 

Call {\bf selected\-Text}{\rm (p.\,\pageref{classKHTMLPart_a58})}() to retrieve the selected text.

\begin{Desc}
\item[Returns:]{\tt true} if there is text selected. \end{Desc}


Definition at line 2418 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!selectAll@{selectAll}}
\index{selectAll@{selectAll}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::select\-All ()}\label{classKHTMLPart_a62}


Marks all text in the document as selected. 



Definition at line 4849 of file khtml\_\-part.cpp.

References KStd\-Accel::next().\index{KHTMLPart@{KHTMLPart}!show@{show}}
\index{show@{show}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::show ()}\label{classKHTMLPart_a63}


Convenience method to show the document's view. 

Equivalent to {\bf widget()}-$>${\bf show()}{\rm (p.\,\pageref{classKHTMLPart_a63})} or {\bf view()}{\rm (p.\,\pageref{classKHTMLPart_a11})}-$>${\bf show()}{\rm (p.\,\pageref{classKHTMLPart_a63})} . 

Definition at line 4032 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!hide@{hide}}
\index{hide@{hide}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::hide ()}\label{classKHTMLPart_a64}


Convenience method to hide the document's view. 

Equivalent to {\bf widget()}-$>${\bf hide()}{\rm (p.\,\pageref{classKHTMLPart_a64})} or {\bf view()}{\rm (p.\,\pageref{classKHTMLPart_a11})}-$>${\bf hide()}{\rm (p.\,\pageref{classKHTMLPart_a64})}. 

Definition at line 4038 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!partManager@{partManager}}
\index{partManager@{partManager}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KParts::Part\-Manager} $\ast$ KHTMLPart::part\-Manager ()}\label{classKHTMLPart_a65}


Returns a reference to the partmanager instance which manages html frame objects. 



Definition at line 3287 of file khtml\_\-part.cpp.

References QObject::connect().

Referenced by current\-Frame().\index{KHTMLPart@{KHTMLPart}!saveState@{saveState}}
\index{saveState@{saveState}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::save\-State ({\bf QData\-Stream} \& {\em stream})\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a66}


Saves the KHTMLPart's complete state (including child frame objects) to the provided {\bf QData\-Stream}. 

This is called from the {\bf save\-State}{\rm (p.\,\pageref{classKHTMLPart_a66})}() method of the {\bf browser\-Extension}{\rm (p.\,\pageref{classKHTMLPart_a9})}(). 

Definition at line 3770 of file khtml\_\-part.cpp.

References KStd\-Accel::end(), KParts::Read\-Only\-Part::m\_\-url, and KURL::url().\index{KHTMLPart@{KHTMLPart}!restoreState@{restoreState}}
\index{restoreState@{restoreState}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::restore\-State ({\bf QData\-Stream} \& {\em stream})\hspace{0.3cm}{\tt  [virtual]}}\label{classKHTMLPart_a67}


Restores the KHTMLPart's previously saved state (including child frame objects) from the provided {\bf QData\-Stream}. 

\begin{Desc}
\item[See also:]{\bf save\-State()}{\rm (p.\,\pageref{classKHTMLPart_a66})}\end{Desc}
This is called from the {\bf restore\-State}{\rm (p.\,\pageref{classKHTMLPart_a67})}() method of the {\bf browser\-Extension}{\rm (p.\,\pageref{classKHTMLPart_a9})}() . 

Definition at line 3848 of file khtml\_\-part.cpp.

References QValue\-List$<$ KURL $>$::begin(), close\-URL(), QValue\-List$<$ KURL $>$::Const\-Iterator(), KParts::URLArgs::doc\-State, encoding(), frame\-Names(), KHTMLPage\-Cache::is\-Valid(), open\-URL(), KHTMLPage\-Cache::self(), set\-Zoom\-Factor(), KParts::URLArgs::x\-Offset, KParts::URLArgs::y\-Offset, and zoom\-Factor().\index{KHTMLPart@{KHTMLPart}!nodeUnderMouse@{nodeUnderMouse}}
\index{nodeUnderMouse@{nodeUnderMouse}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOM::Node} KHTMLPart::node\-Under\-Mouse () const}\label{classKHTMLPart_a68}


Returns the {\tt Node} currently under the mouse. 



Definition at line 4044 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!parentPart@{parentPart}}
\index{parentPart@{parentPart}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KHTMLPart} $\ast$ KHTMLPart::parent\-Part ()}\label{classKHTMLPart_a70}


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.

References QObject::parent().

Referenced by khtml\-Mouse\-Move\-Event(), khtml\-Mouse\-Press\-Event(), khtml\-Mouse\-Release\-Event(), KHTMLPart(), and open\-URL().\index{KHTMLPart@{KHTMLPart}!frameNames@{frameNames}}
\index{frameNames@{frameNames}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString\-List} KHTMLPart::frame\-Names () const}\label{classKHTMLPart_a71}


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.

References KStd\-Accel::end().

Referenced by restore\-State().\index{KHTMLPart@{KHTMLPart}!findFrame@{findFrame}}
\index{findFrame@{findFrame}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KHTMLPart} $\ast$ KHTMLPart::find\-Frame (const {\bf QString} \& {\em f})}\label{classKHTMLPart_a73}


Finds a frame by name. 

Returns 0L if frame can't be found. 

Definition at line 3659 of file khtml\_\-part.cpp.

References QObject::class\-Name(), KStd\-Accel::end(), and QObject::inherits().\index{KHTMLPart@{KHTMLPart}!currentFrame@{currentFrame}}
\index{currentFrame@{currentFrame}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KParts::Read\-Only\-Part} $\ast$ KHTMLPart::current\-Frame () const}\label{classKHTMLPart_a74}


Return the current frame (the one that has focus) Not necessarily a direct child of ours, framesets can be nested. 

Returns \char`\"{}this\char`\"{} if this part isn't a frameset. 

Definition at line 3699 of file khtml\_\-part.cpp.

References KParts::Part\-Manager::active\-Part(), QObject::inherits(), and part\-Manager().\index{KHTMLPart@{KHTMLPart}!frameExists@{frameExists}}
\index{frameExists@{frameExists}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::frame\-Exists (const {\bf QString} \& {\em frame\-Name})}\label{classKHTMLPart_a75}


Returns whether a frame with the specified name is exists or not. 

In contrary to the {\bf find\-Frame}{\rm (p.\,\pageref{classKHTMLPart_a73})} 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.\index{KHTMLPart@{KHTMLPart}!setJSStatusBarText@{setJSStatusBarText}}
\index{setJSStatusBarText@{setJSStatusBarText}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-JSStatus\-Bar\-Text (const {\bf QString} \& {\em text})}\label{classKHTMLPart_a76}


Called by KJS. 

Sets the Status\-Bar\-Text assigned via window.status 

Definition at line 4152 of file khtml\_\-part.cpp.

References KParts::Part::set\-Status\-Bar\-Text().\index{KHTMLPart@{KHTMLPart}!setJSDefaultStatusBarText@{setJSDefaultStatusBarText}}
\index{setJSDefaultStatusBarText@{setJSDefaultStatusBarText}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-JSDefault\-Status\-Bar\-Text (const {\bf QString} \& {\em text})}\label{classKHTMLPart_a77}


Called by KJS. 

Sets the Default\-Status\-Bar\-Text assigned via window.default\-Status 

Definition at line 4157 of file khtml\_\-part.cpp.

References KParts::Part::set\-Status\-Bar\-Text().\index{KHTMLPart@{KHTMLPart}!jsStatusBarText@{jsStatusBarText}}
\index{jsStatusBarText@{jsStatusBarText}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KHTMLPart::js\-Status\-Bar\-Text () const}\label{classKHTMLPart_a78}


Called by KJS. 

Returns the Status\-Bar\-Text assigned via window.status 

Definition at line 4162 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!jsDefaultStatusBarText@{jsDefaultStatusBarText}}
\index{jsDefaultStatusBarText@{jsDefaultStatusBarText}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KHTMLPart::js\-Default\-Status\-Bar\-Text () const}\label{classKHTMLPart_a79}


Called by KJS. 

Returns the Default\-Status\-Bar\-Text assigned via window.default\-Status 

Definition at line 4167 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!referrer@{referrer}}
\index{referrer@{referrer}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KHTMLPart::referrer () const}\label{classKHTMLPart_a80}


Referrer used for links in this page. 



Definition at line 4172 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!pageReferrer@{pageReferrer}}
\index{pageReferrer@{pageReferrer}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KHTMLPart::page\-Referrer () const}\label{classKHTMLPart_a81}


Referrer used to obtain this page. 



Definition at line 4177 of file khtml\_\-part.cpp.

References KURL::is\-Valid(), KParts::Read\-Only\-Part::m\_\-url, KURL::protocol(), KURL::set\-Pass(), KURL::set\-Ref(), KURL::set\-User(), and KURL::url().\index{KHTMLPart@{KHTMLPart}!lastModified@{lastModified}}
\index{lastModified@{lastModified}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KHTMLPart::last\-Modified () const}\label{classKHTMLPart_a82}


Last-modified date (in raw string format), if received in the [HTTP] headers. 



Definition at line 4197 of file khtml\_\-part.cpp.

References KURL::is\-Local\-File(), KParts::Read\-Only\-Part::m\_\-url, KURL::path(), and QDate\-Time::to\-String().\index{KHTMLPart@{KHTMLPart}!preloadStyleSheet@{preloadStyleSheet}}
\index{preloadStyleSheet@{preloadStyleSheet}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::preload\-Style\-Sheet (const {\bf QString} \& {\em url}, const {\bf QString} \& {\em stylesheet})}\label{classKHTMLPart_a83}


Loads a style sheet into the stylesheet cache. 



Definition at line 5079 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!preloadScript@{preloadScript}}
\index{preloadScript@{preloadScript}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::preload\-Script (const {\bf QString} \& {\em url}, const {\bf QString} \& {\em script})}\label{classKHTMLPart_a84}


Loads a script into the script cache. 



Definition at line 5084 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!onURL@{onURL}}
\index{onURL@{onURL}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::on\-URL (const {\bf QString} \& {\em url})\hspace{0.3cm}{\tt  [signal]}}\label{classKHTMLPart_l0}


Emitted if the cursor is moved over an URL. 



Referenced by khtml\-Mouse\-Move\-Event().\index{KHTMLPart@{KHTMLPart}!popupMenu@{popupMenu}}
\index{popupMenu@{popupMenu}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::popup\-Menu (const {\bf QString} \& {\em url}, const {\bf QPoint} \& {\em point})\hspace{0.3cm}{\tt  [signal]}}\label{classKHTMLPart_l1}


Emitted when the user clicks the right mouse button on the document. 



Referenced by khtml\-Mouse\-Move\-Event(), and khtml\-Mouse\-Press\-Event().\index{KHTMLPart@{KHTMLPart}!selectionChanged@{selectionChanged}}
\index{selectionChanged@{selectionChanged}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::selection\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKHTMLPart_l2}


This signal is emitted when the selection changes. 



Referenced by khtml\-Mouse\-Release\-Event().\index{KHTMLPart@{KHTMLPart}!nodeActivated@{nodeActivated}}
\index{nodeActivated@{nodeActivated}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::node\-Activated (const {\bf DOM::Node} \&)\hspace{0.3cm}{\tt  [signal]}}\label{classKHTMLPart_l3}


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 close\-URL().\index{KHTMLPart@{KHTMLPart}!completeURL@{completeURL}}
\index{completeURL@{completeURL}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KURL} KHTMLPart::complete\-URL (const {\bf QString} \& {\em url})\hspace{0.3cm}{\tt  [protected]}}\label{classKHTMLPart_b0}


returns a {\bf KURL} object for the given url. 

Use when you know what you're doing. 

Definition at line 1718 of file khtml\_\-part.cpp.

Referenced by khtml\-Mouse\-Move\-Event().\index{KHTMLPart@{KHTMLPart}!htmlError@{htmlError}}
\index{htmlError@{htmlError}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::html\-Error (int {\em error\-Code}, const {\bf QString} \& {\em text}, const {\bf KURL} \& {\em req\-Url})\hspace{0.3cm}{\tt  [protected]}}\label{classKHTMLPart_b1}


presents a detailed error message to the user. 

{\tt error\-Code} kio error code, eg KIO::ERR\_\-SERVER\_\-TIMEOUT. {\tt text} kio additional information text. {\tt url} the url that triggered the error. 

Definition at line 1166 of file khtml\_\-part.cpp.

References QString::arg(), begin(), KIO::build\-Error\-String(), KParts::Read\-Only\-Part::completed(), QDate\-Time::current\-Date\-Time(), KStd\-Accel::description(), end(), KLocale::format\-Date\-Time(), QString::from\-Latin1(), KURL::html\-URL(), QString\-List::join(), KGlobal::locale(), KParts::Read\-Only\-Part::m\_\-url, KIO::raw\-Error\-Detail(), QString::replace(), KParts::Read\-Only\-Part::started(), and write().

Referenced by open\-URL(), and show\-Error().\index{KHTMLPart@{KHTMLPart}!khtmlMousePressEvent@{khtmlMousePressEvent}}
\index{khtmlMousePressEvent@{khtmlMousePressEvent}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::khtml\-Mouse\-Press\-Event (khtml::Mouse\-Press\-Event $\ast$ {\em event})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b3}


Eventhandler of the khtml::Mouse\-Press\-Event. 



Definition at line 4335 of file khtml\_\-part.cpp.

References QMouse\-Event::button(), KNotify\-Client::event(), QMouse\-Event::global\-Pos(), DOM::Node::handle(), DOM::Node::is\-Null(), parent\-Part(), popup\-Menu(), and QMouse\-Event::pos().\index{KHTMLPart@{KHTMLPart}!khtmlMouseDoubleClickEvent@{khtmlMouseDoubleClickEvent}}
\index{khtmlMouseDoubleClickEvent@{khtmlMouseDoubleClickEvent}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::khtml\-Mouse\-Double\-Click\-Event (khtml::Mouse\-Double\-Click\-Event $\ast$)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b4}


Eventhandler for the khtml::Mouse\-Double\-Click\-Event. 



Definition at line 4400 of file khtml\_\-part.cpp.

References QMouse\-Event::button(), KNotify\-Client::event(), DOM::Node::handle(), and DOM::Node::is\-Null().\index{KHTMLPart@{KHTMLPart}!khtmlMouseMoveEvent@{khtmlMouseMoveEvent}}
\index{khtmlMouseMoveEvent@{khtmlMouseMoveEvent}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::khtml\-Mouse\-Move\-Event (khtml::Mouse\-Move\-Event $\ast$ {\em event})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b5}


Eventhandler for the khtml::Mouse\-Double\-Move\-Event. 



Definition at line 4504 of file khtml\_\-part.cpp.

References khtml::Render\-Object::absolute\-Position(), KMultiple\-Drag::add\-Drag\-Object(), QString::arg(), complete\-URL(), QScroll\-View::contents\-To\-Viewport(), KGlobal\-Settings::dnd\-Event\-Delay(), QDrag\-Object::drag(), DOM::Node::element\-Id(), KNotify\-Client::event(), DOM::Node::first\-Child(), QMouse\-Event::global\-Pos(), DOM::Node::handle(), DOM::Node::is\-Null(), QPixmap::is\-Null(), DOM::DOMString::length(), KURLDrag::meta\-Data(), KMime\-Type::mime\-Type(), KURLDrag::new\-Drag(), KStd\-Accel::next(), DOM::Node::next\-Sibling(), on\-URL(), DOM::Node::parent\-Node(), parent\-Part(), KMime\-Type::pixmap\-For\-URL(), popup\-Menu(), QMouse\-Event::pos(), QDrag\-Object::set\-Pixmap(), KParts::Part::set\-Status\-Bar\-Text(), KIcon::Size\-Medium, QMouse\-Event::state(), DOM::DOMString::string(), view(), QPoint::x(), QMouse\-Event::x(), QPoint::y(), and QMouse\-Event::y().\index{KHTMLPart@{KHTMLPart}!khtmlMouseReleaseEvent@{khtmlMouseReleaseEvent}}
\index{khtmlMouseReleaseEvent@{khtmlMouseReleaseEvent}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::khtml\-Mouse\-Release\-Event (khtml::Mouse\-Release\-Event $\ast$ {\em event})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b6}


Eventhandler for the khtml::Mouse\-Move\-Event. 



Definition at line 4674 of file khtml\_\-part.cpp.

References QMouse\-Event::button(), KParts::Browser\-Interface::call\-Method(), QApplication::clipboard(), QObject::connect(), QObject::disconnect(), KNotify\-Client::event(), KURIFilter::filter\-URI(), DOM::Node::first\-Child(), DOM::Node::is\-Null(), KStd\-Accel::next(), DOM::Node::next\-Sibling(), DOM::Node::parent\-Node(), parent\-Part(), QString::replace(), selected\-Text(), selection\-Changed(), KURIFilter::self(), KURIFilter\-Data::set\-Data(), KParts::Part::set\-Status\-Bar\-Text(), QClipboard::set\-Text(), QClipboard::text(), KURIFilter\-Data::uri(), KURIFilter\-Data::uri\-Type(), and KURL::url().\index{KHTMLPart@{KHTMLPart}!khtmlDrawContentsEvent@{khtmlDrawContentsEvent}}
\index{khtmlDrawContentsEvent@{khtmlDrawContentsEvent}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::khtml\-Draw\-Contents\-Event (khtml::Draw\-Contents\-Event $\ast$)\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b7}


Eventhandler for the khtml::Draw\-Contents\-Event. 



Definition at line 4777 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!guiActivateEvent@{guiActivateEvent}}
\index{guiActivateEvent@{guiActivateEvent}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::gui\-Activate\-Event ({\bf KParts::GUIActivate\-Event} $\ast$ {\em event})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b8}


Internal reimplementation of {\bf KParts::Part::gui\-Activate\-Event} . 



Reimplemented from {\bf KParts::Read\-Only\-Part}.

Definition at line 4781 of file khtml\_\-part.cpp.

References QPtr\-List::append(), KNotify\-Client::event(), and KXMLGUIClient::plug\-Action\-List().\index{KHTMLPart@{KHTMLPart}!openFile@{openFile}}
\index{openFile@{openFile}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KHTMLPart::open\-File ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b9}


Internal empty reimplementation of {\bf KParts::Read\-Only\-Part::open\-File} . 



Implements {\bf KParts::Read\-Only\-Part}.

Definition at line 980 of file khtml\_\-part.cpp.\index{KHTMLPart@{KHTMLPart}!createPart@{createPart}}
\index{createPart@{createPart}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KParts::Read\-Only\-Part} $\ast$ KHTMLPart::create\-Part ({\bf QWidget} $\ast$ {\em parent\-Widget}, const char $\ast$ {\em widget\-Name}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name}, const {\bf QString} \& {\em mimetype}, {\bf QString} \& {\em service\-Name}, {\bf QString\-List} \& {\em service\-Types}, const {\bf QString\-List} \& {\em params})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKHTMLPart_b11}


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 {\bf KDE} wide registry system (KSy\-Co\-Ca) . 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.

References QString::append(), QObject::class\-Name(), KLib\-Factory::create(), QFile::encode\-Name(), KLib\-Loader::factory(), KXMLGUIClient::factory(), QString::from\-Latin1(), QObject::inherits(), QString::is\-Empty(), KIO::mimetype(), KStd\-Accel::name(), KTrader::Offer\-List, KService::Ptr, KTrader::query(), KLib\-Loader::self(), and KTrader::self().\index{KHTMLPart@{KHTMLPart}!setActiveNode@{setActiveNode}}
\index{setActiveNode@{setActiveNode}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::set\-Active\-Node (const {\bf DOM::Node} \& {\em node})\hspace{0.3cm}{\tt  [slot]}}\label{classKHTMLPart_i0}


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.

See {\bf active\-Node}{\rm (p.\,\pageref{classKHTMLPart_a8})}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em node}]The node to focus \end{description}
\end{Desc}


Definition at line 5030 of file khtml\_\-part.cpp.

References QRect::bottom(), DOM::Node::handle(), QRect::left(), QRect::right(), and QRect::top().\index{KHTMLPart@{KHTMLPart}!stopAnimations@{stopAnimations}}
\index{stopAnimations@{stopAnimations}!KHTMLPart@{KHTMLPart}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KHTMLPart::stop\-Animations ()\hspace{0.3cm}{\tt  [slot]}}\label{classKHTMLPart_i1}


Stops all animated images on the current and child pages. 



Definition at line 1456 of file khtml\_\-part.cpp.

References KStd\-Accel::end(), and end().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
khtml\_\-part.h\item 
khtml\_\-part.cpp\end{CompactItemize}
