• 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_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 
27 using namespace DOM;
28 
29 HTMLDListElement::HTMLDListElement() : HTMLElement()
30 {
31 }
32 
33 HTMLDListElement::HTMLDListElement(const HTMLDListElement &other) : HTMLElement(other)
34 {
35 }
36 
37 HTMLDListElement::HTMLDListElement(HTMLDListElementImpl *impl) : HTMLElement(impl)
38 {
39 }
40 
41 HTMLDListElement &HTMLDListElement::operator = (const Node &other)
42 {
43  assignOther( other, ID_DL );
44  return *this;
45 }
46 
47 HTMLDListElement &HTMLDListElement::operator = (const HTMLDListElement &other)
48 {
49  HTMLElement::operator = (other);
50  return *this;
51 }
52 
53 HTMLDListElement::~HTMLDListElement()
54 {
55 }
56 
57 bool HTMLDListElement::compact() const
58 {
59  if(!impl) return 0;
60  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
61 }
62 
63 void 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 
76 HTMLDirectoryElement::HTMLDirectoryElement() : HTMLElement()
77 {
78 }
79 
80 HTMLDirectoryElement::HTMLDirectoryElement(const HTMLDirectoryElement &other) : HTMLElement(other)
81 {
82 }
83 
84 HTMLDirectoryElement::HTMLDirectoryElement(HTMLDirectoryElementImpl *impl) : HTMLElement(impl)
85 {
86 }
87 
88 HTMLDirectoryElement &HTMLDirectoryElement::operator = (const Node &other)
89 {
90  assignOther( other, ID_DIR );
91  return *this;
92 }
93 
94 HTMLDirectoryElement &HTMLDirectoryElement::operator = (const HTMLDirectoryElement &other)
95 {
96  HTMLElement::operator = (other);
97  return *this;
98 }
99 
100 HTMLDirectoryElement::~HTMLDirectoryElement()
101 {
102 }
103 
104 bool HTMLDirectoryElement::compact() const
105 {
106  if(!impl) return 0;
107  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
108 }
109 
110 void 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 
123 HTMLLIElement::HTMLLIElement() : HTMLElement()
124 {
125 }
126 
127 HTMLLIElement::HTMLLIElement(const HTMLLIElement &other) : HTMLElement(other)
128 {
129 }
130 
131 HTMLLIElement::HTMLLIElement(HTMLLIElementImpl *impl) : HTMLElement(impl)
132 {
133 }
134 
135 HTMLLIElement &HTMLLIElement::operator = (const Node &other)
136 {
137  assignOther( other, ID_LI );
138  return *this;
139 }
140 
141 HTMLLIElement &HTMLLIElement::operator = (const HTMLLIElement &other)
142 {
143  HTMLElement::operator = (other);
144  return *this;
145 }
146 
147 HTMLLIElement::~HTMLLIElement()
148 {
149 }
150 
151 DOMString HTMLLIElement::type() const
152 {
153  if(!impl) return DOMString();
154  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
155 }
156 
157 void HTMLLIElement::setType( const DOMString &value )
158 {
159  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
160 }
161 
162 long HTMLLIElement::value() const
163 {
164  if(!impl) return 0;
165  return ((ElementImpl *)impl)->getAttribute(ATTR_VALUE).toInt();
166 }
167 
168 void 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 
178 HTMLMenuElement::HTMLMenuElement() : HTMLElement()
179 {
180 }
181 
182 HTMLMenuElement::HTMLMenuElement(const HTMLMenuElement &other) : HTMLElement(other)
183 {
184 }
185 
186 HTMLMenuElement::HTMLMenuElement(HTMLMenuElementImpl *impl) : HTMLElement(impl)
187 {
188 }
189 
190 HTMLMenuElement &HTMLMenuElement::operator = (const Node &other)
191 {
192  assignOther( other, ID_MENU );
193  return *this;
194 }
195 
196 HTMLMenuElement &HTMLMenuElement::operator = (const HTMLMenuElement &other)
197 {
198  HTMLElement::operator = (other);
199  return *this;
200 }
201 
202 HTMLMenuElement::~HTMLMenuElement()
203 {
204 }
205 
206 bool HTMLMenuElement::compact() const
207 {
208  if(!impl) return 0;
209  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
210 }
211 
212 void 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 
225 HTMLOListElement::HTMLOListElement() : HTMLElement()
226 {
227 }
228 
229 HTMLOListElement::HTMLOListElement(const HTMLOListElement &other) : HTMLElement(other)
230 {
231 }
232 
233 HTMLOListElement::HTMLOListElement(HTMLOListElementImpl *impl) : HTMLElement(impl)
234 {
235 }
236 
237 HTMLOListElement &HTMLOListElement::operator = (const Node &other)
238 {
239  assignOther( other, ID_OL );
240  return *this;
241 }
242 
243 HTMLOListElement &HTMLOListElement::operator = (const HTMLOListElement &other)
244 {
245  HTMLElement::operator = (other);
246  return *this;
247 }
248 
249 HTMLOListElement::~HTMLOListElement()
250 {
251 }
252 
253 bool HTMLOListElement::compact() const
254 {
255  if(!impl) return 0;
256  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
257 }
258 
259 void 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 
270 long HTMLOListElement::start() const
271 {
272  if(!impl) return 0;
273  return ((ElementImpl *)impl)->getAttribute(ATTR_START).toInt();
274 }
275 
276 void 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 
285 DOMString HTMLOListElement::type() const
286 {
287  if(!impl) return DOMString();
288  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
289 }
290 
291 void HTMLOListElement::setType( const DOMString &value )
292 {
293  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
294 }
295 
296 // --------------------------------------------------------------------------
297 
298 HTMLUListElement::HTMLUListElement() : HTMLElement()
299 {
300 }
301 
302 HTMLUListElement::HTMLUListElement(const HTMLUListElement &other) : HTMLElement(other)
303 {
304 }
305 
306 HTMLUListElement::HTMLUListElement(HTMLUListElementImpl *impl) : HTMLElement(impl)
307 {
308 }
309 
310 HTMLUListElement &HTMLUListElement::operator = (const Node &other)
311 {
312  assignOther( other, ID_UL );
313  return *this;
314 }
315 
316 HTMLUListElement &HTMLUListElement::operator = (const HTMLUListElement &other)
317 {
318  HTMLElement::operator = (other);
319  return *this;
320 }
321 
322 HTMLUListElement::~HTMLUListElement()
323 {
324 }
325 
326 bool HTMLUListElement::compact() const
327 {
328  if(!impl) return 0;
329  return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull();
330 }
331 
332 void 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 
343 DOMString HTMLUListElement::type() const
344 {
345  if(!impl) return DOMString();
346  return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE);
347 }
348 
349 void HTMLUListElement::setType( const DOMString &value )
350 {
351  if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value);
352 }
353 
DOM::HTMLLIElement::type
DOMString type() const
List item bullet style.
Definition: html_list.cpp:151
DOM::HTMLDListElement::operator=
HTMLDListElement & operator=(const HTMLDListElement &other)
Definition: html_list.cpp:47
DOM::HTMLOListElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:291
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:270
DOM::HTMLDListElement::~HTMLDListElement
~HTMLDListElement()
Definition: html_list.cpp:53
DOM::HTMLLIElement::operator=
HTMLLIElement & operator=(const HTMLLIElement &other)
Definition: html_list.cpp:141
DOM::HTMLLIElement::HTMLLIElement
HTMLLIElement()
Definition: html_list.cpp:123
DOM::HTMLDirectoryElement
Directory list.
Definition: html_list.h:92
DOM::HTMLOListElement::operator=
HTMLOListElement & operator=(const HTMLOListElement &other)
Definition: html_list.cpp:243
DOM::HTMLMenuElement::operator=
HTMLMenuElement & operator=(const HTMLMenuElement &other)
Definition: html_list.cpp:196
DOM::HTMLOListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:259
DOM::HTMLLIElement::~HTMLLIElement
~HTMLLIElement()
Definition: html_list.cpp:147
DOM::HTMLLIElement
List item.
Definition: html_list.h:131
DOM::HTMLDListElement::HTMLDListElement
HTMLDListElement()
Definition: html_list.cpp:29
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::HTMLUListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:332
DOM::HTMLUListElement::type
DOMString type() const
Bullet style.
Definition: html_list.cpp:343
DOM::HTMLUListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:326
DOM::HTMLOListElement::type
DOMString type() const
Numbering style.
Definition: html_list.cpp:285
DOM::HTMLDirectoryElement::operator=
HTMLDirectoryElement & operator=(const HTMLDirectoryElement &other)
Definition: html_list.cpp:94
DOM::HTMLUListElement::HTMLUListElement
HTMLUListElement()
Definition: html_list.cpp:298
DOM::HTMLLIElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:157
DOM::HTMLDirectoryElement::~HTMLDirectoryElement
~HTMLDirectoryElement()
Definition: html_list.cpp:100
DOM::HTMLOListElement
Ordered list.
Definition: html_list.h:226
DOM::HTMLOListElement::~HTMLOListElement
~HTMLOListElement()
Definition: html_list.cpp:249
DOM::HTMLUListElement::setType
void setType(const DOMString &)
see type
Definition: html_list.cpp:349
DOM::HTMLUListElement::~HTMLUListElement
~HTMLUListElement()
Definition: html_list.cpp:322
DOM::HTMLDListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:57
DOM::HTMLLIElement::setValue
void setValue(long)
see value
Definition: html_list.cpp:168
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::HTMLMenuElement
Menu list.
Definition: html_list.h:186
DOM::HTMLDListElement
Definition list.
Definition: html_list.h:52
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
DOM::HTMLMenuElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:212
DOM::HTMLDirectoryElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:110
DOM::HTMLOListElement::HTMLOListElement
HTMLOListElement()
Definition: html_list.cpp:225
DOM::HTMLElement::operator=
HTMLElement & operator=(const HTMLElement &other)
Definition: html_element.cpp:41
DOM::HTMLOListElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:253
DOM::HTMLMenuElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:206
DOM::HTMLOListElement::start
long start() const
Starting sequence number.
Definition: html_list.cpp:270
DOM::HTMLMenuElement::~HTMLMenuElement
~HTMLMenuElement()
Definition: html_list.cpp:202
DOM::HTMLElement::assignOther
void assignOther(const Node &other, int elementId)
Definition: html_element.cpp:176
DOM::HTMLMenuElement::HTMLMenuElement
HTMLMenuElement()
Definition: html_list.cpp:178
DOM::HTMLDirectoryElement::compact
bool compact() const
Reduce spacing between list items.
Definition: html_list.cpp:104
html_list.h
DOM::HTMLDirectoryElement::HTMLDirectoryElement
HTMLDirectoryElement()
Definition: html_list.cpp:76
DOM::HTMLOListElement::setStart
void setStart(long)
see start
Definition: html_list.cpp:276
DOM::HTMLUListElement
Unordered list.
Definition: html_list.h:294
DOM::HTMLElement
All HTML element interfaces derive from this class.
Definition: html_element.h:69
DOM::HTMLUListElement::operator=
HTMLUListElement & operator=(const HTMLUListElement &other)
Definition: html_list.cpp:316
DOM::HTMLDListElement::setCompact
void setCompact(bool)
see compact
Definition: html_list.cpp:63
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