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

KHTML

  • 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
27using namespace DOM;
28
29HTMLBaseFontElement::HTMLBaseFontElement() : HTMLElement()
30{
31}
32
33HTMLBaseFontElement::HTMLBaseFontElement(const HTMLBaseFontElement &other) : HTMLElement(other)
34{
35}
36
37HTMLBaseFontElement::HTMLBaseFontElement(HTMLBaseFontElementImpl *impl) : HTMLElement(impl)
38{
39}
40
41HTMLBaseFontElement &HTMLBaseFontElement::operator = (const Node &other)
42{
43 assignOther( other, ID_BASEFONT );
44 return *this;
45}
46
47HTMLBaseFontElement &HTMLBaseFontElement::operator = (const HTMLBaseFontElement &other)
48{
49 HTMLElement::operator = (other);
50 return *this;
51}
52
53HTMLBaseFontElement::~HTMLBaseFontElement()
54{
55}
56
57DOMString HTMLBaseFontElement::color() const
58{
59 if(!impl) return DOMString();
60 return ((ElementImpl *)impl)->getAttribute(ATTR_COLOR);
61}
62
63void HTMLBaseFontElement::setColor( const DOMString &value )
64{
65 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_COLOR, value);
66}
67
68DOMString HTMLBaseFontElement::face() const
69{
70 if(!impl) return DOMString();
71 return ((ElementImpl *)impl)->getAttribute(ATTR_FACE);
72}
73
74void HTMLBaseFontElement::setFace( const DOMString &value )
75{
76 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FACE, value);
77}
78
79#ifndef KDE_NO_DEPRECATED
80DOMString 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
88void HTMLBaseFontElement::setSize( const DOMString &value )
89{
90 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SIZE, value);
91}
92#endif
93
94long HTMLBaseFontElement::getSize() const
95{
96 if(!impl) return 0;
97 return ((ElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();
98}
99
100void 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
112HTMLCollection::HTMLCollection()
113 : impl(0)
114{
115}
116
117HTMLCollection::HTMLCollection(HTMLCollectionImpl* _impl): impl(_impl)
118{
119 if (impl) impl->ref();
120}
121
122HTMLCollection::HTMLCollection(const HTMLCollection &other)
123{
124 impl = other.impl;
125 if(impl) impl->ref();
126}
127
128HTMLCollection::HTMLCollection(NodeImpl *base, int type)
129{
130 impl = new HTMLCollectionImpl(base, type);
131 impl->ref();
132}
133
134HTMLCollection &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
144HTMLCollection::~HTMLCollection()
145{
146 if(impl) impl->deref();
147}
148
149unsigned long HTMLCollection::length() const
150{
151 if(!impl) return 0;
152 return ((HTMLCollectionImpl *)impl)->length();
153}
154
155Node HTMLCollection::item( unsigned long index ) const
156{
157 if(!impl) return 0;
158 return ((HTMLCollectionImpl *)impl)->item( index );
159}
160
161Node HTMLCollection::namedItem( const DOMString &name ) const
162{
163 if(!impl) return 0;
164 return ((HTMLCollectionImpl *)impl)->namedItem( name );
165}
166
167Node HTMLCollection::base() const
168{
169 if ( !impl )
170 return 0;
171
172 return static_cast<HTMLCollectionImpl*>( impl )->m_refNode;
173}
174
175Node HTMLCollection::firstItem() const
176{
177 if ( !impl )
178 return 0;
179 return static_cast<HTMLCollectionImpl*>( impl )->firstItem();
180}
181
182Node HTMLCollection::nextItem() const
183{
184 if ( !impl )
185 return 0;
186 return static_cast<HTMLCollectionImpl*>( impl )->nextItem();
187}
188
189Node HTMLCollection::nextNamedItem( const DOMString &name ) const
190{
191 if ( !impl )
192 return 0;
193 return static_cast<HTMLCollectionImpl*>( impl )->nextNamedItem( name );
194}
195
196HTMLCollectionImpl *HTMLCollection::handle() const
197{
198 return impl;
199}
200
201bool HTMLCollection::isNull() const
202{
203 return (impl == 0);
204}
205
206
207// -----------------------------------------------------------------------------
208
209HTMLFormCollection::HTMLFormCollection(NodeImpl *base)
210 : HTMLCollection()
211{
212 impl = new HTMLFormCollectionImpl(base);
213 impl->ref();
214}
215
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::HTMLBaseFontElement
Base font.
Definition: html_misc.h:49
DOM::HTMLBaseFontElement::getSize
long getSize() const
Computed Font size.
Definition: html_misc.cpp:94
DOM::HTMLBaseFontElement::setFace
void setFace(const DOMString &)
see face
Definition: html_misc.cpp:74
DOM::HTMLBaseFontElement::face
DOMString face() const
Font face identifier.
Definition: html_misc.cpp:68
DOM::HTMLBaseFontElement::color
DOMString color() const
Font color.
Definition: html_misc.cpp:57
DOM::HTMLBaseFontElement::operator=
HTMLBaseFontElement & operator=(const HTMLBaseFontElement &other)
Definition: html_misc.cpp:47
DOM::HTMLBaseFontElement::setColor
void setColor(const DOMString &)
see color
Definition: html_misc.cpp:63
DOM::HTMLBaseFontElement::~HTMLBaseFontElement
~HTMLBaseFontElement()
Definition: html_misc.cpp:53
DOM::HTMLBaseFontElement::HTMLBaseFontElement
HTMLBaseFontElement()
Definition: html_misc.cpp:29
DOM::HTMLBaseFontElement::setSize
void setSize(long)
see size
Definition: html_misc.cpp:100
DOM::HTMLBaseFontElement::size
DOMString size() const
Definition: html_misc.cpp:80
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:131
DOM::HTMLCollection::firstItem
Node firstItem() const
Definition: html_misc.cpp:175
DOM::HTMLCollection::operator=
HTMLCollection & operator=(const HTMLCollection &other)
Definition: html_misc.cpp:134
DOM::HTMLCollection::nextItem
Node nextItem() const
Definition: html_misc.cpp:182
DOM::HTMLCollection::impl
HTMLCollectionImpl * impl
Definition: html_misc.h:206
DOM::HTMLCollection::isNull
bool isNull() const
Definition: html_misc.cpp:201
DOM::HTMLCollection::~HTMLCollection
~HTMLCollection()
Definition: html_misc.cpp:144
DOM::HTMLCollection::base
Node base() const
Definition: html_misc.cpp:167
DOM::HTMLCollection::nextNamedItem
Node nextNamedItem(const DOMString &name) const
Definition: html_misc.cpp:189
DOM::HTMLCollection::handle
HTMLCollectionImpl * handle() const
Definition: html_misc.cpp:196
DOM::HTMLCollection::HTMLCollection
HTMLCollection()
Definition: html_misc.cpp:112
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::length
unsigned long length() const
This attribute specifies the length or size of the list.
Definition: html_misc.cpp:149
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:70
DOM::HTMLElement::assignOther
void assignOther(const Node &other, int elementId)
Definition: html_element.cpp:176
DOM::HTMLElement::operator=
HTMLElement & operator=(const HTMLElement &other)
Definition: html_element.cpp:41
DOM::HTMLFormCollection::HTMLFormCollection
HTMLFormCollection(NodeImpl *base)
Definition: html_misc.cpp:209
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:271
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
html_misc.h
DOM
This library provides a full-featured HTML parser and widget.
Definition: design.h:55
name
const char * name(StandardAction id)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 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.14.38 API Reference

Skip menu "kdelibs-4.14.38 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