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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • dom
html_misc.cpp
Go to the documentation of this file.
1 
22 // --------------------------------------------------------------------------
23 
24 #include "dom/html_misc.h"
25 #include "html/html_miscimpl.h"
26 
27 using namespace DOM;
28 
29 HTMLBaseFontElement::HTMLBaseFontElement() : HTMLElement()
30 {
31 }
32 
33 HTMLBaseFontElement::HTMLBaseFontElement(const HTMLBaseFontElement &other) : HTMLElement(other)
34 {
35 }
36 
37 HTMLBaseFontElement::HTMLBaseFontElement(HTMLBaseFontElementImpl *impl) : HTMLElement(impl)
38 {
39 }
40 
41 HTMLBaseFontElement &HTMLBaseFontElement::operator = (const Node &other)
42 {
43  assignOther( other, ID_BASEFONT );
44  return *this;
45 }
46 
47 HTMLBaseFontElement &HTMLBaseFontElement::operator = (const HTMLBaseFontElement &other)
48 {
49  HTMLElement::operator = (other);
50  return *this;
51 }
52 
53 HTMLBaseFontElement::~HTMLBaseFontElement()
54 {
55 }
56 
57 DOMString HTMLBaseFontElement::color() const
58 {
59  if(!impl) return DOMString();
60  return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
61 }
62 
63 void HTMLBaseFontElement::setColor( const DOMString &value )
64 {
65  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
66 }
67 
68 DOMString HTMLBaseFontElement::face() const
69 {
70  if(!impl) return DOMString();
71  return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
72 }
73 
74 void HTMLBaseFontElement::setFace( const DOMString &value )
75 {
76  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
77 }
78 
79 #ifndef KDE_NO_DEPRECATED
80 DOMString HTMLBaseFontElement::size() const
81 {
82  if(!impl) return DOMString();
83  return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE);
84 }
85 #endif
86 
87 #ifndef KDE_NO_DEPRECATED
88 void HTMLBaseFontElement::setSize( const DOMString &value )
89 {
90  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
91 }
92 #endif
93 
94 long HTMLBaseFontElement::getSize() const
95 {
96  if(!impl) return 0;
97  return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();
98 }
99 
100 void HTMLBaseFontElement::setSize( long _value )
101 {
102  if ( impl )
103  {
104  DOMString value( QString::number( _value ) );
105  ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
106  }
107 }
108 
109 
110 // --------------------------------------------------------------------------
111 
112 HTMLCollection::HTMLCollection()
113  : impl(0)
114 {
115 }
116 
117 HTMLCollection::HTMLCollection(HTMLCollectionImpl* _impl): impl(_impl)
118 {
119  if (impl) impl->ref();
120 }
121 
122 HTMLCollection::HTMLCollection(const HTMLCollection &other)
123 {
124  impl = other.impl;
125  if(impl) impl->ref();
126 }
127 
128 HTMLCollection::HTMLCollection(NodeImpl *base, int type)
129 {
130  impl = new HTMLCollectionImpl(base, type);
131  impl->ref();
132 }
133 
134 HTMLCollection &HTMLCollection::operator = (const HTMLCollection &other)
135 {
136  if(impl != other.impl) {
137  if(impl) impl->deref();
138  impl = other.impl;
139  if(impl) impl->ref();
140  }
141  return *this;
142 }
143 
144 HTMLCollection::~HTMLCollection()
145 {
146  if(impl) impl->deref();
147 }
148 
149 unsigned long HTMLCollection::length() const
150 {
151  if(!impl) return 0;
152  return ((HTMLCollectionImpl *)impl)->length();
153 }
154 
155 Node HTMLCollection::item( unsigned long index ) const
156 {
157  if(!impl) return 0;
158  return ((HTMLCollectionImpl *)impl)->item( index );
159 }
160 
161 Node HTMLCollection::namedItem( const DOMString &name ) const
162 {
163  if(!impl) return 0;
164  return ((HTMLCollectionImpl *)impl)->namedItem( name );
165 }
166 
167 Node HTMLCollection::base() const
168 {
169  if ( !impl )
170  return 0;
171 
172  return static_cast<HTMLCollectionImpl*>( impl )->m_refNode;
173 }
174 
175 Node HTMLCollection::firstItem() const
176 {
177  if ( !impl )
178  return 0;
179  return static_cast<HTMLCollectionImpl*>( impl )->firstItem();
180 }
181 
182 Node HTMLCollection::nextItem() const
183 {
184  if ( !impl )
185  return 0;
186  return static_cast<HTMLCollectionImpl*>( impl )->nextItem();
187 }
188 
189 Node HTMLCollection::nextNamedItem( const DOMString &name ) const
190 {
191  if ( !impl )
192  return 0;
193  return static_cast<HTMLCollectionImpl*>( impl )->nextNamedItem( name );
194 }
195 
196 HTMLCollectionImpl *HTMLCollection::handle() const
197 {
198  return impl;
199 }
200 
201 bool HTMLCollection::isNull() const
202 {
203  return (impl == 0);
204 }
205 
206 
207 // -----------------------------------------------------------------------------
208 
209 HTMLFormCollection::HTMLFormCollection(NodeImpl *base)
210  : HTMLCollection()
211 {
212  impl = new HTMLFormCollectionImpl(base);
213  impl->ref();
214 }
215 
DOM::HTMLBaseFontElement::setFace
void setFace(const DOMString &)
see face
Definition: html_misc.cpp:74
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:270
DOM::HTMLBaseFontElement::getSize
long getSize() const
Computed Font size.
Definition: html_misc.cpp:94
DOM::HTMLCollection::isNull
bool isNull() const
Definition: html_misc.cpp:201
DOM::HTMLBaseFontElement::setColor
void setColor(const DOMString &)
see color
Definition: html_misc.cpp:63
DOM::HTMLCollection::HTMLCollection
HTMLCollection()
Definition: html_misc.cpp:112
DOM::HTMLCollection::impl
HTMLCollectionImpl * impl
Definition: html_misc.h:206
DOM::HTMLCollection::operator=
HTMLCollection & operator=(const HTMLCollection &other)
Definition: html_misc.cpp:134
DOM::HTMLCollection::~HTMLCollection
~HTMLCollection()
Definition: html_misc.cpp:144
DOM::HTMLBaseFontElement::HTMLBaseFontElement
HTMLBaseFontElement()
Definition: html_misc.cpp:29
DOM::HTMLBaseFontElement::setSize
void setSize(long)
see size
Definition: html_misc.cpp:100
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:130
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLBaseFontElement::~HTMLBaseFontElement
~HTMLBaseFontElement()
Definition: html_misc.cpp:53
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
DOM::HTMLElement::operator=
HTMLElement & operator=(const HTMLElement &other)
Definition: html_element.cpp:41
DOM::HTMLBaseFontElement::face
DOMString face() const
Font face identifier.
Definition: html_misc.cpp:68
DOM::HTMLCollection::length
unsigned long length() const
This attribute specifies the length or size of the list.
Definition: html_misc.cpp:149
DOM::HTMLCollection::nextItem
Node nextItem() const
Definition: html_misc.cpp:182
DOM::HTMLCollection::base
Node base() const
Definition: html_misc.cpp:167
DOM::HTMLBaseFontElement::size
DOMString size() const
Definition: html_misc.cpp:80
html_misc.h
DOM::HTMLBaseFontElement::color
DOMString color() const
Font color.
Definition: html_misc.cpp:57
DOM::HTMLCollection::handle
HTMLCollectionImpl * handle() const
Definition: html_misc.cpp:196
DOM::HTMLElement::assignOther
void assignOther(const Node &other, int elementId)
Definition: html_element.cpp:176
DOM::HTMLBaseFontElement
Base font.
Definition: html_misc.h:48
DOM::HTMLBaseFontElement::operator=
HTMLBaseFontElement & operator=(const HTMLBaseFontElement &other)
Definition: html_misc.cpp:47
DOM::HTMLCollection::item
Node item(unsigned long index) const
This method retrieves a node specified by ordinal index.
Definition: html_misc.cpp:155
DOM::HTMLCollection::firstItem
Node firstItem() const
Definition: html_misc.cpp:175
DOM::HTMLCollection::nextNamedItem
Node nextNamedItem(const DOMString &name) const
Definition: html_misc.cpp:189
DOM::HTMLCollection::namedItem
Node namedItem(const DOMString &name) const
This method retrieves a Node using a name.
Definition: html_misc.cpp:161
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLFormCollection::HTMLFormCollection
HTMLFormCollection(NodeImpl *base)
Definition: html_misc.cpp:209
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:21 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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