KHTMLPart Class Reference
This class is khtml's main class.HTML Browser Widget. More...
#include <khtml_part.h>
Inheritance diagram for KHTMLPart:

Public Types | |
enum | GUIProfile { DefaultGUI, BrowserViewGUI } |
enum | CaretDisplayPolicy { CaretVisible, CaretInvisible, CaretBlink } |
enum | FindOptions { FindLinksOnly = 1 * KFindDialog::MinimumUserOption, FindNoPopups = 2 * KFindDialog::MinimumUserOption } |
enum | FormNotification { NoNotification = 0, Before, Only, Unused = 255 } |
Public Slots | |
void | setActiveNode (const DOM::Node &node) |
void | stopAnimations () |
QCString | dcopObjectId () const |
QVariant | executeScript (const QString &script) |
void | setCaretMode (bool enable) |
void | setEditable (bool enable) |
void | setCaretVisible (bool show) |
void | submitFormProxy (const char *action, const QString &url, const QByteArray &formData, const QString &target, const QString &contentType=QString::null, const QString &boundary=QString::null) |
Signals | |
void | onURL (const QString &url) |
void | popupMenu (const QString &url, const QPoint &point) |
void | selectionChanged () |
void | nodeActivated (const DOM::Node &) |
void | docCreated () |
void | caretPositionChanged (const DOM::Node &node, long offset) |
void | formSubmitNotification (const char *action, const QString &url, const QByteArray &formData, const QString &target, const QString &contentType, const QString &boundary) |
Public Member Functions | |
KHTMLPart (QWidget *parentWidget=0, const char *widgetname=0, QObject *parent=0, const char *name=0, GUIProfile prof=DefaultGUI) | |
KHTMLPart (KHTMLView *view, QObject *parent=0, const char *name=0, GUIProfile prof=DefaultGUI) | |
virtual | ~KHTMLPart () |
virtual bool | openURL (const KURL &url) |
virtual bool | closeURL () |
virtual void | showError (KIO::Job *job) |
DOM::HTMLDocument | htmlDocument () const |
DOM::Document | document () const |
DOM::Node | activeNode () const |
KParts::BrowserExtension * | browserExtension () const |
KParts::LiveConnectExtension * | liveConnectExtension (const khtml::RenderPart *) const |
KParts::BrowserHostExtension * | browserHostExtension () const |
KHTMLView * | view () const |
void | setJScriptEnabled (bool enable) |
bool | jScriptEnabled () const |
KJS::Interpreter * | jScriptInterpreter () |
void | setStatusMessagesEnabled (bool enable) |
bool | statusMessagesEnabled () const |
void | setMetaRefreshEnabled (bool enable) |
bool | metaRefreshEnabled () const |
QVariant | executeScript (const DOM::Node &n, const QString &script) |
void | setDNDEnabled (bool b) |
bool | dndEnabled () const |
void | setJavaEnabled (bool enable) |
bool | javaEnabled () const |
KJavaAppletContext * | javaContext () |
KJavaAppletContext * | createJavaContext () |
void | setPluginsEnabled (bool enable) |
bool | pluginsEnabled () const |
void | setAutoloadImages (bool enable) |
bool | autoloadImages () const |
void | setOnlyLocalReferences (bool enable) |
bool | onlyLocalReferences () const |
bool | isCaretMode () const |
bool | isEditable () const |
void | setCaretPosition (DOM::Node node, long offset, bool extendSelection=false) |
CaretDisplayPolicy | caretDisplayPolicyNonFocused () const |
void | setCaretDisplayPolicyNonFocused (CaretDisplayPolicy policy) |
void | enableJScript (bool e) |
void | enableJava (bool e) |
void | enablePlugins (bool e) |
void | autoloadImages (bool e) |
void | enableMetaRefresh (bool e) |
bool | setCharset (const QString &, bool) |
KURL | baseURL () const |
QString | baseTarget () const |
KURL | backgroundURL () const |
void | scheduleRedirection (int delay, const QString &url, bool lockHistory=true) |
virtual void | begin (const KURL &url=KURL(), int xOffset=0, int yOffset=0) |
virtual void | write (const char *str, int len=-1) |
virtual void | write (const QString &str) |
virtual void | end () |
void | paint (QPainter *, const QRect &, int=0, bool *=0) |
bool | setEncoding (const QString &name, bool override=false) |
QString | encoding () const |
void | setUserStyleSheet (const KURL &url) |
void | setUserStyleSheet (const QString &styleSheet) |
void | setStandardFont (const QString &name) |
void | setFixedFont (const QString &name) |
bool | gotoAnchor (const QString &name) |
bool | nextAnchor () |
bool | prevAnchor () |
void | setURLCursor (const QCursor &c) |
QCursor | urlCursor () const |
void | findText () |
void | findText (const QString &str, long options, QWidget *parent=0, KFindDialog *findDialog=0) |
void | findTextBegin () |
bool | findTextNext (const QString &str, bool forward, bool caseSensitive, bool isRegExp) |
bool | findTextNext () |
void | setZoomFactor (int percent) |
int | zoomFactor () const |
virtual QString | selectedText () const |
DOM::Range | selection () const |
void | selection (DOM::Node &startNode, long &startOffset, DOM::Node &endNode, long &endOffset) const |
void | setSelection (const DOM::Range &) |
bool | hasSelection () const |
void | selectAll () |
void | show () |
void | hide () |
KParts::PartManager * | partManager () |
virtual void | saveState (QDataStream &stream) |
virtual void | restoreState (QDataStream &stream) |
DOM::Node | nodeUnderMouse () const |
DOM::Node | nonSharedNodeUnderMouse () const |
const KHTMLSettings * | settings () const |
KHTMLPart * | parentPart () |
QStringList | frameNames () const |
QPtrList< KParts::ReadOnlyPart > | frames () const |
KHTMLPart * | findFrame (const QString &f) |
KHTMLPart * | findFrameParent (KParts::ReadOnlyPart *callingPart, const QString &f, khtml::ChildFrame **childFrame=0) |
KParts::ReadOnlyPart * | currentFrame () const |
bool | frameExists (const QString &frameName) |
KJSProxy * | framejScript (KParts::ReadOnlyPart *framePart) |
KParts::ReadOnlyPart * | findFramePart (const QString &f) |
void | setJSStatusBarText (const QString &text) |
void | setJSDefaultStatusBarText (const QString &text) |
QString | jsStatusBarText () const |
QString | jsDefaultStatusBarText () const |
QString | referrer () const |
QString | pageReferrer () const |
QString | lastModified () const |
void | preloadStyleSheet (const QString &url, const QString &stylesheet) |
void | preloadScript (const QString &url, const QString &script) |
bool | restored () const |
void | setFormNotification (FormNotification fn) |
FormNotification | formNotification () const |
KURL | toplevelURL () |
bool | isModified () const |
Protected Types | |
enum | PageSecurity { NotCrypted, Encrypted, Mixed } |
Protected Member Functions | |
KURL | completeURL (const QString &url) |
void | htmlError (int errorCode, const QString &text, const KURL &reqUrl) |
virtual void | customEvent (QCustomEvent *event) |
virtual void | khtmlMousePressEvent (khtml::MousePressEvent *event) |
virtual void | khtmlMouseDoubleClickEvent (khtml::MouseDoubleClickEvent *) |
virtual void | khtmlMouseMoveEvent (khtml::MouseMoveEvent *event) |
virtual void | khtmlMouseReleaseEvent (khtml::MouseReleaseEvent *event) |
virtual void | khtmlDrawContentsEvent (khtml::DrawContentsEvent *) |
virtual void | guiActivateEvent (KParts::GUIActivateEvent *event) |
virtual bool | openFile () |
virtual void | urlSelected (const QString &url, int button, int state, const QString &_target, KParts::URLArgs args=KParts::URLArgs()) |
virtual KParts::ReadOnlyPart * | createPart (QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, const QString &mimetype, QString &serviceName, QStringList &serviceTypes, const QStringList ¶ms) |
bool | pluginPageQuestionAsked (const QString &mimetype) const |
void | setPluginPageQuestionAsked (const QString &mimetype) |
void | setPageSecurity (PageSecurity sec) |
virtual bool | doOpenStream (const QString &mimeType) |
virtual bool | doWriteStream (const QByteArray &data) |
virtual bool | doCloseStream () |
Properties | |
bool | javaScriptEnabled |
bool | javaEnabled |
bool | autoloadImages |
bool | dndEnabled |
bool | pluginsEnabled |
bool | onlyLocalReferences |
QCString | dcopObjectId |
bool | modified |
Friends | |
class | KHTMLView |
class | DOM::HTMLTitleElementImpl |
class | DOM::HTMLFrameElementImpl |
class | DOM::HTMLIFrameElementImpl |
class | DOM::HTMLObjectElementImpl |
class | DOM::HTMLAnchorElementImpl |
class | DOM::HTMLMetaElementImpl |
class | DOM::NodeImpl |
class | KHTMLRun |
class | DOM::HTMLFormElementImpl |
class | khtml::RenderPartObject |
class | KJS::Window |
class | KJS::ScheduledAction |
class | KJS::JSNodeFilter |
class | KJS::WindowFunc |
class | KJS::ExternalFunc |
class | KJS::JSEventListener |
class | KJS::JSLazyEventListener |
class | KJS::DOMDocument |
class | KJS::SourceFile |
class | KJSProxy |
class | KHTMLPartBrowserExtension |
class | DOM::DocumentImpl |
class | DOM::HTMLDocumentImpl |
class | KHTMLPartBrowserHostExtension |
class | khtml::HTMLTokenizer |
class | khtml::XMLTokenizer |
class | khtml::RenderWidget |
class | khtml::CSSStyleSelector |
class | KHTMLPartIface |
class | KHTMLPartFunction |
class | KHTMLPartPrivate |
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 an HTML page at some URL) is the following:
KURL url = "http://www.kde.org"; KHTMLPart *w = new KHTMLPart(); w->openURL(url); w->view()->resize(500, 400); w->show();
Java and JavaScript are enabled by default depending on the user's settings. If you do not need them, and especially 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:
w->setJScriptEnabled(false); w->setJavaEnabled(false); w->setMetaRefreshEnabled(false); w->setPluginsEnabled(false);
You may also wish to disable external references. This will prevent KHTML from loading images, frames, etc, or redirecting to external sites.
w->setOnlyLocalReferences(true);
Some apps want to write their HTML code directly into the widget instead of opening an url. You can do this in the following way:
QString myHTMLCode = ...; KHTMLPart *w = new KHTMLPart(); w->begin(); w->write(myHTMLCode); ... w->end();
You can do as many calls to write() as you wish. There are two write() methods, one accepting a QString and one accepting a char
*
argument. You should use one or the other (but not both) since the method using the char
*
argument does an additional decoding step to convert the written data to Unicode.
It is also possible to write content to the HTML part using the standard streaming API from KParts::ReadOnlyPart. The usage of the API is similar to that of the begin(), write(), end() process described above as the following example shows:
KHTMLPart *doc = new KHTMLPart(); doc->openStream( "text/html", KURL() ); doc->writeStream( QCString( "<html><body><p>KHTML Rocks!</p></body></html>" ) ); doc->closeStream();
- Author:
- Lars Knoll (knoll@kde.org)
Definition at line 184 of file khtml_part.h.
Member Enumeration Documentation
|
Enumeration for displaying the caret.
Definition at line 476 of file khtml_part.h. |
|
Extra Find options that can be used when calling the extended findText().
Definition at line 679 of file khtml_part.h. |
Constructor & Destructor Documentation
|
Constructs a new KHTMLPart.
KHTML basically consists of two objects: The KHTMLPart itself, holding the document data (DOM document), and the KHTMLView, derived from QScrollView, 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 KHTMLView. If the second Definition at line 201 of file khtml_part.cpp. References parentPart(), and KParts::PartBase::setInstance(). |
|
Destructor.
Definition at line 436 of file khtml_part.cpp. References closeURL(), KGlobal::config(), parentPart(), KConfigBase::setGroup(), and KConfigBase::writeEntry(). |
Member Function Documentation
|
|
Stops loading the document and kills all data requests (for images, etc. ) Reimplemented from KParts::ReadOnlyPart. Definition at line 716 of file khtml_part.cpp. References KProtocolManager::cacheControl(), end(), kdDebug(), KParts::ReadOnlyPart::m_url, nodeActivated(), KURL::prettyURL(), and KHTMLPageCache::self(). Referenced by openURL(), restoreState(), setEncoding(), and ~KHTMLPart(). |
|
Called when a certain error situation (i.e.
connection timed out) occurred. The default implementation either shows a KIO error dialog or loads a more verbose error description a as page, depending on the users configuration. Definition at line 1568 of file khtml_part.cpp. References KIO::Job::error(), KIO::Job::errorText(), htmlError(), kdDebug(), and KIO::Job::showErrorDialog(). |
|
Returns a reference to the DOM HTML document (for non-HTML documents, returns null).
Definition at line 798 of file khtml_part.cpp. |
|
Returns a reference to the DOM document.
Definition at line 806 of file khtml_part.cpp. Referenced by selection(). |
|
Returns the node that has the keyboard focus.
Definition at line 6419 of file khtml_part.cpp. |
|
Returns a pointer to the KParts::BrowserExtension.
Definition at line 811 of file khtml_part.cpp. |
|
Returns a pointer to the HTML document's view.
Definition at line 821 of file khtml_part.cpp. Referenced by caretDisplayPolicyNonFocused(), khtmlMouseMoveEvent(), setCaretDisplayPolicyNonFocused(), setCaretMode(), setCaretPosition(), setCaretVisible(), and setEditable(). |
|
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 845 of file khtml_part.cpp. References jScriptEnabled(). |
|
Returns
Definition at line 854 of file khtml_part.cpp. References onlyLocalReferences(). Referenced by setJScriptEnabled(). |
|
Returns the JavaScript interpreter the part is using. This method is mainly intended for applications which embed and extend the part and provides a mechanism for adding additional native objects to the interpreter (or removing the built-ins). One thing people using this method to add things to the interpreter must consider, is that when you start writing new content to the part, the interpreter is cleared. This includes both use of the begin( const KURL &, int, int ) method, and the openURL( const KURL & ) method. If you want your objects to have a longer lifespan, then you must retain a KJS::Object yourself to ensure that the reference count of your custom objects never reaches 0. You will also need to re-add your bindings everytime this happens - one way to detect the need for this is to connect to the docCreated() signal, another is to reimplement the begin() method. Definition at line 831 of file khtml_part.cpp. |
|
Enable/disable statusbar messages.
Definition at line 826 of file khtml_part.cpp. |
|
Returns
Definition at line 840 of file khtml_part.cpp. |
|
Enable/disable automatic forwarding by <meta http-equiv="refresh" . ...> Definition at line 863 of file khtml_part.cpp. |
|
Returns
Definition at line 868 of file khtml_part.cpp. |
|
Same as executeScript( const QString & ) except with the Node parameter specifying the 'this' value.
Definition at line 1084 of file khtml_part.cpp. References DOM::Node::isNull(), kdDebug(), DOM::Node::nodeName(), and DOM::Node::nodeType(). Referenced by executeScript(). |
|
Enables or disables Drag'n'Drop support. A drag operation is started if the users drags a link. Definition at line 5454 of file khtml_part.cpp. |
|
Returns whether Dragn'n'Drop support is enabled or not.
|
|
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 1142 of file khtml_part.cpp. |
|
Return true if Java applet support is enabled, false if disabled.
|
|
Returns the java context of the applets. If no applet exists, 0 is returned. Definition at line 1161 of file khtml_part.cpp. |
|
Returns the java context of the applets. If no context exists yet, a new one is created. Definition at line 1166 of file khtml_part.cpp. |
|
Enables or disables plugins, default is enabled.
Definition at line 1171 of file khtml_part.cpp. |
|
Returns true if plugins are enabled/disabled.
|
|
Specifies whether images contained in the document should be loaded automatically or not.
Definition at line 1233 of file khtml_part.cpp. References KXMLGUIClient::actionCollection(), KXMLGUIClient::plugActionList(), and KXMLGUIClient::unplugActionList(). Referenced by begin(). |
|
Returns whether images contained in the document are loaded automatically or not.
|
|
Security option. Specify whether only file:/ or data:/ urls are allowed to be loaded without user confirmation by KHTML. ( for example referenced by stylesheets, images, scripts, subdocuments, embedded elements ). This option is mainly intended for enabling the "mail reader mode", where you load untrusted content with a file:/ url. Please note that enabling this option currently automatically disables Javascript, Java and Plugins support. This might change in the future if the security model is becoming more sophisticated, so don't rely on this behaviour. ( default false - everything is loaded unless forbidden by KApplication::authorizeURLAction). Definition at line 2442 of file khtml_part.cpp. |
|
Returns whether only file:/ or data:/ references are allowed to be loaded ( default false ).
Referenced by jScriptEnabled(). |
|
Returns whether caret mode is on/off.
Definition at line 2492 of file khtml_part.cpp. Referenced by khtml::EditableCaretBoxIterator::isEditable(), KHTMLView::layout(), setCaretMode(), setCaretVisible(), and setEditable(). |
|
Returns
Definition at line 2513 of file khtml_part.cpp. Referenced by khtml::EditableCaretBoxIterator::isEditable(), khtmlMouseMoveEvent(), khtmlMousePressEvent(), KHTMLView::layout(), setCaretMode(), setCaretVisible(), and setEditable(). |
|
Sets the caret to the given position.
If the given location is invalid, it will snap to the nearest valid location. Immediately afterwards a
Definition at line 2518 of file khtml_part.cpp. References DOM::Node::handle(), k_funcinfo, kdDebug(), DOM::Node::nodeName(), and view(). |
|
Returns the current caret policy when the view is not focused.
Definition at line 2532 of file khtml_part.cpp. References view(). |
|
Sets the caret display policy when the view is not focused. Whenever the caret is in use, this property determines how the caret should be displayed when the document view is not focused. The default policy is CaretInvisible.
Definition at line 2541 of file khtml_part.cpp. References view(). |
|
Returns the URL for the background Image (used by save background).
Definition at line 3697 of file khtml_part.cpp. References KParts::ReadOnlyPart::m_url. |
|
Schedules a redirection after
Definition at line 2225 of file khtml_part.cpp. References kdDebug(). |
|
Clears the widget and prepares it for new content. If you want url() to return for example "file:/tmp/test.html", you can use the following code:
Definition at line 1737 of file khtml_part.cpp. References KParts::URLArgs::docState, KURL::isEmpty(), KURL::isValid(), KParts::ReadOnlyPart::m_url, KMimeType::mimeType(), parentPart(), KURL::prettyURL(), KURL::protocol(), KParts::URLArgs::serviceType, setAutoloadImages(), KURL::setQuery(), KURL::setRef(), setUserStyleSheet(), KParts::Part::setWindowCaption(), KURL::url(), KParts::URLArgs::xOffset, and KParts::URLArgs::yOffset. Referenced by doOpenStream(), and htmlError(). |
|
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 Attention: Don't mix calls to write( const char *) with calls to write( const QString & ). The result might not be what you want. Definition at line 1826 of file khtml_part.cpp. Referenced by doWriteStream(), end(), and htmlError(). |
|
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 1858 of file khtml_part.cpp. |
|
Call this after your last call to write().
Definition at line 1873 of file khtml_part.cpp. References write(). Referenced by closeURL(), doCloseStream(), and htmlError(). |
|
Paints the HTML page to a QPainter. See KHTMLView::paint for details Definition at line 1905 of file khtml_part.cpp. |
|
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 url() is not empty. Definition at line 2299 of file khtml_part.cpp. References closeURL(), KURL::isEmpty(), KParts::ReadOnlyPart::m_url, and openURL(). |
|
Returns the encoding the page currently uses. Note that the encoding might be different from the charset. Definition at line 2317 of file khtml_part.cpp. |
|
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 2341 of file khtml_part.cpp. References KURL::url(). Referenced by begin(). |
|
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 2347 of file khtml_part.cpp. |
|
Sets the standard font style.
Definition at line 2417 of file khtml_part.cpp. |
|
Sets the fixed font style.
Definition at line 2422 of file khtml_part.cpp. |
|
Finds the anchor named
If the anchor is found, the widget scrolls to the closest position. Returns Definition at line 2353 of file khtml_part.cpp. References kdDebug(). Referenced by openURL(). |
|
Go to the next anchor. This is useful to navigate from outside the navigator
Definition at line 2399 of file khtml_part.cpp. |
|
Go to previous anchor.
Definition at line 2408 of file khtml_part.cpp. |
|
Sets the cursor to use when the cursor is on a link.
Definition at line 2427 of file khtml_part.cpp. |
|
Returns the cursor which is used when the cursor is on a link.
Definition at line 2432 of file khtml_part.cpp. |
|
Starts a new search by popping up a dialog asking the user what he wants to search for.
Definition at line 2764 of file khtml_part.cpp. References KWin::activateWindow(), hasSelection(), selectionChanged(), and KParts::Part::widget(). Referenced by findTextNext(). |
|
Starts a new search, but bypasses the user dialog.
Definition at line 2802 of file khtml_part.cpp. References selectionChanged(). |
|
Initiates a text search.
Definition at line 2567 of file khtml_part.cpp. |
|
Finds the next occurrence of the string or expression. If isRegExp is true then str is converted to a QRegExp, and caseSensitive is ignored. , use findText( str, options, parent, findDialog ) Definition at line 2644 of file khtml_part.cpp. References DOM::DOMString::implementation(). |
|
Finds the next occurence of a string set by findText().
Definition at line 2831 of file khtml_part.cpp. References findText(), hasSelection(), and kdDebug(). |
|
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 5251 of file khtml_part.cpp. References setZoomFactor(). Referenced by restoreState(), and setZoomFactor(). |
|
Returns the current zoom factor.
Definition at line 5187 of file khtml_part.cpp. Referenced by KHTMLView::print(), and restoreState(). |
|
Returns the text the user has marked.
Definition at line 3149 of file khtml_part.cpp. References DOM::Node::elementId(), DOM::Node::firstChild(), DOM::Node::handle(), DOM::Node::isNull(), DOM::Node::nextSibling(), DOM::Node::nodeType(), DOM::Node::nodeValue(), and DOM::Node::parentNode(). Referenced by khtmlMouseReleaseEvent(). |
|
Returns the selected part of the HTML.
Definition at line 3277 of file khtml_part.cpp. References document(). |
|
Returns the selected part of the HTML by returning the starting and end position. If there is no selection, both nodes and offsets are equal.
Definition at line 3285 of file khtml_part.cpp. |
|
Sets the current selection.
Definition at line 3293 of file khtml_part.cpp. |
|
Has the user selected anything? Call selectedText() to retrieve the selected text.
Definition at line 3267 of file khtml_part.cpp. Referenced by findText(), and findTextNext(). |
|
Marks all text in the document as selected.
Definition at line 6230 of file khtml_part.cpp. |
|
Convenience method to show the document's view. Equivalent to widget()->show() or view()->show() . Definition at line 5155 of file khtml_part.cpp. |
|
Convenience method to hide the document's view. Equivalent to widget()->hide() or view()->hide(). Definition at line 5161 of file khtml_part.cpp. |
|
Returns a reference to the partmanager instance which manages html frame objects.
Definition at line 4272 of file khtml_part.cpp. Referenced by currentFrame(). |
|
Saves the KHTMLPart's complete state (including child frame objects) to the provided QDataStream. This is called from the saveState() method of the browserExtension(). Definition at line 4883 of file khtml_part.cpp. References kdDebug(), KParts::ReadOnlyPart::m_url, and KURL::url(). |
|
Restores the KHTMLPart's previously saved state (including child frame objects) from the provided QDataStream.
Definition at line 4969 of file khtml_part.cpp. References closeURL(), KParts::URLArgs::docState, frameNames(), KParts::ReadOnlyPart::m_url, openURL(), KHTMLPageCache::self(), setZoomFactor(), KParts::URLArgs::xOffset, KParts::URLArgs::yOffset, and zoomFactor(). |
|
Returns the The returned node may be a shared node (e. g. an <area> node if the mouse is hovering over an image map). Definition at line 5167 of file khtml_part.cpp. |
|
Returns the The returned node is always the node that is physically under the mouse pointer (irrespective of logically overlying elements like, e. g., <area> on image maps).
Definition at line 5172 of file khtml_part.cpp. |
|
Returns a pointer to the parent KHTMLPart if the part is a frame in an HTML frameset. Returns 0L otherwise. Definition at line 4843 of file khtml_part.cpp. Referenced by begin(), findFrameParent(), khtmlMouseMoveEvent(), khtmlMousePressEvent(), khtmlMouseReleaseEvent(), KHTMLPart(), openURL(), toplevelURL(), and ~KHTMLPart(). |
|
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 5411 of file khtml_part.cpp. Referenced by restoreState(). |
|
Finds a frame by name. Returns 0L if frame can't be found. Definition at line 4779 of file khtml_part.cpp. References findFrameParent(). |
|
Recursively finds the part containing the frame with name
Returns parent part if a suitable frame was found and frame info in
Definition at line 4738 of file khtml_part.cpp. References findFrameParent(), kdDebug(), KParts::ReadOnlyPart::m_url, and parentPart(). Referenced by findFrame(), findFrameParent(), and findFramePart(). |
|
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 4798 of file khtml_part.cpp. References partManager(). |
|
Returns whether a frame with the specified name is exists or not. In contrary to the findFrame method this one also returns true if the frame is defined but no displaying component has been found/loaded, yet. Definition at line 4813 of file khtml_part.cpp. |
|
Returns child frame framePart its script interpreter.
Definition at line 4825 of file khtml_part.cpp. References jScript(). |
|
Finds a frame by name. Returns 0L if frame can't be found. Definition at line 4792 of file khtml_part.cpp. References findFrameParent(). |
|
Called by KJS. Sets the StatusBarText assigned via window.status Definition at line 5312 of file khtml_part.cpp. |
|
Called by KJS. Sets the DefaultStatusBarText assigned via window.defaultStatus Definition at line 5317 of file khtml_part.cpp. |
|
Called by KJS. Returns the StatusBarText assigned via window.status Definition at line 5322 of file khtml_part.cpp. |
|
Called by KJS. Returns the DefaultStatusBarText assigned via window.defaultStatus Definition at line 5327 of file khtml_part.cpp. |
|
Referrer used for links in this page.
Definition at line 5332 of file khtml_part.cpp. |
|
Referrer used to obtain this page.
Definition at line 5337 of file khtml_part.cpp. References KURL::isValid(), KParts::ReadOnlyPart::m_url, KURL::protocol(), KURL::setPass(), KURL::setRef(), KURL::setUser(), and KURL::url(). |
|
Last-modified date (in raw string format), if received in the [HTTP] headers.
Definition at line 5358 of file khtml_part.cpp. References KURL::isLocalFile(), KParts::ReadOnlyPart::m_url, and KURL::path(). |
|
Loads a style sheet into the stylesheet cache.
Definition at line 6454 of file khtml_part.cpp. |
|
Loads a script into the script cache.
Definition at line 6459 of file khtml_part.cpp. |
|
Determine if signal should be emitted before, instead or never when a submitForm() happens.
Definition at line 6787 of file khtml_part.cpp. |
|
Determine if signal should be emitted before, instead or never when a submitForm() happens. ### KDE4 remove me
Definition at line 6791 of file khtml_part.cpp. |
|
Returns the toplevel (origin) URL of this document, even if this part is a frame or an iframe.
Definition at line 6795 of file khtml_part.cpp. References parentPart(), and KParts::ReadOnlyPart::url(). Referenced by openURL(). |
|
Checks whether the page contains unsubmitted form changes.
Definition at line 6807 of file khtml_part.cpp. |
|
Emitted if the cursor is moved over an URL.
Referenced by khtmlMouseMoveEvent(). |
|
Emitted when the user clicks the right mouse button on the document.
Referenced by khtmlMouseMoveEvent(), and khtmlMousePressEvent(). |
|
This signal is emitted when the selection changes.
Referenced by findText(), and khtmlMouseReleaseEvent(). |
|
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(). |
|
This signal is emitted whenever the caret position has been changed. The signal transmits the position the DOM::Range way, the node and the zero-based offset within this node.
|
|
If form notification is on, this will be emitted either for a form submit or before the form submit according to the setting.
|
|
returns a KURL object for the given url. Use when you know what you're doing. Definition at line 2215 of file khtml_part.cpp. Referenced by khtmlMouseMoveEvent(). |
|
presents a detailed error message to the user.
Definition at line 1585 of file khtml_part.cpp. References begin(), KIO::buildErrorString(), KParts::ReadOnlyPart::completed(), end(), KURL::htmlURL(), kdDebug(), KGlobal::locale(), KParts::ReadOnlyPart::m_url, KURL::prettyURL(), KURL::protocol(), KIO::rawErrorDetail(), KParts::ReadOnlyPart::started(), and write(). Referenced by openURL(), and showError(). |
|
Eventhandler of the khtml::MousePressEvent.
Definition at line 5569 of file khtml_part.cpp. References DOM::Node::handle(), isEditable(), DOM::Node::isNull(), parentPart(), popupMenu(), and KURL::url(). |
|
Eventhandler for the khtml::MouseDoubleClickEvent.
Definition at line 5649 of file khtml_part.cpp. References DOM::Node::handle(), and DOM::Node::isNull(). |
|
Eventhandler for the khtml::MouseDoubleMoveEvent.
Definition at line 5899 of file khtml_part.cpp. References KMultipleDrag::addDragObject(), completeURL(), KGlobalSettings::dndEventDelay(), DOM::Node::elementId(), DOM::Node::handle(), isEditable(), DOM::Node::isNull(), DOM::DOMString::length(), KURLDrag::metaData(), KMimeType::mimeType(), onURL(), parentPart(), KMimeType::pixmapForURL(), popupMenu(), KURL::setPass(), KIcon::SizeMedium, DOM::DOMString::string(), KURL::url(), and view(). |
|
Eventhandler for the khtml::MouseMoveEvent.
Definition at line 6044 of file khtml_part.cpp. References KParts::BrowserInterface::callMethod(), d, DOM::Node::firstChild(), DOM::Node::isNull(), kdDebug(), DOM::Node::nextSibling(), DOM::Node::parentNode(), parentPart(), selectedText(), and selectionChanged(). |
|
Eventhandler for the khtml::DrawContentsEvent.
Definition at line 6158 of file khtml_part.cpp. |
|
Internal reimplementation of KParts::Part::guiActivateEvent .
Definition at line 6162 of file khtml_part.cpp. References KParts::GUIActivateEvent::activated(), and KXMLGUIClient::plugActionList(). |
|
Internal empty reimplementation of KParts::ReadOnlyPart::openFile .
Implements KParts::ReadOnlyPart. Definition at line 1375 of file khtml_part.cpp. |
|
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 KDE 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 4218 of file khtml_part.cpp. References KXMLGUIClient::factory(), kdWarning(), KLibLoader::self(), and KTrader::self(). |
|
Implements the streaming API of KParts::ReadOnlyPart.
Definition at line 1882 of file khtml_part.cpp. References begin(), and KParts::ReadOnlyPart::url(). |
|
Implements the streaming API of KParts::ReadOnlyPart.
Definition at line 1892 of file khtml_part.cpp. References write(). |
|
Implements the streaming API of KParts::ReadOnlyPart.
Definition at line 1898 of file khtml_part.cpp. References end(). |
|
Sets the focused 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 visual indication of whether or not they are focused. See activeNode
Definition at line 6405 of file khtml_part.cpp. |
|
Stops all animated images on the current and child pages.
Definition at line 1911 of file khtml_part.cpp. References stopAnimations(). Referenced by stopAnimations(). |
|
Execute the specified snippet of JavaScript code.
Returns
Definition at line 1079 of file khtml_part.cpp. References executeScript(). |
|
Enables/disables caret mode. Enabling caret mode displays a caret which can be used to navigate the document using the keyboard only. Caret mode is switched off by default.
Definition at line 2475 of file khtml_part.cpp. References isCaretMode(), isEditable(), kdDebug(), and view(). |
|
Makes the document editable.
Setting this property to
Definition at line 2497 of file khtml_part.cpp. References isCaretMode(), isEditable(), and view(). |
|
Sets the visibility of the caret. This methods displays or hides the caret regardless of the current caret display policy (see setCaretDisplayNonFocused), and regardless of focus. The caret will be shown/hidden only under at least one of the following conditions:
Definition at line 2548 of file khtml_part.cpp. References isCaretMode(), isEditable(), and view(). |
The documentation for this class was generated from the following files: