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

KHTML

  • khtml
  • dom
html_list.cpp
Go to the documentation of this file.
1
22// --------------------------------------------------------------------------
23
24#include "dom/html_list.h"
25#include "html/html_listimpl.h"
26
27using namespace DOM;
28
29HTMLDListElement::HTMLDListElement() : HTMLElement()
30{
31}
32
33HTMLDListElement::HTMLDListElement(const HTMLDListElement &other) : HTMLElement(other)
34{
35}
36
37HTMLDListElement::HTMLDListElement(HTMLDListElementImpl *impl) : HTMLElement(impl)
38{
39}
40
41HTMLDListElement &HTMLDListElement::operator = (const Node &other)
42{
43 assignOther( other, ID_DL );
44 return *this;
45}
46
47HTMLDListElement &HTMLDListElement::operator = (const HTMLDListElement &other)
48{
49 HTMLElement::operator = (other);
50 return *this;
51}
52
53HTMLDListElement::~HTMLDListElement()
54{
55}
56
57bool HTMLDListElement::compact() const
58{
59 if(!impl) return 0;
60 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
61}
62
63void HTMLDListElement::setCompact( bool _compact )
64{
65 if(impl)
66 {
67 DOMString str;
68 if( _compact )
69 str = "";
70 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
71 }
72}
73
74// --------------------------------------------------------------------------
75
76HTMLDirectoryElement::HTMLDirectoryElement() : HTMLElement()
77{
78}
79
80HTMLDirectoryElement::HTMLDirectoryElement(const HTMLDirectoryElement &other) : HTMLElement(other)
81{
82}
83
84HTMLDirectoryElement::HTMLDirectoryElement(HTMLDirectoryElementImpl *impl) : HTMLElement(impl)
85{
86}
87
88HTMLDirectoryElement &HTMLDirectoryElement::operator = (const Node &other)
89{
90 assignOther( other, ID_DIR );
91 return *this;
92}
93
94HTMLDirectoryElement &HTMLDirectoryElement::operator = (const HTMLDirectoryElement &other)
95{
96 HTMLElement::operator = (other);
97 return *this;
98}
99
100HTMLDirectoryElement::~HTMLDirectoryElement()
101{
102}
103
104bool HTMLDirectoryElement::compact() const
105{
106 if(!impl) return 0;
107 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
108}
109
110void HTMLDirectoryElement::setCompact( bool _compact )
111{
112 if(impl)
113 {
114 DOMString str;
115 if( _compact )
116 str = "";
117 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
118 }
119}
120
121// --------------------------------------------------------------------------
122
123HTMLLIElement::HTMLLIElement() : HTMLElement()
124{
125}
126
127HTMLLIElement::HTMLLIElement(const HTMLLIElement &other) : HTMLElement(other)
128{
129}
130
131HTMLLIElement::HTMLLIElement(HTMLLIElementImpl *impl) : HTMLElement(impl)
132{
133}
134
135HTMLLIElement &HTMLLIElement::operator = (const Node &other)
136{
137 assignOther( other, ID_LI );
138 return *this;
139}
140
141HTMLLIElement &HTMLLIElement::operator = (const HTMLLIElement &other)
142{
143 HTMLElement::operator = (other);
144 return *this;
145}
146
147HTMLLIElement::~HTMLLIElement()
148{
149}
150
151DOMString HTMLLIElement::type() const
152{
153 if(!impl) return DOMString();
154 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
155}
156
157void HTMLLIElement::setType( const DOMString &value )
158{
159 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
160}
161
162long HTMLLIElement::value() const
163{
164 if(!impl) return 0;
165 return ((ElementImpl *)impl)->getAttribute(ATTR_VALUE).toInt();
166}
167
168void HTMLLIElement::setValue( long _value )
169{
170 if(impl) {
171 DOMString value(QString::number(_value));
172 ((ElementImpl *)impl)->setAttribute(ATTR_VALUE,value);
173 }
174}
175
176// --------------------------------------------------------------------------
177
178HTMLMenuElement::HTMLMenuElement() : HTMLElement()
179{
180}
181
182HTMLMenuElement::HTMLMenuElement(const HTMLMenuElement &other) : HTMLElement(other)
183{
184}
185
186HTMLMenuElement::HTMLMenuElement(HTMLMenuElementImpl *impl) : HTMLElement(impl)
187{
188}
189
190HTMLMenuElement &HTMLMenuElement::operator = (const Node &other)
191{
192 assignOther( other, ID_MENU );
193 return *this;
194}
195
196HTMLMenuElement &HTMLMenuElement::operator = (const HTMLMenuElement &other)
197{
198 HTMLElement::operator = (other);
199 return *this;
200}
201
202HTMLMenuElement::~HTMLMenuElement()
203{
204}
205
206bool HTMLMenuElement::compact() const
207{
208 if(!impl) return 0;
209 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
210}
211
212void HTMLMenuElement::setCompact( bool _compact )
213{
214 if(impl)
215 {
216 DOMString str;
217 if( _compact )
218 str = "";
219 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
220 }
221}
222
223// --------------------------------------------------------------------------
224
225HTMLOListElement::HTMLOListElement() : HTMLElement()
226{
227}
228
229HTMLOListElement::HTMLOListElement(const HTMLOListElement &other) : HTMLElement(other)
230{
231}
232
233HTMLOListElement::HTMLOListElement(HTMLOListElementImpl *impl) : HTMLElement(impl)
234{
235}
236
237HTMLOListElement &HTMLOListElement::operator = (const Node &other)
238{
239 assignOther( other, ID_OL );
240 return *this;
241}
242
243HTMLOListElement &HTMLOListElement::operator = (const HTMLOListElement &other)
244{
245 HTMLElement::operator = (other);
246 return *this;
247}
248
249HTMLOListElement::~HTMLOListElement()
250{
251}
252
253bool HTMLOListElement::compact() const
254{
255 if(!impl) return 0;
256 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
257}
258
259void HTMLOListElement::setCompact( bool _compact )
260{
261 if(impl)
262 {
263 DOMString str;
264 if( _compact )
265 str = "";
266 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
267 }
268}
269
270long HTMLOListElement::start() const
271{
272 if(!impl) return 0;
273 return ((ElementImpl *)impl)->getAttribute(ATTR_START).toInt();
274}
275
276void HTMLOListElement::setStart( long _start )
277{
278
279 if(impl) {
280 DOMString value(QString::number(_start));
281 ((ElementImpl *)impl)->setAttribute(ATTR_START,value);
282 }
283}
284
285DOMString HTMLOListElement::type() const
286{
287 if(!impl) return DOMString();
288 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
289}
290
291void HTMLOListElement::setType( const DOMString &value )
292{
293 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
294}
295
296// --------------------------------------------------------------------------
297
298HTMLUListElement::HTMLUListElement() : HTMLElement()
299{
300}
301
302HTMLUListElement::HTMLUListElement(const HTMLUListElement &other) : HTMLElement(other)
303{
304}
305
306HTMLUListElement::HTMLUListElement(HTMLUListElementImpl *impl) : HTMLElement(impl)
307{
308}
309
310HTMLUListElement &HTMLUListElement::operator = (const Node &other)
311{
312 assignOther( other, ID_UL );
313 return *this;
314}
315
316HTMLUListElement &HTMLUListElement::operator = (const HTMLUListElement &other)
317{
318 HTMLElement::operator = (other);
319 return *this;
320}
321
322HTMLUListElement::~HTMLUListElement()
323{
324}
325
326bool HTMLUListElement::compact() const
327{
328 if(!impl) return 0;
329 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
330}
331
332void HTMLUListElement::setCompact( bool _compact )
333{
334 if(impl)
335 {
336 DOMString str;
337 if( _compact )
338 str = "";
339 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str);
340 }
341}
342
343DOMString HTMLUListElement::type() const
344{
345 if(!impl) return DOMString();
346 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
347}
348
349void HTMLUListElement::setType( const DOMString &value )
350{
351 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
352}
353
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::HTMLDListElement
Definition list.
Definition: html_list.h:53
DOM::HTMLDListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:63
DOM::HTMLDListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:57
DOM::HTMLDListElement::HTMLDListElement
HTMLDListElement()
Definition: html_list.cpp:29
DOM::HTMLDListElement::~HTMLDListElement
~HTMLDListElement()
Definition: html_list.cpp:53
DOM::HTMLDListElement::operator=
HTMLDListElement & operator=(const HTMLDListElement &other)
Definition: html_list.cpp:47
DOM::HTMLDirectoryElement
Directory list.
Definition: html_list.h:93
DOM::HTMLDirectoryElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:110
DOM::HTMLDirectoryElement::~HTMLDirectoryElement
~HTMLDirectoryElement()
Definition: html_list.cpp:100
DOM::HTMLDirectoryElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:104
DOM::HTMLDirectoryElement::HTMLDirectoryElement
HTMLDirectoryElement()
Definition: html_list.cpp:76
DOM::HTMLDirectoryElement::operator=
HTMLDirectoryElement & operator=(const HTMLDirectoryElement &other)
Definition: html_list.cpp:94
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::HTMLLIElement
List item.
Definition: html_list.h:132
DOM::HTMLLIElement::~HTMLLIElement
~HTMLLIElement()
Definition: html_list.cpp:147
DOM::HTMLLIElement::HTMLLIElement
HTMLLIElement()
Definition: html_list.cpp:123
DOM::HTMLLIElement::value
long value() const
Reset sequence number when used in OL See the value attribute definition in HTML 4....
Definition: html_list.cpp:162
DOM::HTMLLIElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:157
DOM::HTMLLIElement::type
DOMString type() const
List item bullet style.
Definition: html_list.cpp:151
DOM::HTMLLIElement::operator=
HTMLLIElement & operator=(const HTMLLIElement &other)
Definition: html_list.cpp:141
DOM::HTMLLIElement::setValue
void setValue(long)
see value
Definition: html_list.cpp:168
DOM::HTMLMenuElement
Menu list.
Definition: html_list.h:187
DOM::HTMLMenuElement::operator=
HTMLMenuElement & operator=(const HTMLMenuElement &other)
Definition: html_list.cpp:196
DOM::HTMLMenuElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:206
DOM::HTMLMenuElement::HTMLMenuElement
HTMLMenuElement()
Definition: html_list.cpp:178
DOM::HTMLMenuElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:212
DOM::HTMLMenuElement::~HTMLMenuElement
~HTMLMenuElement()
Definition: html_list.cpp:202
DOM::HTMLOListElement
Ordered list.
Definition: html_list.h:227
DOM::HTMLOListElement::type
DOMString type() const
Numbering style.
Definition: html_list.cpp:285
DOM::HTMLOListElement::setStart
void setStart(long)
see start
Definition: html_list.cpp:276
DOM::HTMLOListElement::~HTMLOListElement
~HTMLOListElement()
Definition: html_list.cpp:249
DOM::HTMLOListElement::HTMLOListElement
HTMLOListElement()
Definition: html_list.cpp:225
DOM::HTMLOListElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:291
DOM::HTMLOListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:253
DOM::HTMLOListElement::operator=
HTMLOListElement & operator=(const HTMLOListElement &other)
Definition: html_list.cpp:243
DOM::HTMLOListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:259
DOM::HTMLOListElement::start
long start() const
Starting sequence number.
Definition: html_list.cpp:270
DOM::HTMLUListElement
Unordered list.
Definition: html_list.h:295
DOM::HTMLUListElement::type
DOMString type() const
Bullet style.
Definition: html_list.cpp:343
DOM::HTMLUListElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:349
DOM::HTMLUListElement::operator=
HTMLUListElement & operator=(const HTMLUListElement &other)
Definition: html_list.cpp:316
DOM::HTMLUListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:332
DOM::HTMLUListElement::~HTMLUListElement
~HTMLUListElement()
Definition: html_list.cpp:322
DOM::HTMLUListElement::HTMLUListElement
HTMLUListElement()
Definition: html_list.cpp:298
DOM::HTMLUListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:326
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_list.h
DOM
This library provides a full-featured HTML parser and widget.
Definition: design.h:55
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