• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdehtml
 

tdehtml

Public Types | Public Slots | Signals | Public Member Functions | Protected Types | Protected Member Functions | Friends | List of all members
TDEHTMLPart Class Reference

#include <tdehtml_part.h>

Inheritance diagram for TDEHTMLPart:
KParts::ReadOnlyPart KParts::Part KParts::PartBase KXMLGUIClient

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 ()
 
TQCString dcopObjectId () const
 
TQVariant executeScript (const TQString &script)
 
void setCaretMode (bool enable)
 
void setEditable (bool enable)
 
void setCaretVisible (bool show)
 
void submitFormProxy (const char *action, const TQString &url, const TQByteArray &formData, const TQString &target, const TQString &contentType=TQString::null, const TQString &boundary=TQString::null)
 
- Public Slots inherited from KParts::ReadOnlyPart
virtual bool openURL (const KURL &url)
 

Signals

void onURL (const TQString &url)
 
void popupMenu (const TQString &url, const TQPoint &point)
 
void selectionChanged ()
 
void nodeActivated (const DOM::Node &)
 
void docCreated ()
 
void caretPositionChanged (const DOM::Node &node, long offset)
 
void formSubmitNotification (const char *action, const TQString &url, const TQByteArray &formData, const TQString &target, const TQString &contentType, const TQString &boundary)
 
- Signals inherited from KParts::ReadOnlyPart
void started (TDEIO::Job *)
 
void completed ()
 
void completed (bool pendingAction)
 
void canceled (const TQString &errMsg)
 
- Signals inherited from KParts::Part
void setWindowCaption (const TQString &caption)
 
void setStatusBarText (const TQString &text)
 

Public Member Functions

 TDEHTMLPart (TQWidget *parentWidget=0, const char *widgetname=0, TQObject *parent=0, const char *name=0, GUIProfile prof=DefaultGUI)
 
 TDEHTMLPart (TDEHTMLView *view, TQObject *parent=0, const char *name=0, GUIProfile prof=DefaultGUI)
 
virtual ~TDEHTMLPart ()
 
virtual bool openURL (const KURL &url)
 
virtual bool closeURL ()
 
virtual void showError (TDEIO::Job *job)
 
DOM::HTMLDocument htmlDocument () const
 
DOM::Document document () const
 
TQString documentSource () const
 
DOM::Node activeNode () const
 
KParts::BrowserExtension * browserExtension () const
 
KParts::LiveConnectExtension * liveConnectExtension (const tdehtml::RenderPart *) const
 
KParts::BrowserHostExtension * browserHostExtension () const
 
TDEHTMLView * 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
 
TQVariant executeScript (const DOM::Node &n, const TQString &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 TQString &, bool)
 
KURL baseURL () const
 
TQString baseTarget () const
 
KURL backgroundURL () const
 
void scheduleRedirection (int delay, const TQString &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 TQString &str)
 
virtual void end ()
 
void paint (TQPainter *, const TQRect &, int=0, bool *=0)
 
bool setEncoding (const TQString &name, bool override=false)
 
TQString encoding () const
 
void setUserStyleSheet (const KURL &url)
 
void setUserStyleSheet (const TQString &styleSheet)
 
void setStandardFont (const TQString &name)
 
void setFixedFont (const TQString &name)
 
bool gotoAnchor (const TQString &name)
 
bool nextAnchor ()
 
bool prevAnchor ()
 
void setURLCursor (const TQCursor &c)
 
TQCursor urlCursor () const
 
void findText ()
 
void findText (const TQString &str, long options, TQWidget *parent=0, KFindDialog *findDialog=0)
 
void findTextBegin ()
 
bool findTextNext (const TQString &str, bool forward, bool caseSensitive, bool isRegExp)
 
bool findTextNext ()
 
bool findTextNext (bool reverse)
 
void setZoomFactor (int percent)
 
int zoomFactor () const
 
virtual TQString selectedText () const
 
TQString selectedTextAsHTML () 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 (TQDataStream &stream)
 
virtual void restoreState (TQDataStream &stream)
 
DOM::Node nodeUnderMouse () const
 
DOM::Node nonSharedNodeUnderMouse () const
 
const TDEHTMLSettings * settings () const
 
TDEHTMLPart * parentPart ()
 
TQStringList frameNames () const
 
TQPtrList< KParts::ReadOnlyPart > frames () const
 
TDEHTMLPart * findFrame (const TQString &f)
 
TDEHTMLPart * findFrameParent (KParts::ReadOnlyPart *callingPart, const TQString &f, tdehtml::ChildFrame **childFrame=0)
 
KParts::ReadOnlyPart * currentFrame () const
 
bool frameExists (const TQString &frameName)
 
KJSProxy * framejScript (KParts::ReadOnlyPart *framePart)
 
KParts::ReadOnlyPart * findFramePart (const TQString &f)
 
void setJSStatusBarText (const TQString &text)
 
void setJSDefaultStatusBarText (const TQString &text)
 
TQString jsStatusBarText () const
 
TQString jsDefaultStatusBarText () const
 
TQString referrer () const
 
TQString pageReferrer () const
 
TQString lastModified () const
 
void preloadStyleSheet (const TQString &url, const TQString &stylesheet)
 
void preloadScript (const TQString &url, const TQString &script)
 
bool restored () const
 
void setFormNotification (FormNotification fn)
 
FormNotification formNotification () const
 
KURL toplevelURL ()
 
bool isModified () const
 
void setSuppressedPopupIndicator (bool enable)
 
void setSuppressedPopupIndicator (bool enable, TDEHTMLPart *originPart)
 
bool inProgress () const
 
- Public Member Functions inherited from KParts::ReadOnlyPart
 ReadOnlyPart (TQObject *parent=0, const char *name=0)
 
void setProgressInfoEnabled (bool show)
 
bool isProgressInfoEnabled () const
 
KURL url () const
 
virtual bool closeURL ()
 
bool openStream (const TQString &mimeType, const KURL &url)
 
bool writeStream (const TQByteArray &data)
 
bool closeStream ()
 
- Public Member Functions inherited from KParts::Part
 Part (TQObject *parent=0, const char *name=0)
 
virtual void embed (TQWidget *parentWidget)
 
virtual TQWidget * widget ()
 
PartManager * manager () const
 
virtual Part * hitTest (TQWidget *widget, const TQPoint &globalPos)
 
virtual void setSelectable (bool selectable)
 
bool isSelectable () const
 
- Public Member Functions inherited from KParts::PartBase
void setPartObject (TQObject *object)
 
- Public Member Functions inherited from KXMLGUIClient
 KXMLGUIClient (KXMLGUIClient *parent)
 
TDEAction * action (const char *name) const
 
virtual TDEAction * action (const TQDomElement &element) const
 
virtual TDEActionCollection * actionCollection () const
 
virtual TDEInstance * instance () const
 
virtual TQDomDocument domDocument () const
 
virtual TQString xmlFile () const
 
void setXMLGUIBuildDocument (const TQDomDocument &doc)
 
TQDomDocument xmlguiBuildDocument () const
 
void setFactory (KXMLGUIFactory *factory)
 
