• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.11.5 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • dom
html_inline.cpp
Go to the documentation of this file.
1 
23 // --------------------------------------------------------------------------
24 
25 #include "html_inline.h"
26 #include "dom_doc.h"
27 
28 #include <html/html_inlineimpl.h>
29 #include <html/html_baseimpl.h>
30 #include <xml/dom_docimpl.h>
31 
32 using namespace DOM;
33 
34 HTMLAnchorElement::HTMLAnchorElement() : HTMLElement()
35 {
36 }
37 
38 HTMLAnchorElement::HTMLAnchorElement(const HTMLAnchorElement &other) : HTMLElement(other)
39 {
40 }
41 
42 HTMLAnchorElement::HTMLAnchorElement(HTMLAnchorElementImpl *impl) : HTMLElement(impl)
43 {
44 }
45 
46 HTMLAnchorElement &HTMLAnchorElement::operator = (const Node &other)
47 {
48  assignOther( other, ID_A );
49  return *this;
50 }
51 
52 HTMLAnchorElement &HTMLAnchorElement::operator = (const HTMLAnchorElement &other)
53 {
54  HTMLElement::operator = (other);
55  return *this;
56 }
57 
58 HTMLAnchorElement::~HTMLAnchorElement()
59 {
60 }
61 
62 DOMString HTMLAnchorElement::accessKey() const
63 {
64  if(!impl) return DOMString();
65  return ((ElementImpl *)impl)->getAttribute(ATTR_ACCESSKEY);
66 }
67 
68 void HTMLAnchorElement::setAccessKey( const DOMString &value )
69 {
70  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ACCESSKEY, value);
71 }
72 
73 DOMString HTMLAnchorElement::charset() const
74 {
75  if(!impl) return DOMString();
76  return ((ElementImpl *)impl)->getAttribute(ATTR_CHARSET);
77 }
78 
79 void HTMLAnchorElement::setCharset( const DOMString &value )
80 {
81  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHARSET, value);
82 }
83 
84 DOMString HTMLAnchorElement::coords() const
85 {
86  if(!impl) return DOMString();
87  return ((ElementImpl *)impl)->getAttribute(ATTR_COORDS);
88 }
89 
90 void HTMLAnchorElement::setCoords( const DOMString &value )
91 {
92  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COORDS, value);
93 }
94 
95 DOMString HTMLAnchorElement::href() const
96 {
97  if(!impl) return DOMString();
98  DOMString href = static_cast<ElementImpl*>(impl)->getAttribute(ATTR_HREF);
99  return !href.isNull() ? impl->document()->completeURL(href.string()) : href;
100 }
101 
102 void HTMLAnchorElement::setHref( const DOMString &value )
103 {
104  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREF, value);
105 }
106 
107 DOMString HTMLAnchorElement::hreflang() const
108 {
109  if(!impl) return DOMString();
110  return ((ElementImpl *)impl)->getAttribute(ATTR_HREFLANG);
111 }
112 
113 void HTMLAnchorElement::setHreflang( const DOMString &value )
114 {
115  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HREFLANG, value);
116 }
117 
118 DOMString HTMLAnchorElement::name() const
119 {
120  if(!impl) return DOMString();
121  return ((ElementImpl *)impl)->getAttribute(ATTR_NAME);
122 }
123 
124 void HTMLAnchorElement::setName( const DOMString &value )
125 {
126  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_NAME, value);
127 }
128 
129 DOMString HTMLAnchorElement::rel() const
130 {
131  if(!impl) return DOMString();
132  return ((ElementImpl *)impl)->getAttribute(ATTR_REL);
133 }
134 
135 void HTMLAnchorElement::setRel( const DOMString &value )
136 {
137  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REL, value);
138 }
139 
140 DOMString HTMLAnchorElement::rev() const
141 {
142  if(!impl) return DOMString();
143  return ((ElementImpl *)impl)->getAttribute(ATTR_REV);
144 }
145 
146 void HTMLAnchorElement::setRev( const DOMString &value )
147 {
148  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_REV, value);
149 }
150 
151 DOMString HTMLAnchorElement::shape() const
152 {
153  if(!impl) return DOMString();
154  return ((ElementImpl *)impl)->getAttribute(ATTR_SHAPE);
155 }
156 
157 void HTMLAnchorElement::setShape( const DOMString &value )
158 {
159  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SHAPE, value);
160 }
161 
162 long HTMLAnchorElement::tabIndex() const
163 {
164  if(!impl) return 0;
165  return ((ElementImpl *)impl)->getAttribute(ATTR_TABINDEX).toInt();
166 }
167 
168 void HTMLAnchorElement::setTabIndex( long _tabIndex )
169 {
170  if(impl) {
171  DOMString value(QString::number(_tabIndex));
172  ((ElementImpl *)impl)->setAttribute(ATTR_TABINDEX,value);
173  }
174 }
175 
176 DOMString HTMLAnchorElement::target() const
177 {
178  if(!impl) return DOMString();
179  return ((ElementImpl *)impl)->getAttribute(ATTR_TARGET);
180 }
181 
182 void HTMLAnchorElement::setTarget( const DOMString &value )
183 {
184  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TARGET, value);
185 }
186 
187 DOMString HTMLAnchorElement::type() const
188 {
189  if(!impl) return DOMString();
190  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
191 }
192 
193 void HTMLAnchorElement::setType( const DOMString &value )
194 {
195  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
196 }
197 
198 void HTMLAnchorElement::blur( )
199 {
200  if (impl) ((HTMLAnchorElementImpl*)impl)->blur();
201 }
202 
203 void HTMLAnchorElement::focus( )
204 {
205  if (impl) ((HTMLAnchorElementImpl*)impl)->focus();
206 }
207 
208 // --------------------------------------------------------------------------
209 
210 HTMLBRElement::HTMLBRElement() : HTMLElement()
211 {
212 }
213 
214 HTMLBRElement::HTMLBRElement(const HTMLBRElement &other) : HTMLElement(other)
215 {
216 }
217 
218 HTMLBRElement::HTMLBRElement(HTMLBRElementImpl *impl) : HTMLElement(impl)
219 {
220 }
221 
222 HTMLBRElement &HTMLBRElement::operator = (const Node &other)
223 {
224  assignOther( other, ID_BR );
225  return *this;
226 }
227 
228 HTMLBRElement &HTMLBRElement::operator = (const HTMLBRElement &other)
229 {
230  HTMLElement::operator = (other);
231  return *this;
232 }
233 
234 HTMLBRElement::~HTMLBRElement()
235 {
236 }
237 
238 DOMString HTMLBRElement::clear() const
239 {
240  if(!impl) return DOMString();
241  return ((ElementImpl *)impl)->getAttribute(ATTR_CLEAR);
242 }
243 
244 void HTMLBRElement::setClear( const DOMString &value )
245 {
246  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CLEAR, value);
247 }
248 
249 // --------------------------------------------------------------------------
250 
251 HTMLFontElement::HTMLFontElement() : HTMLElement()
252 {
253 }
254 
255 HTMLFontElement::HTMLFontElement(const HTMLFontElement &other) : HTMLElement(other)
256 {
257 }
258 
259 HTMLFontElement::HTMLFontElement(HTMLFontElementImpl *impl) : HTMLElement(impl)
260 {
261 }
262 
263 HTMLFontElement &HTMLFontElement::operator = (const Node &other)
264 {
265  assignOther( other, ID_FONT );
266  return *this;
267 }
268 
269 HTMLFontElement &HTMLFontElement::operator = (const HTMLFontElement &other)
270 {
271  HTMLElement::operator = (other);
272  return *this;
273 }
274 
275 HTMLFontElement::~HTMLFontElement()
276 {
277 }
278 
279 DOMString HTMLFontElement::color() const
280 {
281  if(!impl) return DOMString();
282  return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
283 }
284 
285 void HTMLFontElement::setColor( const DOMString &value )
286 {
287  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
288 }
289 
290 DOMString HTMLFontElement::face() const
291 {
292  if(!impl) return DOMString();
293  return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
294 }
295 
296 void HTMLFontElement::setFace( const DOMString &value )
297 {
298  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
299 }
300 
301 DOMString HTMLFontElement::size() const
302 {
303  if(!impl) return DOMString();
304  return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
305 }
306 
307 void HTMLFontElement::setSize( const DOMString &value )
308 {
309  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
310 }
311 
312 
313 // --------------------------------------------------------------------------
314 
315 HTMLModElement::HTMLModElement() : HTMLElement()
316 {
317 }
318 
319 HTMLModElement::HTMLModElement(const HTMLModElement &other) : HTMLElement(other)
320 {
321 }
322 
323 HTMLModElement::HTMLModElement(HTMLElementImpl *_impl)
324  : HTMLElement()
325 {
326  if (_impl && (_impl->id() == ID_INS || _impl->id() == ID_DEL))
327  impl = _impl;
328  else
329  impl = 0;
330  if ( impl ) impl->ref();
331 }
332 
333 HTMLModElement &HTMLModElement::operator = (const Node &other)
334 {
335  if (other.handle() != handle()) {
336  if( other.elementId() != ID_INS &&
337  other.elementId() != ID_DEL )
338  {
339  if ( impl ) impl->deref();
340  impl = 0;
341  } else {
342  Node::operator = (other);
343  }
344  }
345  return *this;
346 }
347 
348 HTMLModElement &HTMLModElement::operator = (const HTMLModElement &other)
349 {
350  HTMLElement::operator = (other);
351  return *this;
352 }
353 
354 HTMLModElement::~HTMLModElement()
355 {
356 }
357 
358 DOMString HTMLModElement::cite() const
359 {
360  if(!impl) return DOMString();
361  return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
362 }
363 
364 void HTMLModElement::setCite( const DOMString &value )
365 {
366  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
367 }
368 
369 DOMString HTMLModElement::dateTime() const
370 {
371  if(!impl) return DOMString();
372  return ((ElementImpl *)impl)->getAttribute(ATTR_DATETIME);
373 }
374 
375 void HTMLModElement::setDateTime( const DOMString &value )
376 {
377  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_DATETIME, value);
378 }
379 
380 // --------------------------------------------------------------------------
381 
382 HTMLQuoteElement::HTMLQuoteElement() : HTMLElement()
383 {
384 }
385 
386 HTMLQuoteElement::HTMLQuoteElement(const HTMLQuoteElement &other) : HTMLElement(other)
387 {
388 }
389 
390 HTMLQuoteElement::HTMLQuoteElement(HTMLGenericElementImpl *_impl)
391  : HTMLElement()
392 {
393  if (_impl && _impl->id() == ID_Q)
394  impl = _impl;
395  else
396  impl = 0;
397  if ( impl ) impl->ref();
398 }
399 
400 HTMLQuoteElement &HTMLQuoteElement::operator = (const Node &other)
401 {
402  assignOther( other, ID_Q );
403  return *this;
404 }
405 
406 HTMLQuoteElement &HTMLQuoteElement::operator = (const HTMLQuoteElement &other)
407 {
408  HTMLElement::operator = (other);
409  return *this;
410 }
411 
412 HTMLQuoteElement::~HTMLQuoteElement()
413 {
414 }
415 
416 DOMString HTMLQuoteElement::cite() const
417 {
418  if(!impl) return DOMString();
419  return ((ElementImpl *)impl)->getAttribute(ATTR_CITE);
420 }
421 
422 void HTMLQuoteElement::setCite( const DOMString &value )
423 {
424  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CITE, value);
425 }
426 
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Thu Sep 25 2014 04:21:33 by doxygen 1.8.3.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

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

kdelibs-4.11.5 API Reference

Skip menu "kdelibs-4.11.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal