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

tdehtml

  • tdehtml
tdehtml_iface.cpp
1/* This file is part of the KDE project
2 *
3 * Copyright (C) 2002 Stephan Kulow <coolo@kde.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#include "tdehtml_iface.h"
22#include "tdehtml_part.h"
23#include "tdehtmlview.h"
24#include "tdehtml_ext.h"
25#include <tdeio/global.h>
26#include <tqapplication.h>
27#include <tqvariant.h>
28
29TDEHTMLPartIface::TDEHTMLPartIface( TDEHTMLPart *_part )
30 : DCOPObject( _part->dcopObjectId() ), part(_part)
31{
32}
33
34TDEHTMLPartIface::~TDEHTMLPartIface()
35{
36}
37
38KURL TDEHTMLPartIface::url() const
39{
40 return part->url();
41}
42
43void TDEHTMLPartIface::setJScriptEnabled( bool enable )
44{
45 part->setJScriptEnabled(enable);
46}
47
48bool TDEHTMLPartIface::jScriptEnabled() const
49{
50 return part->jScriptEnabled();
51}
52
53bool TDEHTMLPartIface::closeURL()
54{
55 return part->closeURL();
56}
57
58bool TDEHTMLPartIface::metaRefreshEnabled() const
59{
60 return part->metaRefreshEnabled();
61}
62
63void TDEHTMLPartIface::setDNDEnabled( bool b )
64{
65 part->setDNDEnabled(b);
66}
67
68bool TDEHTMLPartIface::dndEnabled() const
69{
70 return part->dndEnabled();
71}
72
73void TDEHTMLPartIface::setJavaEnabled( bool enable )
74{
75 part->setJavaEnabled( enable );
76}
77
78bool TDEHTMLPartIface::javaEnabled() const
79{
80 return part->javaEnabled();
81}
82
83void TDEHTMLPartIface::setPluginsEnabled( bool enable )
84{
85 part->setPluginsEnabled( enable );
86}
87
88bool TDEHTMLPartIface::pluginsEnabled() const
89{
90 return part->pluginsEnabled();
91}
92
93void TDEHTMLPartIface::setAutoloadImages( bool enable )
94{
95 part->setAutoloadImages( enable );
96}
97
98bool TDEHTMLPartIface::autoloadImages() const
99{
100 return part->autoloadImages();
101}
102
103void TDEHTMLPartIface::setOnlyLocalReferences(bool enable)
104{
105 part->setOnlyLocalReferences(enable);
106}
107
108void TDEHTMLPartIface::setMetaRefreshEnabled( bool enable )
109{
110 part->setMetaRefreshEnabled(enable);
111}
112
113bool TDEHTMLPartIface::onlyLocalReferences() const
114{
115 return part->onlyLocalReferences();
116}
117
118bool TDEHTMLPartIface::setEncoding( const TQString &name )
119{
120 return part->setEncoding(name);
121}
122
123TQString TDEHTMLPartIface::encoding() const
124{
125 return part->encoding();
126}
127
128void TDEHTMLPartIface::setFixedFont( const TQString &name )
129{
130 part->setFixedFont(name);
131
132}
133
134bool TDEHTMLPartIface::gotoAnchor( const TQString &name )
135{
136 return part->gotoAnchor(name);
137}
138
139bool TDEHTMLPartIface::nextAnchor()
140{
141 return part->nextAnchor();
142}
143
144bool TDEHTMLPartIface::prevAnchor()
145{
146 return part->prevAnchor();
147}
148
149void TDEHTMLPartIface::activateNode()
150{
151 KParts::ReadOnlyPart* p = part->currentFrame();
152 if ( p && p->widget() ) {
153 TQKeyEvent ev( TQKeyEvent::KeyPress, TQt::Key_Return, '\n', 0, "\n" );
154 TQApplication::sendEvent( p->widget(), &ev );
155 }
156}
157
158void TDEHTMLPartIface::selectAll()
159{
160 part->selectAll();
161}
162
163TQString TDEHTMLPartIface::lastModified() const
164{
165 return part->lastModified();
166}
167
168void TDEHTMLPartIface::debugRenderTree()
169{
170 part->slotDebugRenderTree();
171}
172
173void TDEHTMLPartIface::debugDOMTree()
174{
175 part->slotDebugDOMTree();
176}
177
178void TDEHTMLPartIface::stopAnimations()
179{
180 part->slotStopAnimations();
181}
182
183void TDEHTMLPartIface::viewDocumentSource()
184{
185 part->slotViewDocumentSource();
186}
187
188void TDEHTMLPartIface::saveBackground(const TQString &destination)
189{
190 KURL back = part->backgroundURL();
191 if (back.isEmpty())
192 return;
193
194 TDEIO::MetaData metaData;
195 metaData["referrer"] = part->referrer();
196 TDEHTMLPopupGUIClient::saveURL( back, KURL( destination ), metaData );
197}
198
199void TDEHTMLPartIface::saveDocument(const TQString &destination)
200{
201 KURL srcURL( part->url() );
202
203 if ( srcURL.fileName(false).isEmpty() )
204 srcURL.setFileName( "index.html" );
205
206 TDEIO::MetaData metaData;
207 // Referrer unknown?
208 TDEHTMLPopupGUIClient::saveURL( srcURL, KURL( destination ), metaData, part->cacheId() );
209}
210
211void TDEHTMLPartIface::setUserStyleSheet(const TQString &styleSheet)
212{
213 part->setUserStyleSheet(styleSheet);
214}
215
216TQString TDEHTMLPartIface::selectedText() const
217{
218 return part->selectedText();
219}
220
221void TDEHTMLPartIface::viewFrameSource()
222{
223 part->slotViewFrameSource();
224}
225
226TQString TDEHTMLPartIface::evalJS(const TQString &script)
227{
228 return part->executeScript(DOM::Node(), script).toString();
229}
230
231void TDEHTMLPartIface::print( bool quick ) {
232 part->view()->print( quick );
233}
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:275
KParts::Part::widget
virtual TQWidget * widget()
KParts::ReadOnlyPart
KParts::ReadOnlyPart::url
KURL url() const
KURL
TDEHTMLPartIface::autoloadImages
bool autoloadImages() const
Returns whether images contained in the document are loaded automatically or not.
Definition: tdehtml_iface.cpp:98
TDEHTMLPartIface::jScriptEnabled
bool jScriptEnabled() const
Returns true if Javascript support is enabled or false otherwise.
Definition: tdehtml_iface.cpp:48
TDEHTMLPartIface::selectAll
void selectAll()
Marks all text in the document as selected.
Definition: tdehtml_iface.cpp:158
TDEHTMLPartIface::selectedText
TQString selectedText() const
Returns the text the user has marked.
Definition: tdehtml_iface.cpp:216
TDEHTMLPartIface::setOnlyLocalReferences
void setOnlyLocalReferences(bool enable)
Security option.
Definition: tdehtml_iface.cpp:103
TDEHTMLPartIface::setPluginsEnabled
void setPluginsEnabled(bool enable)
Enables or disables plugins via, default is enabled.
Definition: tdehtml_iface.cpp:83
TDEHTMLPartIface::lastModified
TQString lastModified() const
Last-modified date (in raw string format), if received in the [HTTP] headers.
Definition: tdehtml_iface.cpp:163
TDEHTMLPartIface::pluginsEnabled
bool pluginsEnabled() const
Returns trie if plugins are enabled/disabled.
Definition: tdehtml_iface.cpp:88
TDEHTMLPartIface::onlyLocalReferences
bool onlyLocalReferences() const
Returns whether references should be loaded ( default false )
Definition: tdehtml_iface.cpp:113
TDEHTMLPartIface::gotoAnchor
bool gotoAnchor(const TQString &name)
Finds the anchor named name.
Definition: tdehtml_iface.cpp:134
TDEHTMLPartIface::dndEnabled
bool dndEnabled() const
Returns whether Dragn'n'Drop support is enabled or not.
Definition: tdehtml_iface.cpp:68
TDEHTMLPartIface::print
ASYNC print(bool quick)
Print the contents of the current html view.
Definition: tdehtml_iface.cpp:231
TDEHTMLPartIface::setFixedFont
void setFixedFont(const TQString &name)
Sets the fixed font style.
Definition: tdehtml_iface.cpp:128
TDEHTMLPartIface::metaRefreshEnabled
bool metaRefreshEnabled() const
Returns true if automtaic forwarding is enabled.
Definition: tdehtml_iface.cpp:58
TDEHTMLPartIface::evalJS
TQString evalJS(const TQString &script)
Evaluate a given piece of Javascript code.
Definition: tdehtml_iface.cpp:226
TDEHTMLPartIface::prevAnchor
bool prevAnchor()
Go to previous Anchor.
Definition: tdehtml_iface.cpp:144
TDEHTMLPartIface::activateNode
void activateNode()
Activate the node that currently has the focus (emulates pressing Return)
Definition: tdehtml_iface.cpp:149
TDEHTMLPartIface::url
KURL url() const
Definition: tdehtml_iface.cpp:38
TDEHTMLPartIface::setEncoding
bool setEncoding(const TQString &name)
Sets the encoding the page uses.
Definition: tdehtml_iface.cpp:118
TDEHTMLPartIface::setJavaEnabled
void setJavaEnabled(bool enable)
Enables/disables Java applet support.
Definition: tdehtml_iface.cpp:73
TDEHTMLPartIface::javaEnabled
bool javaEnabled() const
Return if Java applet support is enabled/disabled.
Definition: tdehtml_iface.cpp:78
TDEHTMLPartIface::encoding
TQString encoding() const
Returns the encoding the page currently uses.
Definition: tdehtml_iface.cpp:123
TDEHTMLPartIface::nextAnchor
bool nextAnchor()
Go to next Anchor.
Definition: tdehtml_iface.cpp:139
TDEHTMLPartIface::setJScriptEnabled
void setJScriptEnabled(bool enable)
Enable/disable Javascript support.
Definition: tdehtml_iface.cpp:43
TDEHTMLPartIface::setUserStyleSheet
void setUserStyleSheet(const TQString &styleSheet)
Sets a user defined style sheet to be used on top of the HTML 4 default style sheet.
Definition: tdehtml_iface.cpp:211
TDEHTMLPartIface::setMetaRefreshEnabled
void setMetaRefreshEnabled(bool enable)
Enable/disable the automatic forwarding by <meta http-equiv="refresh" ....
Definition: tdehtml_iface.cpp:108
TDEHTMLPartIface::setAutoloadImages
void setAutoloadImages(bool enable)
Specifies whether images contained in the document should be loaded automatically or not.
Definition: tdehtml_iface.cpp:93
TDEHTMLPartIface::setDNDEnabled
void setDNDEnabled(bool b)
Enables or disables Drag'n'Drop support.
Definition: tdehtml_iface.cpp:63
TDEHTMLPartIface::stopAnimations
void stopAnimations()
Stops display of animated images.
Definition: tdehtml_iface.cpp:178
TDEHTMLPart
This class is tdehtml's main class.
Definition: tdehtml_part.h:184
TDEHTMLPart::executeScript
TQVariant executeScript(const DOM::Node &n, const TQString &script)
Same as executeScript( const TQString & ) except with the Node parameter specifying the 'this' value.
Definition: tdehtml_part.cpp:1186
TDEHTMLPart::pluginsEnabled
bool pluginsEnabled() const
Returns true if plugins are enabled/disabled.
Definition: tdehtml_part.cpp:1279
TDEHTMLPart::selectAll
void selectAll()
Marks all text in the document as selected.
Definition: tdehtml_part.cpp:6749
TDEHTMLPart::prevAnchor
bool prevAnchor()
Go to previous anchor.
Definition: tdehtml_part.cpp:2578
TDEHTMLPart::encoding
TQString encoding() const
Returns the encoding the page currently uses.
Definition: tdehtml_part.cpp:2485
TDEHTMLPart::setMetaRefreshEnabled
void setMetaRefreshEnabled(bool enable)
Enable/disable automatic forwarding by <meta http-equiv="refresh" ....
Definition: tdehtml_part.cpp:948
TDEHTMLPart::onlyLocalReferences
bool onlyLocalReferences() const
Returns whether only file:/ or data:/ references are allowed to be loaded ( default false ).
Definition: tdehtml_part.cpp:2607
TDEHTMLPart::view
TDEHTMLView * view() const
Returns a pointer to the HTML document's view.
Definition: tdehtml_part.cpp:906
TDEHTMLPart::dndEnabled
bool dndEnabled() const
Returns whether Dragn'n'Drop support is enabled or not.
Definition: tdehtml_part.cpp:5939
TDEHTMLPart::setJavaEnabled
void setJavaEnabled(bool enable)
Enables/disables Java applet support.
Definition: tdehtml_part.cpp:1244
TDEHTMLPart::referrer
TQString referrer() const
Referrer used for links in this page.
Definition: tdehtml_part.cpp:5809
TDEHTMLPart::setEncoding
bool setEncoding(const TQString &name, bool override=false)
Sets the encoding the page uses.
Definition: tdehtml_part.cpp:2467
TDEHTMLPart::nextAnchor
bool nextAnchor()
Go to the next anchor.
Definition: tdehtml_part.cpp:2569
TDEHTMLPart::gotoAnchor
bool gotoAnchor(const TQString &name)
Finds the anchor named name.
Definition: tdehtml_part.cpp:2521
TDEHTMLPart::selectedText
virtual TQString selectedText() const
Returns the text the user has marked.
Definition: tdehtml_part.cpp:3454
TDEHTMLPart::backgroundURL
KURL backgroundURL() const
Returns the URL for the background Image (used by save background)
Definition: tdehtml_part.cpp:4117
TDEHTMLPart::setOnlyLocalReferences
void setOnlyLocalReferences(bool enable)
Security option.
Definition: tdehtml_part.cpp:2612
TDEHTMLPart::autoloadImages
bool autoloadImages() const
Returns whether images contained in the document are loaded automatically or not.
Definition: tdehtml_part.cpp:1359
TDEHTMLPart::setDNDEnabled
void setDNDEnabled(bool b)
Enables or disables Drag'n'Drop support.
Definition: tdehtml_part.cpp:5934
TDEHTMLPart::setJScriptEnabled
void setJScriptEnabled(bool enable)
Enable/disable Javascript support.
Definition: tdehtml_part.cpp:930
TDEHTMLPart::currentFrame
KParts::ReadOnlyPart * currentFrame() const
Return the current frame (the one that has focus) Not necessarily a direct child of ours,...
Definition: tdehtml_part.cpp:5276
TDEHTMLPart::lastModified
TQString lastModified() const
Last-modified date (in raw string format), if received in the [HTTP] headers.
Definition: tdehtml_part.cpp:5835
TDEHTMLPart::setPluginsEnabled
void setPluginsEnabled(bool enable)
Enables or disables plugins, default is enabled.
Definition: tdehtml_part.cpp:1273
TDEHTMLPart::metaRefreshEnabled
bool metaRefreshEnabled() const
Returns true if automatic forwarding is enabled.
Definition: tdehtml_part.cpp:953
TDEHTMLPart::setUserStyleSheet
void setUserStyleSheet(const KURL &url)
Sets a user defined style sheet to be used on top of the HTML 4 default style sheet.
Definition: tdehtml_part.cpp:2509
TDEHTMLPart::closeURL
virtual bool closeURL()
Stops loading the document and kills all data requests (for images, etc.)
Definition: tdehtml_part.cpp:769
TDEHTMLPart::javaEnabled
bool javaEnabled() const
Return true if Java applet support is enabled, false if disabled.
Definition: tdehtml_part.cpp:1250
TDEHTMLPart::jScriptEnabled
bool jScriptEnabled() const
Returns true if Javascript support is enabled or false otherwise.
Definition: tdehtml_part.cpp:939
TDEHTMLPart::setAutoloadImages
void setAutoloadImages(bool enable)
Specifies whether images contained in the document should be loaded automatically or not.
Definition: tdehtml_part.cpp:1335
TDEHTMLPart::setFixedFont
void setFixedFont(const TQString &name)
Sets the fixed font style.
Definition: tdehtml_part.cpp:2592
TDEHTMLView::print
void print()
Prints the HTML document.
Definition: tdehtmlview.cpp:2767
TDEStdAccel::back
const TDEShortcut & back()

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.