KXMLGUIFactory * factory () const
 
KXMLGUIClient * parentClient () const
 
void insertChildClient (KXMLGUIClient *child)
 
void removeChildClient (KXMLGUIClient *child)
 
const TQPtrList< KXMLGUIClient > * childClients ()
 
void setClientBuilder (KXMLGUIBuilder *builder)
 
KXMLGUIBuilder * clientBuilder () const
 
void reloadXML ()
 
void plugActionList (const TQString &name, const TQPtrList< TDEAction > &actionList)
 
void unplugActionList (const TQString &name)
 
void beginXMLPlug (TQWidget *)
 
void endXMLPlug ()
 
void prepareXMLUnplug (TQWidget *)
 

Protected Types

enum  PageSecurity { NotCrypted , Encrypted , Mixed }
 
- Protected Types inherited from KParts::PartBase
enum  PluginLoadingMode
 

Protected Member Functions

KURL completeURL (const TQString &url)
 
void htmlError (int errorCode, const TQString &text, const KURL &reqUrl)
 
virtual void customEvent (TQCustomEvent *event)
 
virtual void tdehtmlMousePressEvent (tdehtml::MousePressEvent *event)
 
virtual void tdehtmlMouseDoubleClickEvent (tdehtml::MouseDoubleClickEvent *)
 
virtual void tdehtmlMouseMoveEvent (tdehtml::MouseMoveEvent *event)
 
virtual void tdehtmlMouseReleaseEvent (tdehtml::MouseReleaseEvent *event)
 
virtual void tdehtmlDrawContentsEvent (tdehtml::DrawContentsEvent *)
 
virtual void guiActivateEvent (KParts::GUIActivateEvent *event)
 
virtual bool openFile ()
 
virtual void urlSelected (const TQString &url, int button, int state, const TQString &_target, KParts::URLArgs args=KParts::URLArgs())
 
virtual KParts::ReadOnlyPart * createPart (TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name, const TQString &mimetype, TQString &serviceName, TQStringList &serviceTypes, const TQStringList &params)
 
bool pluginPageQuestionAsked (const TQString &mimetype) const
 
void setPluginPageQuestionAsked (const TQString &mimetype)
 
void setPageSecurity (PageSecurity sec)
 
virtual bool doOpenStream (const TQString &mimeType)
 
virtual bool doWriteStream (const TQByteArray &data)
 
virtual bool doCloseStream ()
 
virtual bool openFile ()=0
 
virtual void guiActivateEvent (GUIActivateEvent *event)
 
- Protected Member Functions inherited from KParts::Part
virtual void setWidget (TQWidget *widget)
 
virtual void partActivateEvent (PartActivateEvent *event)
 
virtual void partSelectEvent (PartSelectEvent *event)
 
virtual void guiActivateEvent (GUIActivateEvent *event)
 
TQWidget * hostContainer (const TQString &containerName)
 
- Protected Member Functions inherited from KParts::PartBase
virtual void setInstance (TDEInstance *instance)
 
virtual void setInstance (TDEInstance *instance, bool loadPlugins)
 
void loadPlugins (TQObject *parent, KXMLGUIClient *parentGUIClient, TDEInstance *instance)
 
void setPluginLoadingMode (PluginLoadingMode loadingMode)
 
- Protected Member Functions inherited from KXMLGUIClient
virtual void setInstance (TDEInstance *instance)
 
virtual void setXMLFile (const TQString &file, bool merge=false, bool setXMLDoc=true)
 
virtual void setXML (const TQString &document, bool merge=false)
 
virtual void setDOMDocument (const TQDomDocument &document, bool merge=false)
 
virtual void conserveMemory ()
 
virtual void stateChanged (const TQString &newstate, ReverseStateChange reverse=StateNoReverse)
 

Friends

class TDEHTMLView
 
class DOM::HTMLTitleElementImpl
 
class DOM::HTMLFrameElementImpl
 
class DOM::HTMLIFrameElementImpl
 
class DOM::HTMLObjectElementImpl
 
class DOM::HTMLAnchorElementImpl
 
class DOM::HTMLMetaElementImpl
 
class DOM::NodeImpl
 
class TDEHTMLRun
 
class DOM::HTMLFormElementImpl
 
class tdehtml::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 TDEHTMLPartBrowserExtension
 
class DOM::DocumentImpl
 
class DOM::HTMLDocumentImpl
 
class TDEHTMLPartBrowserHostExtension
 
class tdehtml::HTMLTokenizer
 
class tdehtml::XMLTokenizer
 
class tdehtml::RenderWidget
 
class tdehtml::CSSStyleSelector
 
class TDEHTMLPartIface
 
class TDEHTMLPartFunction
 
class TDEHTMLPopupGUIClient
 
class TDEHTMLPartPrivate
 

Additional Inherited Members

- Protected Attributes inherited from KParts::ReadOnlyPart
KURL m_url
 
TQString m_file
 
bool m_bTemp
 
- Protected Attributes inherited from KParts::PartBase
 DoNotLoadPlugins
 
 LoadPlugins
 
 LoadPluginsIfEnabled
 

Detailed Description

This class is tdehtml's main class.

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";
TDEHTMLPart *w = new TDEHTMLPart();
w->openURL(url);
w->view()->resize(500, 400);
w->show();
KParts::ReadOnlyPart::url
KURL url() const
KURL
TDEHTMLPart
This class is tdehtml's main class.
Definition: tdehtml_part.h:184
TDEHTMLPart::view
TDEHTMLView * view() const
Returns a pointer to the HTML document's view.
Definition: tdehtml_part.cpp:906
TDEHTMLPart::openURL
virtual bool openURL(const KURL &url)
Opens the specified URL url.
Definition: tdehtml_part.cpp:565
TDEHTMLPart::show
void show()
Convenience method to show the document's view.
Definition: tdehtml_part.cpp:5632
TDEHTMLPart::TDEHTMLPart
TDEHTMLPart(TQWidget *parentWidget=0, const char *widgetname=0, TQObject *parent=0, const char *name=0, GUIProfile prof=DefaultGUI)
Constructs a new TDEHTMLPart.
Definition: tdehtml_part.cpp:205

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);
TDEHTMLPart::setMetaRefreshEnabled
void setMetaRefreshEnabled(bool enable)
Enable/disable automatic forwarding by <meta http-equiv="refresh" ....
Definition: tdehtml_part.cpp:948
TDEHTMLPart::setJavaEnabled
void setJavaEnabled(bool enable)
Enables/disables Java applet support.
Definition: tdehtml_part.cpp:1244
TDEHTMLPart::setJScriptEnabled
void setJScriptEnabled(bool enable)
Enable/disable Javascript support.
Definition: tdehtml_part.cpp:930
TDEHTMLPart::setPluginsEnabled
void setPluginsEnabled(bool enable)
Enables or disables plugins, default is enabled.
Definition: tdehtml_part.cpp:1273

You may also wish to disable external references. This will prevent TDEHTML from loading images, frames, etc, or redirecting to external sites.

w->setOnlyLocalReferences(true);
TDEHTMLPart::setOnlyLocalReferences
void setOnlyLocalReferences(bool enable)
Security option.
Definition: tdehtml_part.cpp:2612

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:

TQString myHTMLCode = ...;
TDEHTMLPart *w = new TDEHTMLPart();
w->begin();
w->write(myHTMLCode);
...
w->end();
TDEHTMLPart::begin
virtual void begin(const KURL &url=KURL(), int xOffset=0, int yOffset=0)
Clears the widget and prepares it for new content.
Definition: tdehtml_part.cpp:1875
TDEHTMLPart::write
virtual void write(const char *str, int len=-1)
Writes another part of the HTML code to the widget.
Definition: tdehtml_part.cpp:1963

You can do as many calls to write() as you wish. There are two write() methods, one accepting a TQString 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:

TDEHTMLPart *doc = new TDEHTMLPart();
doc->openStream( "text/html", KURL() );
doc->writeStream( TQCString( "<html><body><p>TDEHTML Rocks!</p></body></html>" ) );
doc->closeStream();
KParts::ReadOnlyPart::writeStream
bool writeStream(const TQByteArray &data)
KParts::ReadOnlyPart::closeStream
bool closeStream()
KParts::ReadOnlyPart::openStream
bool openStream(const TQString &mimeType, const KURL &url)

HTML Browser Widget

Author
Lars Knoll (knoll.nosp@m.@kde.nosp@m..org)

Definition at line 183 of file tdehtml_part.h.

Member Enumeration Documentation

◆ CaretDisplayPolicy

enum TDEHTMLPart::CaretDisplayPolicy

Enumeration for displaying the caret.

Parameters
Visiblecaret is displayed
Invisiblecaret is not displayed
Blinkcaret toggles between visible and invisible
Since
3.2

Definition at line 495 of file tdehtml_part.h.

◆ FindOptions

enum TDEHTMLPart::FindOptions

Extra Find options that can be used when calling the extended findText().

Since
3.3

Definition at line 702 of file tdehtml_part.h.

◆ FormNotification

enum TDEHTMLPart::FormNotification

Definition at line 1003 of file tdehtml_part.h.

◆ GUIProfile

enum TDEHTMLPart::GUIProfile

Definition at line 234 of file tdehtml_part.h.

◆ PageSecurity

enum TDEHTMLPart::PageSecurity
protected

Definition at line 1180 of file tdehtml_part.h.

Constructor & Destructor Documentation

◆ TDEHTMLPart() [1/2]

TDEHTMLPart::TDEHTMLPart ( TQWidget *  parentWidget = 0,
const char *  widgetname = 0,
TQObject *  parent = 0,
const char *  name = 0,
GUIProfile  prof = DefaultGUI 
)

Constructs a new TDEHTMLPart.

TDEHTML basically consists of two objects: The TDEHTMLPart itself, holding the document data (DOM document), and the TDEHTMLView, derived from TQScrollView, in which the document content is rendered in. You can specify two different parent objects for a TDEHTMLPart, one parent for the TDEHTMLPart document and on parent for the TDEHTMLView. If the second parent argument is 0L, then parentWidget is used as parent for both objects, the part and the view.

Definition at line 205 of file tdehtml_part.cpp.

◆ TDEHTMLPart() [2/2]

TDEHTMLPart::TDEHTMLPart ( TDEHTMLView *  view,
TQObject *  parent = 0,
const char *  name = 0,
GUIProfile  prof = DefaultGUI 
)

Definition at line 216 of file tdehtml_part.cpp.

◆ ~TDEHTMLPart()

TDEHTMLPart::~TDEHTMLPart ( )
virtual

Destructor.

Definition at line 467 of file tdehtml_part.cpp.

Member Function Documentation

◆ activeNode()

DOM::Node TDEHTMLPart::activeNode ( ) const

Returns the node that has the keyboard focus.

Definition at line 6938 of file tdehtml_part.cpp.

◆ autoloadImages() [1/2]

bool TDEHTMLPart::autoloadImages ( ) const

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

Note
that the returned information is unrelieable as long as no begin() was called.

Definition at line 1359 of file tdehtml_part.cpp.

◆ autoloadImages() [2/2]

void TDEHTMLPart::autoloadImages ( bool  e)
inline

Definition at line 521 of file tdehtml_part.h.

◆ backgroundURL()

KURL TDEHTMLPart::backgroundURL ( ) const

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

Definition at line 4117 of file tdehtml_part.cpp.

◆ baseTarget()

TQString TDEHTMLPart::baseTarget ( ) const

Definition at line 2363 of file tdehtml_part.cpp.

◆ baseURL()

KURL TDEHTMLPart::baseURL ( ) const

Definition at line 2356 of file tdehtml_part.cpp.

◆ begin()

void TDEHTMLPart::begin ( const KURL &  url = KURL(),
int  xOffset = 0,
int  yOffset = 0 
)
virtual

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:

view->begin( KURL("file:/tmp/test.html" ) );
Parameters
urlis 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.
xOffsetis the initial horizontal scrollbar value. Usually you don't want to use this.
yOffsetis the initial vertical scrollbar value. Usually you don't want to use this.

All child frames and the old document are removed if you call this method.

Definition at line 1875 of file tdehtml_part.cpp.

◆ browserExtension()

KParts::BrowserExtension * TDEHTMLPart::browserExtension ( ) const

Returns a pointer to the KParts::BrowserExtension.

Definition at line 896 of file tdehtml_part.cpp.

◆ browserHostExtension()

KParts::BrowserHostExtension * TDEHTMLPart::browserHostExtension ( ) const

Definition at line 901 of file tdehtml_part.cpp.

◆ caretDisplayPolicyNonFocused()

TDEHTMLPart::CaretDisplayPolicy TDEHTMLPart::caretDisplayPolicyNonFocused ( ) const

Returns the current caret policy when the view is not focused.

Since
3.2

Definition at line 2702 of file tdehtml_part.cpp.

◆ caretPositionChanged

void TDEHTMLPart::caretPositionChanged ( const DOM::Node &  node,
long  offset 
)
signal

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.

Parameters
nodenode which the caret is in. This can be null if the caret has been deactivated.
offsetoffset within the node. If the node is null, the offset is meaningless.
Since
3.2

◆ closeURL()

bool TDEHTMLPart::closeURL ( )
virtual

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

Reimplemented from KParts::ReadOnlyPart.

Definition at line 769 of file tdehtml_part.cpp.

◆ completeURL()

KURL TDEHTMLPart::completeURL ( const TQString &  url)
protected

returns a KURL object for the given url.

Use when you know what you're doing.

Definition at line 2371 of file tdehtml_part.cpp.

◆ createJavaContext()

KJavaAppletContext * TDEHTMLPart::createJavaContext ( )

Returns the java context of the applets.

If no context exists yet, a new one is created.

Definition at line 1268 of file tdehtml_part.cpp.

◆ createPart()

KParts::ReadOnlyPart * TDEHTMLPart::createPart ( TQWidget *  parentWidget,
const char *  widgetName,
TQObject *  parent,
const char *  name,
const TQString &  mimetype,
TQString &  serviceName,
TQStringList &  serviceTypes,
const TQStringList &  params 
)
protectedvirtual

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 4649 of file tdehtml_part.cpp.

◆ currentFrame()

KParts::ReadOnlyPart * TDEHTMLPart::currentFrame ( ) const

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 5276 of file tdehtml_part.cpp.

◆ customEvent()

void TDEHTMLPart::customEvent ( TQCustomEvent *  event)
protectedvirtual

Definition at line 5944 of file tdehtml_part.cpp.

◆ dcopObjectId

TQCString TDEHTMLPart::dcopObjectId ( ) const
slot

Definition at line 6983 of file tdehtml_part.cpp.

◆ dndEnabled()

bool TDEHTMLPart::dndEnabled ( ) const

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

Definition at line 5939 of file tdehtml_part.cpp.

◆ doCloseStream()

bool TDEHTMLPart::doCloseStream ( )
protectedvirtual

Implements the streaming API of KParts::ReadOnlyPart.

Definition at line 2042 of file tdehtml_part.cpp.

◆ document()

DOM::Document TDEHTMLPart::document ( ) const

Returns a reference to the DOM document.

Definition at line 859 of file tdehtml_part.cpp.

◆ documentSource()

TQString TDEHTMLPart::documentSource ( ) const

Returns the content of the source document.

Since
3.4

Definition at line 864 of file tdehtml_part.cpp.

◆ doOpenStream()

bool TDEHTMLPart::doOpenStream ( const TQString &  mimeType)
protectedvirtual

Implements the streaming API of KParts::ReadOnlyPart.

Definition at line 2025 of file tdehtml_part.cpp.

◆ doWriteStream()

bool TDEHTMLPart::doWriteStream ( const TQByteArray &  data)
protectedvirtual

Implements the streaming API of KParts::ReadOnlyPart.

Definition at line 2036 of file tdehtml_part.cpp.

◆ enableJava()

void TDEHTMLPart::enableJava ( bool  e)
inline

Definition at line 519 of file tdehtml_part.h.

◆ enableJScript()

void TDEHTMLPart::enableJScript ( bool  e)
inline

Definition at line 518 of file tdehtml_part.h.

◆ enableMetaRefresh()

void TDEHTMLPart::enableMetaRefresh ( bool  e)
inline

Definition at line 522 of file tdehtml_part.h.

◆ enablePlugins()

void TDEHTMLPart::enablePlugins ( bool  e)
inline

Definition at line 520 of file tdehtml_part.h.

◆ encoding()

TQString TDEHTMLPart::encoding ( ) const

Returns the encoding the page currently uses.

Note that the encoding might be different from the charset.

Definition at line 2485 of file tdehtml_part.cpp.

◆ end()

void TDEHTMLPart::end ( )
virtual

Call this after your last call to write().

Definition at line 2010 of file tdehtml_part.cpp.

◆ executeScript() [1/2]

TQVariant TDEHTMLPart::executeScript ( const DOM::Node &  n,
const TQString &  script 
)

Same as executeScript( const TQString & ) except with the Node parameter specifying the 'this' value.

Definition at line 1186 of file tdehtml_part.cpp.

◆ executeScript [2/2]

TQVariant TDEHTMLPart::executeScript ( const TQString &  script)
slot

Execute the specified snippet of JavaScript code.

Returns true if JavaScript was enabled, no error occurred and the code returned true itself or false otherwise.

Deprecated:
, use executeString( DOM::Node(), script)

Definition at line 1181 of file tdehtml_part.cpp.

◆ findFrame()

TDEHTMLPart * TDEHTMLPart::findFrame ( const TQString &  f)

Finds a frame by name.

Returns 0L if frame can't be found.

Definition at line 5257 of file tdehtml_part.cpp.

◆ findFrameParent()

TDEHTMLPart * TDEHTMLPart::findFrameParent ( KParts::ReadOnlyPart *  callingPart,
const TQString &  f,
tdehtml::ChildFrame **  childFrame = 0 
)

Recursively finds the part containing the frame with name f and checks if it is accessible by callingPart Returns 0L if no suitable frame can't be found.

Returns parent part if a suitable frame was found and frame info in *childFrame

Since
3.3

Definition at line 5215 of file tdehtml_part.cpp.

◆ findFramePart()

KParts::ReadOnlyPart * TDEHTMLPart::findFramePart ( const TQString &  f)

Finds a frame by name.

Returns 0L if frame can't be found.

Definition at line 5270 of file tdehtml_part.cpp.

◆ findText() [1/2]

void TDEHTMLPart::findText ( )

Starts a new search by popping up a dialog asking the user what he wants to search for.

Since
3.3

Definition at line 2996 of file tdehtml_part.cpp.

◆ findText() [2/2]

void TDEHTMLPart::findText ( const TQString &  str,
long  options,
TQWidget *  parent = 0,
KFindDialog *  findDialog = 0 
)

Starts a new search, but bypasses the user dialog.

Parameters
strThe string to search for.
optionsFind options.
parentParent used for centering popups like "string not found".
findDialogOptionally, you can supply your own dialog.
Since
3.3

Definition at line 3035 of file tdehtml_part.cpp.

◆ findTextBegin()

void TDEHTMLPart::findTextBegin ( )

Initiates a text search.

Definition at line 2737 of file tdehtml_part.cpp.

◆ findTextNext() [1/3]

bool TDEHTMLPart::findTextNext ( )

Finds the next occurence of a string set by findText()

Returns
true if a new match was found.
Since
3.3

Definition at line 3063 of file tdehtml_part.cpp.

◆ findTextNext() [2/3]

bool TDEHTMLPart::findTextNext ( bool  reverse)

Finds the next occurence of a string set by findText()

Parameters
reverseif true, revert seach direction (only if no find dialog is used)
Returns
true if a new match was found.
Since
3.5

Definition at line 3069 of file tdehtml_part.cpp.

◆ findTextNext() [3/3]

bool TDEHTMLPart::findTextNext ( const TQString &  str,
bool  forward,
bool  caseSensitive,
bool  isRegExp 
)

Finds the next occurrence of the string or expression.

If isRegExp is true then str is converted to a TQRegExp, and caseSensitive is ignored.

Deprecated:
, use findText( str, options, parent, findDialog )

Definition at line 2823 of file tdehtml_part.cpp.

◆ formNotification()

TDEHTMLPart::FormNotification TDEHTMLPart::formNotification ( ) const

Determine if signal should be emitted before, instead or never when a submitForm() happens.

KDE4 remove me

Since
3.2

Definition at line 7334 of file tdehtml_part.cpp.

◆ formSubmitNotification

void TDEHTMLPart::formSubmitNotification ( const char *  action,
const TQString &  url,
const TQByteArray &  formData,
const TQString &  target,
const TQString &  contentType,
const TQString &  boundary 
)
signal

If form notification is on, this will be emitted either for a form submit or before the form submit according to the setting.

Since
3.2

KDE4 remove me

◆ frameExists()

bool TDEHTMLPart::frameExists ( const TQString &  frameName)

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 5291 of file tdehtml_part.cpp.

◆ framejScript()

KJSProxy * TDEHTMLPart::framejScript ( KParts::ReadOnlyPart *  framePart)

Returns child frame framePart its script interpreter.

Definition at line 5303 of file tdehtml_part.cpp.

◆ frameNames()

TQStringList TDEHTMLPart::frameNames ( ) const

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 5891 of file tdehtml_part.cpp.

◆ frames()

TQPtrList< KParts::ReadOnlyPart > TDEHTMLPart::frames ( ) const

Definition at line 5904 of file tdehtml_part.cpp.

◆ gotoAnchor()

bool TDEHTMLPart::gotoAnchor ( const TQString &  name)

Finds the anchor named name.

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

Definition at line 2521 of file tdehtml_part.cpp.

◆ guiActivateEvent()

void TDEHTMLPart::guiActivateEvent ( KParts::GUIActivateEvent *  event)
protectedvirtual

Internal reimplementation of KParts::Part::guiActivateEvent .

Reimplemented from KParts::ReadOnlyPart.

Definition at line 6636 of file tdehtml_part.cpp.

◆ hasSelection()

bool TDEHTMLPart::hasSelection ( ) const

Has the user selected anything?

Call selectedText() to retrieve the selected text.

Returns
true if there is text selected.

Definition at line 3596 of file tdehtml_part.cpp.

◆ hide()

void TDEHTMLPart::hide ( )

Convenience method to hide the document's view.

Equivalent to widget()->hide() or view()->hide().

Definition at line 5638 of file tdehtml_part.cpp.

◆ htmlDocument()

DOM::HTMLDocument TDEHTMLPart::htmlDocument ( ) const

Returns a reference to the DOM HTML document (for non-HTML documents, returns null)

Definition at line 851 of file tdehtml_part.cpp.

◆ htmlError()

void TDEHTMLPart::htmlError ( int  errorCode,
const TQString &  text,
const KURL &  reqUrl 
)
protected

presents a detailed error message to the user.

errorCode tdeio error code, eg TDEIO::ERR_SERVER_TIMEOUT. text tdeio additional information text. url the url that triggered the error.

Definition at line 1719 of file tdehtml_part.cpp.

◆ inProgress()

bool TDEHTMLPart::inProgress ( ) const

Definition at line 7458 of file tdehtml_part.cpp.

◆ isCaretMode()

bool TDEHTMLPart::isCaretMode ( ) const

Returns whether caret mode is on/off.

Since
3.2

Definition at line 2662 of file tdehtml_part.cpp.

◆ isEditable()

bool TDEHTMLPart::isEditable ( ) const

Returns true if the document is editable, false otherwise.

Since
3.2

Definition at line 2683 of file tdehtml_part.cpp.

◆ isModified()

bool TDEHTMLPart::isModified ( ) const

Checks whether the page contains unsubmitted form changes.

Returns
true if form changes exist
Since
3.3

Definition at line 7350 of file tdehtml_part.cpp.

◆ javaContext()

KJavaAppletContext * TDEHTMLPart::javaContext ( )

Returns the java context of the applets.

If no applet exists, 0 is returned.

Definition at line 1263 of file tdehtml_part.cpp.

◆ javaEnabled()

bool TDEHTMLPart::javaEnabled ( ) const

Return true if Java applet support is enabled, false if disabled.

Definition at line 1250 of file tdehtml_part.cpp.

◆ jScriptEnabled()

bool TDEHTMLPart::jScriptEnabled ( ) const

Returns true if Javascript support is enabled or false otherwise.

Definition at line 939 of file tdehtml_part.cpp.

◆ jScriptInterpreter()

KJS::Interpreter * TDEHTMLPart::jScriptInterpreter ( )

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 916 of file tdehtml_part.cpp.

◆ jsDefaultStatusBarText()

TQString TDEHTMLPart::jsDefaultStatusBarText ( ) const

Called by KJS.

Returns the DefaultStatusBarText assigned via window.defaultStatus

Definition at line 5804 of file tdehtml_part.cpp.

◆ jsStatusBarText()

TQString TDEHTMLPart::jsStatusBarText ( ) const

Called by KJS.

Returns the StatusBarText assigned via window.status

Definition at line 5799 of file tdehtml_part.cpp.

◆ lastModified()

TQString TDEHTMLPart::lastModified ( ) const

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

Definition at line 5835 of file tdehtml_part.cpp.

◆ liveConnectExtension()

KParts::LiveConnectExtension * TDEHTMLPart::liveConnectExtension ( const tdehtml::RenderPart *  frame) const

Definition at line 4299 of file tdehtml_part.cpp.

◆ metaRefreshEnabled()

bool TDEHTMLPart::metaRefreshEnabled ( ) const

Returns true if automatic forwarding is enabled.

Definition at line 953 of file tdehtml_part.cpp.

◆ nextAnchor()

bool TDEHTMLPart::nextAnchor ( )

Go to the next anchor.

This is useful to navigate from outside the navigator

Since
3.2

Definition at line 2569 of file tdehtml_part.cpp.

◆ nodeActivated

void TDEHTMLPart::nodeActivated ( const DOM::Node &  )
signal

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.

◆ nodeUnderMouse()

DOM::Node TDEHTMLPart::nodeUnderMouse ( ) const

Returns the Node currently under the mouse.

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 5644 of file tdehtml_part.cpp.

◆ nonSharedNodeUnderMouse()

DOM::Node TDEHTMLPart::nonSharedNodeUnderMouse ( ) const

Returns the Node currently under the mouse that is not shared.

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).

Since
3.3

Definition at line 5649 of file tdehtml_part.cpp.

◆ onlyLocalReferences()

bool TDEHTMLPart::onlyLocalReferences ( ) const

Returns whether only file:/ or data:/ references are allowed to be loaded ( default false ).

See setOnlyLocalReferences.

Definition at line 2607 of file tdehtml_part.cpp.

◆ onURL

void TDEHTMLPart::onURL ( const TQString &  url)
signal

Emitted if the cursor is moved over an URL.

◆ openFile()

bool TDEHTMLPart::openFile ( )
protectedvirtual

Internal empty reimplementation of KParts::ReadOnlyPart::openFile .

Implements KParts::ReadOnlyPart.

Definition at line 1498 of file tdehtml_part.cpp.

◆ openURL()

bool TDEHTMLPart::openURL ( const KURL &  url)
virtual

Opens the specified URL url.

Reimplemented from KParts::ReadOnlyPart::openURL .

The format of the error url is that two variables are passed in the query: error = int tdeio error code, errText = TQString error text from tdeio and the URL where the error happened is passed as a sub URL.

Reimplemented from KParts::ReadOnlyPart.

Definition at line 565 of file tdehtml_part.cpp.

◆ pageReferrer()

TQString TDEHTMLPart::pageReferrer ( ) const

Referrer used to obtain this page.

Definition at line 5814 of file tdehtml_part.cpp.

◆ paint()

void TDEHTMLPart::paint ( TQPainter *  p,
const TQRect &  rc,
int  yOff = 0,
bool *  more = 0 
)

Paints the HTML page to a TQPainter.

See TDEHTMLView::paint for details

Definition at line 2049 of file tdehtml_part.cpp.

◆ parentPart()

TDEHTMLPart * TDEHTMLPart::parentPart ( )

Returns a pointer to the parent TDEHTMLPart if the part is a frame in an HTML frameset.

Returns 0L otherwise.

Definition at line 5321 of file tdehtml_part.cpp.

◆ partManager()

KParts::PartManager * TDEHTMLPart::partManager ( )

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

Definition at line 4703 of file tdehtml_part.cpp.

◆ pluginPageQuestionAsked()

bool TDEHTMLPart::pluginPageQuestionAsked ( const TQString &  mimetype) const
protected

Definition at line 7000 of file tdehtml_part.cpp.

◆ pluginsEnabled()

bool TDEHTMLPart::pluginsEnabled ( ) const

Returns true if plugins are enabled/disabled.

Definition at line 1279 of file tdehtml_part.cpp.

◆ popupMenu

void TDEHTMLPart::popupMenu ( const TQString &  url,
const TQPoint &  point 
)
signal

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

◆ preloadScript()

void TDEHTMLPart::preloadScript ( const TQString &  url,
const TQString &  script 
)

Loads a script into the script cache.

Definition at line 6978 of file tdehtml_part.cpp.

◆ preloadStyleSheet()

void TDEHTMLPart::preloadStyleSheet ( const TQString &  url,
const TQString &  stylesheet 
)

Loads a style sheet into the stylesheet cache.

Definition at line 6973 of file tdehtml_part.cpp.

◆ prevAnchor()

bool TDEHTMLPart::prevAnchor ( )

Go to previous anchor.

Since
3.2

Definition at line 2578 of file tdehtml_part.cpp.

◆ referrer()

TQString TDEHTMLPart::referrer ( ) const

Referrer used for links in this page.

Definition at line 5809 of file tdehtml_part.cpp.

◆ restored()

bool TDEHTMLPart::restored ( ) const

Definition at line 6995 of file tdehtml_part.cpp.

◆ restoreState()

void TDEHTMLPart::restoreState ( TQDataStream &  stream)
virtual

Restores the TDEHTMLPart's previously saved state (including child frame objects) from the provided TQDataStream.

See also
saveState()

This is called from the restoreState() method of the browserExtension() .

Definition at line 5444 of file tdehtml_part.cpp.

◆ saveState()

void TDEHTMLPart::saveState ( TQDataStream &  stream)
virtual

Saves the TDEHTMLPart's complete state (including child frame objects) to the provided TQDataStream.

This is called from the saveState() method of the browserExtension().

Definition at line 5358 of file tdehtml_part.cpp.

◆ scheduleRedirection()

void TDEHTMLPart::scheduleRedirection ( int  delay,
const TQString &  url,
bool  lockHistory = true 
)

Schedules a redirection after delay seconds.

Definition at line 2383 of file tdehtml_part.cpp.

◆ selectAll()

void TDEHTMLPart::selectAll ( )

Marks all text in the document as selected.

Definition at line 6749 of file tdehtml_part.cpp.

◆ selectedText()

TQString TDEHTMLPart::selectedText ( ) const
virtual

Returns the text the user has marked.

Definition at line 3454 of file tdehtml_part.cpp.

◆ selectedTextAsHTML()

TQString TDEHTMLPart::selectedTextAsHTML ( ) const

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 ?

Since
3.4

Definition at line 3437 of file tdehtml_part.cpp.

◆ selection() [1/2]

DOM::Range TDEHTMLPart::selection ( ) const

Returns the selected part of the HTML.

Definition at line 3606 of file tdehtml_part.cpp.

◆ selection() [2/2]

void TDEHTMLPart::selection ( DOM::Node &  startNode,
long &  startOffset,
DOM::Node &  endNode,
long &  endOffset 
) const

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.

Parameters
startNodereturns node selection starts in
startOffsetreturns offset within starting node
endNodereturns node selection ends in
endOffsetreturns offset within end node.
Since
3.2

Definition at line 3660 of file tdehtml_part.cpp.

◆ selectionChanged

void TDEHTMLPart::selectionChanged ( )
signal

This signal is emitted when the selection changes.

◆ setActiveNode

void TDEHTMLPart::setActiveNode ( const DOM::Node &  node)
slot

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

Parameters
nodeThe node to focus

Definition at line 6924 of file tdehtml_part.cpp.

◆ setAutoloadImages()

void TDEHTMLPart::setAutoloadImages ( bool  enable)

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

Note
Request will be ignored if called before begin().

Definition at line 1335 of file tdehtml_part.cpp.

◆ setCaretDisplayPolicyNonFocused()

void TDEHTMLPart::setCaretDisplayPolicyNonFocused ( CaretDisplayPolicy  policy)

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.

Parameters
policynew display policy
Since
3.2

Definition at line 2711 of file tdehtml_part.cpp.

◆ setCaretMode

void TDEHTMLPart::setCaretMode ( bool  enable)
slot

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.

Parameters
enabletrue to enable, false to disable caret mode.
Since
3.2

Definition at line 2645 of file tdehtml_part.cpp.

◆ setCaretPosition()

void TDEHTMLPart::setCaretPosition ( DOM::Node  node,
long  offset,
bool  extendSelection = false 
)

Sets the caret to the given position.

If the given location is invalid, it will snap to the nearest valid location. Immediately afterwards a caretPositionChanged signal containing the effective position is emitted

Parameters
nodenode to set to
offsetzero-based offset within the node
extendSelectionIf true, a selection will be spanned from the last caret position to the given one. Otherwise, any existing selection will be deselected.
Since
3.2

Definition at line 2688 of file tdehtml_part.cpp.

◆ setCaretVisible

void TDEHTMLPart::setCaretVisible ( bool  show)
slot

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:

  • the document is editable
  • the document is in caret mode
  • the document's currently focused element is editable
Parameters
showtrue to make visible, false to hide.
Since
3.2

Definition at line 2718 of file tdehtml_part.cpp.

◆ setCharset()

bool TDEHTMLPart::setCharset ( const TQString &  ,
bool   
)
inline

Definition at line 523 of file tdehtml_part.h.

◆ setDNDEnabled()

void TDEHTMLPart::setDNDEnabled ( bool  b)

Enables or disables Drag'n'Drop support.

A drag operation is started if the users drags a link.

Definition at line 5934 of file tdehtml_part.cpp.

◆ setEditable

void TDEHTMLPart::setEditable ( bool  enable)
slot

Makes the document editable.

Setting this property to true makes the document, and its subdocuments (such as frames, iframes, objects) editable as a whole. FIXME: insert more information about navigation, features etc. as seen fit

Parameters
enabletrue to set document editable, false to set it read-only.
Since
3.2 (pending, do not use)

Definition at line 2667 of file tdehtml_part.cpp.

◆ setEncoding()

bool TDEHTMLPart::setEncoding ( const TQString &  name,
bool  override = false 
)

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 2467 of file tdehtml_part.cpp.

◆ setFixedFont()

void TDEHTMLPart::setFixedFont ( const TQString &  name)

Sets the fixed font style.

Parameters
nameThe font name to use for fixed text, e.g. the <pre> tag.

Definition at line 2592 of file tdehtml_part.cpp.

◆ setFormNotification()

void TDEHTMLPart::setFormNotification ( TDEHTMLPart::FormNotification  fn)

Determine if signal should be emitted before, instead or never when a submitForm() happens.

Since
3.2

KDE4 remove me

Definition at line 7330 of file tdehtml_part.cpp.

◆ setJavaEnabled()

void TDEHTMLPart::setJavaEnabled ( bool  enable)

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 1244 of file tdehtml_part.cpp.

◆ setJScriptEnabled()

void TDEHTMLPart::setJScriptEnabled ( bool  enable)

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 930 of file tdehtml_part.cpp.

◆ setJSDefaultStatusBarText()

void TDEHTMLPart::setJSDefaultStatusBarText ( const TQString &  text)

Called by KJS.

Sets the DefaultStatusBarText assigned via window.defaultStatus

Definition at line 5794 of file tdehtml_part.cpp.

◆ setJSStatusBarText()

void TDEHTMLPart::setJSStatusBarText ( const TQString &  text)

Called by KJS.

Sets the StatusBarText assigned via window.status

Definition at line 5789 of file tdehtml_part.cpp.

◆ setMetaRefreshEnabled()

void TDEHTMLPart::setMetaRefreshEnabled ( bool  enable)

Enable/disable automatic forwarding by <meta http-equiv="refresh" ....

>

Definition at line 948 of file tdehtml_part.cpp.

◆ setOnlyLocalReferences()

void TDEHTMLPart::setOnlyLocalReferences ( bool  enable)

Security option.

Specify whether only file:/ or data:/ urls are allowed to be loaded without user confirmation by TDEHTML. ( 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 TDEApplication::authorizeURLAction).

Definition at line 2612 of file tdehtml_part.cpp.

◆ setPageSecurity()

void TDEHTMLPart::setPageSecurity ( PageSecurity  sec)
protected

Definition at line 1525 of file tdehtml_part.cpp.

◆ setPluginPageQuestionAsked()

void TDEHTMLPart::setPluginPageQuestionAsked ( const TQString &  mimetype)
protected

Definition at line 7010 of file tdehtml_part.cpp.

◆ setPluginsEnabled()

void TDEHTMLPart::setPluginsEnabled ( bool  enable)

Enables or disables plugins, default is enabled.

Definition at line 1273 of file tdehtml_part.cpp.

◆ setSelection()

void TDEHTMLPart::setSelection ( const DOM::Range &  r)

Sets the current selection.

Definition at line 3668 of file tdehtml_part.cpp.

◆ setStandardFont()

void TDEHTMLPart::setStandardFont ( const TQString &  name)

Sets the standard font style.

Parameters
nameThe font name to use for standard text.

Definition at line 2587 of file tdehtml_part.cpp.

◆ setStatusMessagesEnabled()

void TDEHTMLPart::setStatusMessagesEnabled ( bool  enable)

Enable/disable statusbar messages.

When this class wants to set the statusbar text, it emits setStatusBarText(const TQString & text) If you want to catch this for your own statusbar, note that it returns back a rich text string, starting with "<qt>". This you need to either pass this into your own TQLabel or to strip out the tags before passing it to TQStatusBar::message(const TQString & message)

See also
KParts::Part::setStatusBarText( const TQString & text )

Definition at line 911 of file tdehtml_part.cpp.

◆ setSuppressedPopupIndicator() [1/2]

void TDEHTMLPart::setSuppressedPopupIndicator ( bool  enable)

Shows or hides the suppressed popup indicator.

Deprecated:
Since
3.4

Definition at line 7373 of file tdehtml_part.cpp.

◆ setSuppressedPopupIndicator() [2/2]

void TDEHTMLPart::setSuppressedPopupIndicator ( bool  enable,
TDEHTMLPart *  originPart 
)

Shows or hides the suppressed popup indicator.

Since
3.5

Definition at line 7378 of file tdehtml_part.cpp.

◆ settings()

const TDEHTMLSettings * TDEHTMLPart::settings ( ) const

Definition at line 2350 of file tdehtml_part.cpp.

◆ setURLCursor()

void TDEHTMLPart::setURLCursor ( const TQCursor &  c)

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

Definition at line 2597 of file tdehtml_part.cpp.

◆ setUserStyleSheet() [1/2]

void TDEHTMLPart::setUserStyleSheet ( const KURL &  url)

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.

To have an effect this function has to be called after calling begin().

Definition at line 2509 of file tdehtml_part.cpp.

◆ setUserStyleSheet() [2/2]

void TDEHTMLPart::setUserStyleSheet ( const TQString &  styleSheet)

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.

To have an effect this function has to be called after calling begin().

Definition at line 2515 of file tdehtml_part.cpp.

◆ setZoomFactor()

void TDEHTMLPart::setZoomFactor ( int  percent)

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 5728 of file tdehtml_part.cpp.

◆ show()

void TDEHTMLPart::show ( void  )

Convenience method to show the document's view.

Equivalent to widget()->show() or view()->show() .

Definition at line 5632 of file tdehtml_part.cpp.

◆ showError()

void TDEHTMLPart::showError ( TDEIO::Job *  job)
virtual

Called when a certain error situation (i.e.

connection timed out) occurred. The default implementation either shows a TDEIO error dialog or loads a more verbose error description a as page, depending on the users configuration. job is the job that signaled the error situation

Definition at line 1702 of file tdehtml_part.cpp.

◆ statusMessagesEnabled()

bool TDEHTMLPart::statusMessagesEnabled ( ) const

Returns true if status messages are enabled.

Definition at line 925 of file tdehtml_part.cpp.

◆ stopAnimations

void TDEHTMLPart::stopAnimations ( )
slot

Stops all animated images on the current and child pages.

Definition at line 2055 of file tdehtml_part.cpp.

◆ submitFormProxy

void TDEHTMLPart::submitFormProxy ( const char *  action,
const TQString &  url,
const TQByteArray &  formData,
const TQString &  target,
const TQString &  contentType = TQString::null,
const TQString &  boundary = TQString::null 
)
slot

Definition at line 4728 of file tdehtml_part.cpp.

◆ tdehtmlDrawContentsEvent()

void TDEHTMLPart::tdehtmlDrawContentsEvent ( tdehtml::DrawContentsEvent *  )
protectedvirtual

Eventhandler for the tdehtml::DrawContentsEvent.

Definition at line 6632 of file tdehtml_part.cpp.

◆ tdehtmlMouseDoubleClickEvent()

void TDEHTMLPart::tdehtmlMouseDoubleClickEvent ( tdehtml::MouseDoubleClickEvent *  event)
protectedvirtual

Eventhandler for the tdehtml::MouseDoubleClickEvent.

Definition at line 6129 of file tdehtml_part.cpp.

◆ tdehtmlMouseMoveEvent()

void TDEHTMLPart::tdehtmlMouseMoveEvent ( tdehtml::MouseMoveEvent *  event)
protectedvirtual

Eventhandler for the tdehtml::MouseMouseMoveEvent.

Definition at line 6379 of file tdehtml_part.cpp.

◆ tdehtmlMousePressEvent()

void TDEHTMLPart::tdehtmlMousePressEvent ( tdehtml::MousePressEvent *  event)
protectedvirtual

Eventhandler of the tdehtml::MousePressEvent.

Definition at line 6049 of file tdehtml_part.cpp.

◆ tdehtmlMouseReleaseEvent()

void TDEHTMLPart::tdehtmlMouseReleaseEvent ( tdehtml::MouseReleaseEvent *  event)
protectedvirtual

Eventhandler for the tdehtml::MouseMouseReleaseEvent.

Definition at line 6518 of file tdehtml_part.cpp.

◆ toplevelURL()

KURL TDEHTMLPart::toplevelURL ( )

Returns the toplevel (origin) URL of this document, even if this part is a frame or an iframe.

Returns
the actual original url.
Since
3.2

Definition at line 7338 of file tdehtml_part.cpp.

◆ urlCursor()

TQCursor TDEHTMLPart::urlCursor ( ) const

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

Definition at line 2602 of file tdehtml_part.cpp.

◆ urlSelected()

void TDEHTMLPart::urlSelected ( const TQString &  url,
int  button,
int  state,
const TQString &  _target,
KParts::URLArgs  args = KParts::URLArgs() 
)
protectedvirtual

Definition at line 3893 of file tdehtml_part.cpp.

◆ view()

TDEHTMLView * TDEHTMLPart::view ( ) const

Returns a pointer to the HTML document's view.

Definition at line 906 of file tdehtml_part.cpp.

◆ write() [1/2]

void TDEHTMLPart::write ( const char *  str,
int  len = -1 
)
virtual

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 len parameter is needed for streams encoded in utf-16, since these can have \0 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 write( const char *) with calls to write( const TQString & ).

The result might not be what you want.

Definition at line 1963 of file tdehtml_part.cpp.

◆ write() [2/2]

void TDEHTMLPart::write ( const TQString &  str)
virtual

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 1995 of file tdehtml_part.cpp.

◆ zoomFactor()

int TDEHTMLPart::zoomFactor ( ) const

Returns the current zoom factor.

Definition at line 5664 of file tdehtml_part.cpp.

Friends And Related Function Documentation

◆ DOM::DocumentImpl

friend class DOM::DocumentImpl
friend

Definition at line 208 of file tdehtml_part.h.

◆ DOM::HTMLAnchorElementImpl

friend class DOM::HTMLAnchorElementImpl
friend

Definition at line 191 of file tdehtml_part.h.

◆ DOM::HTMLDocumentImpl

friend class DOM::HTMLDocumentImpl
friend

Definition at line 209 of file tdehtml_part.h.

◆ DOM::HTMLFormElementImpl

friend class DOM::HTMLFormElementImpl
friend

Definition at line 195 of file tdehtml_part.h.

◆ DOM::HTMLFrameElementImpl

friend class DOM::HTMLFrameElementImpl
friend

Definition at line 188 of file tdehtml_part.h.

◆ DOM::HTMLIFrameElementImpl

friend class DOM::HTMLIFrameElementImpl
friend

Definition at line 189 of file tdehtml_part.h.

◆ DOM::HTMLMetaElementImpl

friend class DOM::HTMLMetaElementImpl
friend

Definition at line 192 of file tdehtml_part.h.

◆ DOM::HTMLObjectElementImpl

friend class DOM::HTMLObjectElementImpl
friend

Definition at line 190 of file tdehtml_part.h.

◆ DOM::HTMLTitleElementImpl

friend class DOM::HTMLTitleElementImpl
friend

Definition at line 187 of file tdehtml_part.h.

◆ DOM::NodeImpl

friend class DOM::NodeImpl
friend

Definition at line 193 of file tdehtml_part.h.

◆ KJS::DOMDocument

friend class KJS::DOMDocument
friend

Definition at line 204 of file tdehtml_part.h.

◆ KJS::ExternalFunc

friend class KJS::ExternalFunc
friend

Definition at line 201 of file tdehtml_part.h.

◆ KJS::JSEventListener

friend class KJS::JSEventListener
friend

Definition at line 202 of file tdehtml_part.h.

◆ KJS::JSLazyEventListener

friend class KJS::JSLazyEventListener
friend

Definition at line 203 of file tdehtml_part.h.

◆ KJS::JSNodeFilter

friend class KJS::JSNodeFilter
friend

Definition at line 199 of file tdehtml_part.h.

◆ KJS::ScheduledAction

friend class KJS::ScheduledAction
friend

Definition at line 198 of file tdehtml_part.h.

◆ KJS::SourceFile

friend class KJS::SourceFile
friend

Definition at line 205 of file tdehtml_part.h.

◆ KJS::Window

friend class KJS::Window
friend

Definition at line 197 of file tdehtml_part.h.

◆ KJS::WindowFunc

friend class KJS::WindowFunc
friend

Definition at line 200 of file tdehtml_part.h.

◆ KJSProxy

friend class KJSProxy
friend

Definition at line 206 of file tdehtml_part.h.

◆ tdehtml::CSSStyleSelector

friend class tdehtml::CSSStyleSelector
friend

Definition at line 214 of file tdehtml_part.h.

◆ tdehtml::HTMLTokenizer

friend class tdehtml::HTMLTokenizer
friend

Definition at line 211 of file tdehtml_part.h.

◆ tdehtml::RenderPartObject

friend class tdehtml::RenderPartObject
friend

Definition at line 196 of file tdehtml_part.h.

◆ tdehtml::RenderWidget

friend class tdehtml::RenderWidget
friend

Definition at line 213 of file tdehtml_part.h.

◆ tdehtml::XMLTokenizer

friend class tdehtml::XMLTokenizer
friend

Definition at line 212 of file tdehtml_part.h.

◆ TDEHTMLPartBrowserExtension

friend class TDEHTMLPartBrowserExtension
friend

Definition at line 207 of file tdehtml_part.h.

◆ TDEHTMLPartBrowserHostExtension

friend class TDEHTMLPartBrowserHostExtension
friend

Definition at line 210 of file tdehtml_part.h.

◆ TDEHTMLPartFunction

friend class TDEHTMLPartFunction
friend

Definition at line 216 of file tdehtml_part.h.

◆ TDEHTMLPartIface

friend class TDEHTMLPartIface
friend

Definition at line 215 of file tdehtml_part.h.

◆ TDEHTMLPartPrivate

friend class TDEHTMLPartPrivate
friend

Definition at line 1678 of file tdehtml_part.h.

◆ TDEHTMLPopupGUIClient

friend class TDEHTMLPopupGUIClient
friend

Definition at line 217 of file tdehtml_part.h.

◆ TDEHTMLRun

friend class TDEHTMLRun
friend

Definition at line 194 of file tdehtml_part.h.

◆ TDEHTMLView

friend class TDEHTMLView
friend

Definition at line 186 of file tdehtml_part.h.


The documentation for this class was generated from the following files:
  • tdehtml_part.h
  • tdehtml_part.cpp

tdehtml

Skip menu "tdehtml"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.9.4
This website is maintained by Timothy Pearson.