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

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 482 of file khtml_part.h. |
|
Extra Find options that can be used when calling the extended findText().
Definition at line 685 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 204 of file khtml_part.cpp. References KHTMLFactory::instance(), KHTMLView, parentPart(), KHTMLFactory::registerPart(), and KParts::PartBase::setInstance(). |
|
Destructor.
Definition at line 448 of file khtml_part.cpp. References closeURL(), KGlobal::config(), KHTMLFactory::deregisterPart(), QObject::disconnect(), 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 750 of file khtml_part.cpp. References KProtocolManager::cacheControl(), KHTMLPageCache::cancelEntry(), KHTMLPageCache::cancelFetch(), QObject::disconnect(), end(), kdDebug(), KParts::ReadOnlyPart::m_url, nodeActivated(), KURL::prettyURL(), and KHTMLPageCache::self(). Referenced by openURL(), restoreState(), setEncoding(), urlSelected(), 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 1659 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 832 of file khtml_part.cpp. Referenced by KJS::Window::get(), KJS::Window::getListener(), KJS::Window::goURL(), KJS::Window::hasProperty(), KJS::Window::openWindow(), KJS::Location::put(), and KJS::Window::setListener(). |
|
Returns a reference to the DOM document.
Definition at line 840 of file khtml_part.cpp. Referenced by KJS::Window::get(), KJS::Window::hasProperty(), KJS::Window::openWindow(), and selection(). |
|
Returns the content of the source document.
Definition at line 845 of file khtml_part.cpp. References QTextCodec::codecForName(), KIO::NetAccess::download(), encoding(), KHTMLPageCache::isComplete(), KURL::isLocalFile(), KParts::ReadOnlyPart::m_url, QFile::open(), QTextStream::read(), KIO::NetAccess::removeTempFile(), KHTMLPageCache::saveData(), KHTMLPageCache::self(), and QTextStream::setCodec(). |
|
Returns the node that has the keyboard focus.
Definition at line 6668 of file khtml_part.cpp. |
|
Returns a pointer to the KParts::BrowserExtension.
Definition at line 877 of file khtml_part.cpp. Referenced by KJS::Window::goHistory(), KHTMLImage::KHTMLImage(), KHTMLPartBrowserExtension::openSelection(), KJS::Window::openWindow(), KHTMLImageBrowserExtension::print(), KHTMLImageBrowserExtension::reparseConfiguration(), KJS::Window::resizeTo(), KHTMLPartBrowserExtension::searchProvider(), and KJS::HTMLElementFunction::tryCall(). |
|
Returns a pointer to the HTML document's view.
Definition at line 887 of file khtml_part.cpp. Referenced by caretDisplayPolicyNonFocused(), findTextNext(), KHTMLView::focusNextPrevChild(), KJS::Window::get(), khtmlMouseMoveEvent(), KJS::Window::openWindow(), KHTMLPartBrowserExtension::print(), setCaretDisplayPolicyNonFocused(), setCaretMode(), setCaretPosition(), setCaretVisible(), setEditable(), urlSelected(), KHTMLView::viewportMouseMoveEvent(), KHTMLView::viewportWheelEvent(), KHTMLImageBrowserExtension::xOffset(), KHTMLPartBrowserExtension::xOffset(), KHTMLImageBrowserExtension::yOffset(), and KHTMLPartBrowserExtension::yOffset(). |
|
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 911 of file khtml_part.cpp. References jScriptEnabled(). |
|
Returns
Definition at line 920 of file khtml_part.cpp. References onlyLocalReferences(). Referenced by KJS::ScheduledAction::execute(), KJS::Window::retrieveWindow(), and 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 897 of file khtml_part.cpp. References KJSProxy::interpreter(), and KJSProxy::paused(). |
|
Enable/disable statusbar messages.
Definition at line 892 of file khtml_part.cpp. |
|
Returns
Definition at line 906 of file khtml_part.cpp. |
|
Enable/disable automatic forwarding by <meta http-equiv="refresh" . ...> Definition at line 929 of file khtml_part.cpp. |
|
Returns
Definition at line 934 of file khtml_part.cpp. |
|
Same as executeScript( const QString & ) except with the Node parameter specifying the 'this' value.
Definition at line 1161 of file khtml_part.cpp. References KJSErrorDlg::addError(), KJSProxy::evaluate(), KJSProxy::interpreter(), DOM::Node::isNull(), kdDebug(), QString::latin1(), QObject::name(), DOM::Node::nodeName(), DOM::Node::nodeType(), KJSProxy::paused(), and DOM::DOMString::string(). Referenced by KJS::ScheduledAction::execute(), and executeScript(). |
|
Enables or disables Drag'n'Drop support. A drag operation is started if the users drags a link. Definition at line 5709 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 1219 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 1238 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 1243 of file khtml_part.cpp. |
|
Enables or disables plugins, default is enabled.
Definition at line 1248 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 1310 of file khtml_part.cpp. References KXMLGUIClient::actionCollection(), QPtrList::append(), KXMLGUIClient::plugActionList(), and KXMLGUIClient::unplugActionList(). Referenced by begin(), and KHTMLImageBrowserExtension::reparseConfiguration(). |
|
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 2545 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 2595 of file khtml_part.cpp. Referenced by KHTMLView::clear(), khtml::containsEditableChildElement(), khtml::containsEditableElement(), KHTMLView::eventFilter(), KHTMLView::focusInEvent(), KHTMLView::focusOutEvent(), KHTMLView::keyPressEvent(), KHTMLView::layout(), setCaretMode(), setCaretVisible(), and setEditable(). |
|
Returns
Definition at line 2616 of file khtml_part.cpp. Referenced by KHTMLView::clear(), khtml::containsEditableChildElement(), khtml::containsEditableElement(), KHTMLView::eventFilter(), KHTMLView::focusInEvent(), KHTMLView::focusOutEvent(), KHTMLView::keyPressEvent(), 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 2621 of file khtml_part.cpp. References KHTMLView::ensureCaretVisible(), DOM::Node::handle(), kdDebug(), DOM::Node::nodeName(), DOM::DOMString::string(), and view(). |
|
Returns the current caret policy when the view is not focused.
Definition at line 2635 of file khtml_part.cpp. References KHTMLView::caretDisplayPolicyNonFocused(), and 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 2644 of file khtml_part.cpp. References KHTMLView::setCaretDisplayPolicyNonFocused(), and view(). |
|
Returns the URL for the background Image (used by save background).
Definition at line 3908 of file khtml_part.cpp. References KParts::ReadOnlyPart::m_url. |
|
Schedules a redirection after
Definition at line 2323 of file khtml_part.cpp. References kdDebug(). Referenced by KJS::Window::goURL(). |
|
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 1819 of file khtml_part.cpp. References QObject::connect(), KHTMLFactory::defaultHTMLSettings(), KParts::URLArgs::docState, KParts::HistoryProvider::insert(), QString::isEmpty(), KURL::isEmpty(), KURL::isValid(), KParts::ReadOnlyPart::m_url, KMimeType::mimeType(), parentPart(), KURL::prettyURL(), KURL::protocol(), KParts::URLArgs::serviceType, setAutoloadImages(), KURL::setQuery(), KURL::setRef(), setSuppressedPopupIndicator(), setUserStyleSheet(), KParts::Part::setWindowCaption(), QString::startsWith(), KURL::url(), KHTMLSettings::userStyleSheet(), KHTMLFactory::vLinks(), KParts::URLArgs::xOffset, and KParts::URLArgs::yOffset. Referenced by doOpenStream(), KJS::Window::get(), htmlError(), KJS::Window::openWindow(), and KMultiPart::startOfData(). |
|
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 1909 of file khtml_part.cpp. References QString::isEmpty(). Referenced by doWriteStream(), end(), KJS::Window::get(), htmlError(), and KJS::Window::openWindow(). |
|
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 1941 of file khtml_part.cpp. References QString::isNull(). |
|
Call this after your last call to write().
Definition at line 1956 of file khtml_part.cpp. References write(). Referenced by closeURL(), doCloseStream(), KMultiPart::endOfData(), findFrameParent(), KJS::Window::get(), htmlError(), and KJS::Window::openWindow(). |
|
Paints the HTML page to a QPainter. See KHTMLView::paint for details Definition at line 1989 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 2400 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 2418 of file khtml_part.cpp. Referenced by documentSource(). |
|
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 2442 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 2448 of file khtml_part.cpp. |
|
Sets the standard font style.
Definition at line 2520 of file khtml_part.cpp. |
|
Sets the fixed font style.
Definition at line 2525 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 2454 of file khtml_part.cpp. References QString::isEmpty(), kdDebug(), and QString::lower(). Referenced by KJS::Window::goURL(), and openURL(). |
|
Go to the next anchor. This is useful to navigate from outside the navigator
Definition at line 2502 of file khtml_part.cpp. |
|
Go to previous anchor.
Definition at line 2511 of file khtml_part.cpp. |
|
Sets the cursor to use when the cursor is on a link.
Definition at line 2530 of file khtml_part.cpp. |
|
Returns the cursor which is used when the cursor is on a link.
Definition at line 2535 of file khtml_part.cpp. Referenced by KHTMLView::viewportMouseMoveEvent(). |
|
Starts a new search by popping up a dialog asking the user what he wants to search for.
Definition at line 2867 of file khtml_part.cpp. References KWin::activateWindow(), QObject::connect(), QObject::disconnect(), hasSelection(), selectionChanged(), and KParts::Part::widget(). Referenced by findTextNext(). |
|
Starts a new search, but bypasses the user dialog.
Definition at line 2905 of file khtml_part.cpp. References QObject::connect(), and selectionChanged(). |
|
Initiates a text search.
Definition at line 2670 of file khtml_part.cpp. Referenced by KHTMLView::keyPressEvent(). |
|
Finds the next occurrence of the string or expression. If isRegExp is true then str is converted to a QRegExp, and caseSensitive is ignored.
Definition at line 2747 of file khtml_part.cpp. References DOM::DOMString::implementation(), QString::length(), QRegExp::matchedLength(), QRegExp::search(), QRegExp::setCaseSensitive(), and QConstString::string(). |
|
Finds the next occurence of a string set by findText().
Definition at line 2934 of file khtml_part.cpp. References QString::data(), DOM::NodeImpl, QString::find(), findText(), hasSelection(), QString::isEmpty(), kdDebug(), QString::length(), QObject::parent(), QString::replace(), QString::truncate(), KHTMLView::updateFindAheadTimeout(), and view(). |
|
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 5506 of file khtml_part.cpp. References QApplication::restoreOverrideCursor(), QApplication::setOverrideCursor(), and setZoomFactor(). Referenced by restoreState(), and setZoomFactor(). |
|
Returns the current zoom factor.
Definition at line 5442 of file khtml_part.cpp. Referenced by khtml::CSSStyleSelector::applyRule(), KHTMLView::print(), and restoreState(). |
|
Returns the text the user has marked.
Definition at line 3276 of file khtml_part.cpp. References DOM::Node::elementId(), DOM::Node::firstChild(), DOM::Node::handle(), QString::isEmpty(), DOM::Node::isNull(), QString::left(), QString::length(), QString::mid(), DOM::Node::nextSibling(), DOM::Node::nodeType(), and DOM::Node::parentNode(). Referenced by KHTMLPartBrowserExtension::copy(), khtmlMouseReleaseEvent(), KHTMLPopupGUIClient::KHTMLPopupGUIClient(), KHTMLPartBrowserExtension::openSelection(), and KHTMLPartBrowserExtension::searchProvider(). |
|
Return the text the user has marked. This is guaranteed to be valid xml, and to contain the <html> and <body> tags. FIXME probably should make virtual for 4.0 ?
Definition at line 3259 of file khtml_part.cpp. References DOM::Range::handle(), hasSelection(), DOM::Range::isDetached(), DOM::Range::isNull(), kdDebug(), and selection(). Referenced by KHTMLPartBrowserExtension::copy(). |
|
Returns the selected part of the HTML.
Definition at line 3427 of file khtml_part.cpp. References DOM::Document::createRange(), document(), DOM::Range::handle(), and kdDebug(). Referenced by selectedTextAsHTML(). |
|
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 3481 of file khtml_part.cpp. |
|
Sets the current selection.
Definition at line 3489 of file khtml_part.cpp. References DOM::Range::collapsed(), DOM::Range::endContainer(), DOM::Range::endOffset(), DOM::Range::startContainer(), and DOM::Range::startOffset(). |
|
Has the user selected anything? Call selectedText() to retrieve the selected text.
Definition at line 3417 of file khtml_part.cpp. Referenced by findText(), findTextNext(), KHTMLPopupGUIClient::KHTMLPopupGUIClient(), and selectedTextAsHTML(). |
|
Marks all text in the document as selected.
Definition at line 6479 of file khtml_part.cpp. |
|
Convenience method to show the document's view. Equivalent to widget()->show() or view()->show() . Definition at line 5410 of file khtml_part.cpp. |
|
Convenience method to hide the document's view. Equivalent to widget()->hide() or view()->hide(). Definition at line 5416 of file khtml_part.cpp. |
|
Returns a reference to the partmanager instance which manages html frame objects.
Definition at line 4484 of file khtml_part.cpp. References QObject::connect(), and KParts::PartManager::setAllowNestedParts(). 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 5138 of file khtml_part.cpp. References kdDebug(), KParts::ReadOnlyPart::m_url, QObject::name(), and KURL::url(). Referenced by KHTMLPartBrowserExtension::saveState(). |
|
Restores the KHTMLPart's previously saved state (including child frame objects) from the provided QDataStream.
Definition at line 5224 of file khtml_part.cpp. References QValueList::begin(), closeURL(), QValueList< KURL >::ConstIterator(), KParts::URLArgs::docState, frameNames(), KParts::ReadOnlyPart::m_url, openURL(), KHTMLPageCache::self(), setPageSecurity(), setZoomFactor(), KParts::URLArgs::xOffset, KParts::URLArgs::yOffset, and zoomFactor(). Referenced by KHTMLPartBrowserExtension::restoreState(). |
|
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 5422 of file khtml_part.cpp. Referenced by KHTMLPopupGUIClient::KHTMLPopupGUIClient(). |
|
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 5427 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 5101 of file khtml_part.cpp. References QObject::parent(). Referenced by begin(), KHTMLView::dragEnterEvent(), KHTMLView::dropEvent(), findFrameParent(), KHTMLView::focusNextPrevChild(), KJS::Window::get(), khtmlMouseMoveEvent(), khtmlMousePressEvent(), khtmlMouseReleaseEvent(), KHTMLPart(), KHTMLPopupGUIClient::KHTMLPopupGUIClient(), openURL(), KJS::Window::openWindow(), setPageSecurity(), setPluginPageQuestionAsked(), setSuppressedPopupIndicator(), toplevelURL(), KJS::HTMLElementFunction::tryCall(), urlSelected(), KHTMLView::viewportMouseMoveEvent(), KHTMLView::viewportWheelEvent(), 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 5666 of file khtml_part.cpp. Referenced by KHTMLPartBrowserHostExtension::frameNames(), and restoreState(). |
|
Finds a frame by name. Returns 0L if frame can't be found. Definition at line 5037 of file khtml_part.cpp. References findFrameParent(), and QObject::inherits(). Referenced by KJS::HTMLDocument::hasProperty(), and KJS::HTMLDocument::tryGet(). |
|
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 4996 of file khtml_part.cpp. References end(), findFrameParent(), QObject::inherits(), kdDebug(), KParts::ReadOnlyPart::m_url, QObject::name(), and parentPart(). Referenced by findFrame(), findFrameParent(), findFramePart(), and KHTMLPartBrowserHostExtension::virtual_hook(). |
|
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 5056 of file khtml_part.cpp. References KParts::PartManager::activePart(), QObject::inherits(), and 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 5071 of file khtml_part.cpp. Referenced by KJS::HTMLElementFunction::tryCall(). |
|
Returns child frame framePart its script interpreter.
Definition at line 5083 of file khtml_part.cpp. References jScript(). Referenced by KJS::Window::retrieve(). |
|
Finds a frame by name. Returns 0L if frame can't be found. Definition at line 5050 of file khtml_part.cpp. References findFrameParent(). Referenced by KJS::Window::get(), and KJS::Window::hasProperty(). |
|
Called by KJS. Sets the StatusBarText assigned via window.status Definition at line 5567 of file khtml_part.cpp. Referenced by KJS::Window::put(). |
|
Called by KJS. Sets the DefaultStatusBarText assigned via window.defaultStatus Definition at line 5572 of file khtml_part.cpp. Referenced by KJS::Window::put(). |
|
Called by KJS. Returns the StatusBarText assigned via window.status Definition at line 5577 of file khtml_part.cpp. Referenced by KJS::Window::get(). |
|
Called by KJS. Returns the DefaultStatusBarText assigned via window.defaultStatus Definition at line 5582 of file khtml_part.cpp. Referenced by KJS::Window::get(). |
|
Referrer used for links in this page.
Definition at line 5587 of file khtml_part.cpp. |
|
Referrer used to obtain this page.
Definition at line 5592 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 5613 of file khtml_part.cpp. References KURL::isLocalFile(), KParts::ReadOnlyPart::m_url, KURL::path(), and QDateTime::toString(). |
|
Loads a style sheet into the stylesheet cache.
Definition at line 6703 of file khtml_part.cpp. |
|
Loads a script into the script cache.
Definition at line 6708 of file khtml_part.cpp. |
|
Determine if signal should be emitted before, instead or never when a submitForm() happens.
Definition at line 7044 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 7048 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 7052 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 7064 of file khtml_part.cpp. |
|
Shows or hides the suppressed popup indicator.
Definition at line 7087 of file khtml_part.cpp. References QToolTip::add(), KXMLGUIClient::instance(), parentPart(), QToolTip::remove(), setSuppressedPopupIndicator(), and KIcon::Small. Referenced by begin(), KJS::Window::openWindow(), and setSuppressedPopupIndicator(). |
|
Emitted if the cursor is moved over an URL.
|
|
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(), and KHTMLView::viewportMousePressEvent(). |
|
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 2311 of file khtml_part.cpp. Referenced by khtmlMouseMoveEvent(), and urlSelected(). |
|
presents a detailed error message to the user.
Definition at line 1676 of file khtml_part.cpp. References QString::arg(), begin(), KIO::buildErrorString(), KParts::ReadOnlyPart::completed(), QStyleSheet::convertFromPlainText(), QDateTime::currentDateTime(), end(), KLocale::formatDateTime(), QString::fromLatin1(), KURL::htmlURL(), QString::isNull(), QStringList::join(), kdDebug(), KGlobal::locale(), KParts::ReadOnlyPart::m_url, KURL::prettyURL(), KURL::protocol(), KIO::rawErrorDetail(), QApplication::reverseLayout(), KParts::ReadOnlyPart::started(), and write(). Referenced by openURL(), and showError(). |
|
Eventhandler of the khtml::MousePressEvent.
Definition at line 5824 of file khtml_part.cpp. References khtml::MouseEvent::absX(), khtml::MouseEvent::absY(), QMouseEvent::button(), DOM::NodeImpl, QMouseEvent::globalPos(), DOM::Node::handle(), khtml::MouseEvent::innerNode(), isEditable(), DOM::Node::isNull(), DOM::DOMString::isNull(), parentPart(), popupMenu(), QMouseEvent::pos(), khtml::MouseEvent::qmouseEvent(), QMouseEvent::state(), DOM::DOMString::string(), khtml::MouseEvent::target(), khtml::MouseEvent::url(), khtml::MouseEvent::x(), and khtml::MouseEvent::y(). Referenced by customEvent(). |
|
Eventhandler for the khtml::MouseDoubleClickEvent.
Definition at line 5904 of file khtml_part.cpp. References khtml::MouseEvent::absX(), khtml::MouseEvent::absY(), QMouseEvent::button(), khtml::MouseDoubleClickEvent::clickCount(), DOM::NodeImpl, DOM::Node::handle(), khtml::MouseEvent::innerNode(), DOM::Node::isNull(), khtml::MouseEvent::qmouseEvent(), QMouseEvent::state(), khtml::MouseEvent::x(), and khtml::MouseEvent::y(). Referenced by customEvent(). |
|
|
Eventhandler for the khtml::MouseMouseReleaseEvent.
Definition at line 6293 of file khtml_part.cpp. References QMouseEvent::button(), KParts::BrowserInterface::callMethod(), QObject::connect(), d, QObject::disconnect(), DOM::Node::firstChild(), khtml::MouseEvent::innerNode(), DOM::Node::isNull(), DOM::DOMString::isNull(), kdDebug(), DOM::Node::nextSibling(), DOM::Node::parentNode(), parentPart(), khtml::MouseEvent::qmouseEvent(), QString::replace(), selectedText(), selectionChanged(), and khtml::MouseEvent::url(). Referenced by customEvent(). |
|
Eventhandler for the khtml::DrawContentsEvent.
Definition at line 6407 of file khtml_part.cpp. Referenced by customEvent(). |
|
Internal reimplementation of KParts::Part::guiActivateEvent .
Reimplemented from KParts::ReadOnlyPart. Definition at line 6411 of file khtml_part.cpp. References KParts::GUIActivateEvent::activated(), QPtrList::append(), and KXMLGUIClient::plugActionList(). |
|
Internal empty reimplementation of KParts::ReadOnlyPart::openFile .
Implements KParts::ReadOnlyPart. Definition at line 1465 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 4430 of file khtml_part.cpp. References QString::append(), QValueList::begin(), QObject::className(), QValueList::ConstIterator(), KLibFactory::create(), QFile::encodeName(), QValueList::end(), KLibLoader::factory(), KXMLGUIClient::factory(), QString::find(), QObject::inherits(), QValueList::isEmpty(), QString::isEmpty(), kdWarning(), QString::left(), KTrader::query(), KLibLoader::self(), and KTrader::self(). |
|
Implements the streaming API of KParts::ReadOnlyPart.
Definition at line 1965 of file khtml_part.cpp. References begin(), KMimeType::mimeType(), and KParts::ReadOnlyPart::url(). |
|
Implements the streaming API of KParts::ReadOnlyPart.
Definition at line 1976 of file khtml_part.cpp. References write(). |
|
Implements the streaming API of KParts::ReadOnlyPart.
Definition at line 1982 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 6654 of file khtml_part.cpp. References QRect::bottom(), DOM::Node::handle(), QRect::left(), QRect::right(), and QRect::top(). Referenced by DOMTreeView::slotItemClicked(). |
|
Stops all animated images on the current and child pages.
Definition at line 1995 of file khtml_part.cpp. References stopAnimations(). Referenced by stopAnimations(). |
|
Execute the specified snippet of JavaScript code.
Returns
Definition at line 1156 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 2578 of file khtml_part.cpp. References KHTMLView::caretOff(), KHTMLView::ensureCaretVisible(), KHTMLView::initCaret(), isCaretMode(), isEditable(), kdDebug(), and view(). |
|
Makes the document editable.
Setting this property to
Definition at line 2600 of file khtml_part.cpp. References KHTMLView::caretOff(), KHTMLView::ensureCaretVisible(), KHTMLView::initCaret(), 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 2651 of file khtml_part.cpp. References KHTMLView::caretOff(), KHTMLView::caretOn(), isCaretMode(), isEditable(), and view(). |
The documentation for this class was generated from the following files: