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

KHTML

  • khtml
  • dom
html_table.cpp
Go to the documentation of this file.
1
22// --------------------------------------------------------------------------
23
24#include "html_table.h"
25#include "html_misc.h"
26#include "dom_exception.h"
27
28#include <html/html_miscimpl.h>
29#include <html/html_tableimpl.h>
30
31using namespace DOM;
32
33HTMLTableCaptionElement::HTMLTableCaptionElement() : HTMLElement()
34{
35}
36
37HTMLTableCaptionElement::HTMLTableCaptionElement(const HTMLTableCaptionElement &other) : HTMLElement(other)
38{
39}
40
41HTMLTableCaptionElement::HTMLTableCaptionElement(HTMLTableCaptionElementImpl *impl) : HTMLElement(impl)
42{
43}
44
45HTMLTableCaptionElement &HTMLTableCaptionElement::operator = (const Node &other)
46{
47 assignOther( other, ID_CAPTION );
48 return *this;
49}
50
51HTMLTableCaptionElement &HTMLTableCaptionElement::operator = (const HTMLTableCaptionElement &other)
52{
53 HTMLElement::operator = (other);
54 return *this;
55}
56
57HTMLTableCaptionElement::~HTMLTableCaptionElement()
58{
59}
60
61DOMString HTMLTableCaptionElement::align() const
62{
63 if(!impl) return DOMString();
64 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
65}
66
67void HTMLTableCaptionElement::setAlign( const DOMString &value )
68{
69 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
70}
71
72// --------------------------------------------------------------------------
73
74HTMLTableCellElement::HTMLTableCellElement() : HTMLElement()
75{
76}
77
78HTMLTableCellElement::HTMLTableCellElement(const HTMLTableCellElement &other) : HTMLElement(other)
79{
80}
81
82HTMLTableCellElement::HTMLTableCellElement(HTMLTableCellElementImpl *impl) : HTMLElement(impl)
83{
84}
85
86HTMLTableCellElement &HTMLTableCellElement::operator = (const Node &other)
87{
88 if( other.elementId() != ID_TD &&
89 other.elementId() != ID_TH )
90 {
91 if ( impl ) impl->deref();
92 impl = 0;
93 } else {
94 Node::operator = (other);
95 }
96 return *this;
97}
98
99HTMLTableCellElement &HTMLTableCellElement::operator = (const HTMLTableCellElement &other)
100{
101 HTMLElement::operator = (other);
102 return *this;
103}
104
105HTMLTableCellElement::~HTMLTableCellElement()
106{
107}
108
109long HTMLTableCellElement::cellIndex() const
110{
111 if(!impl) return 0;
112 return ((HTMLTableCellElementImpl *)impl)->cellIndex();
113}
114
115void HTMLTableCellElement::setCellIndex( long /*_cellIndex*/ )
116{
117 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
118}
119
120DOMString HTMLTableCellElement::abbr() const
121{
122 if(!impl) return DOMString();
123 return ((ElementImpl *)impl)->getAttribute(ATTR_ABBR);
124}
125
126void HTMLTableCellElement::setAbbr( const DOMString &value )
127{
128 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ABBR, value);
129}
130
131DOMString HTMLTableCellElement::align() const
132{
133 if(!impl) return DOMString();
134 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
135}
136
137void HTMLTableCellElement::setAlign( const DOMString &value )
138{
139 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
140}
141
142DOMString HTMLTableCellElement::axis() const
143{
144 if(!impl) return DOMString();
145 return ((ElementImpl *)impl)->getAttribute(ATTR_AXIS);
146}
147
148void HTMLTableCellElement::setAxis( const DOMString &value )
149{
150 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_AXIS, value);
151}
152
153DOMString HTMLTableCellElement::bgColor() const
154{
155 if(!impl) return DOMString();
156 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
157}
158
159void HTMLTableCellElement::setBgColor( const DOMString &value )
160{
161 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
162}
163
164DOMString HTMLTableCellElement::ch() const
165{
166 if(!impl) return DOMString();
167 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
168}
169
170void HTMLTableCellElement::setCh( const DOMString &value )
171{
172 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
173}
174
175DOMString HTMLTableCellElement::chOff() const
176{
177 if(!impl) return DOMString();
178 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
179}
180
181void HTMLTableCellElement::setChOff( const DOMString &value )
182{
183 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
184}
185
186long HTMLTableCellElement::colSpan() const
187{
188 if(!impl) return 0;
189 return ((ElementImpl *)impl)->getAttribute(ATTR_COLSPAN).toInt();
190}
191
192void HTMLTableCellElement::setColSpan( long _colSpan )
193{
194 if(impl) {
195 DOMString value(QString::number(_colSpan));
196 ((ElementImpl *)impl)->setAttribute(ATTR_COLSPAN,value);
197 }
198}
199
200DOMString HTMLTableCellElement::headers() const
201{
202 if(!impl) return DOMString();
203 return ((ElementImpl *)impl)->getAttribute(ATTR_HEADERS);
204}
205
206void HTMLTableCellElement::setHeaders( const DOMString &value )
207{
208 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEADERS, value);
209}
210
211DOMString HTMLTableCellElement::height() const
212{
213 if(!impl) return DOMString();
214 return ((ElementImpl *)impl)->getAttribute(ATTR_HEIGHT);
215}
216
217void HTMLTableCellElement::setHeight( const DOMString &value )
218{
219 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_HEIGHT, value);
220}
221
222bool HTMLTableCellElement::noWrap() const
223{
224 if(!impl) return false;
225 return !((ElementImpl *)impl)->getAttribute(ATTR_NOWRAP).isNull();
226}
227
228void HTMLTableCellElement::setNoWrap( bool _noWrap )
229{
230 if(impl)
231 ((ElementImpl *)impl)->setAttribute(ATTR_NOWRAP, _noWrap ? "" : 0);
232}
233
234long HTMLTableCellElement::rowSpan() const
235{
236 if(!impl) return 0;
237 return ((ElementImpl *)impl)->getAttribute(ATTR_ROWSPAN).toInt();
238}
239
240void HTMLTableCellElement::setRowSpan( long _rowSpan )
241{
242 if(impl) {
243 DOMString value(QString::number(_rowSpan));
244 ((ElementImpl *)impl)->setAttribute(ATTR_ROWSPAN,value);
245 }
246}
247
248DOMString HTMLTableCellElement::scope() const
249{
250 if(!impl) return DOMString();
251 return ((ElementImpl *)impl)->getAttribute(ATTR_SCOPE);
252}
253
254void HTMLTableCellElement::setScope( const DOMString &value )
255{
256 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SCOPE, value);
257}
258
259DOMString HTMLTableCellElement::vAlign() const
260{
261 if(!impl) return DOMString();
262 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
263}
264
265void HTMLTableCellElement::setVAlign( const DOMString &value )
266{
267 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
268}
269
270DOMString HTMLTableCellElement::width() const
271{
272 if(!impl) return DOMString();
273 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
274}
275
276void HTMLTableCellElement::setWidth( const DOMString &value )
277{
278 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
279}
280
281// --------------------------------------------------------------------------
282
283HTMLTableColElement::HTMLTableColElement() : HTMLElement()
284{
285}
286
287HTMLTableColElement::HTMLTableColElement(const HTMLTableColElement &other) : HTMLElement(other)
288{
289}
290
291HTMLTableColElement::HTMLTableColElement(HTMLTableColElementImpl *impl) : HTMLElement(impl)
292{
293}
294
295HTMLTableColElement &HTMLTableColElement::operator = (const Node &other)
296{
297 if( other.elementId() != ID_COL &&
298 other.elementId() != ID_COLGROUP )
299 {
300 if ( impl ) impl->deref();
301 impl = 0;
302 } else {
303 Node::operator = (other);
304 }
305 return *this;
306}
307
308HTMLTableColElement &HTMLTableColElement::operator = (const HTMLTableColElement &other)
309{
310 HTMLElement::operator = (other);
311 return *this;
312}
313
314HTMLTableColElement::~HTMLTableColElement()
315{
316}
317
318DOMString HTMLTableColElement::align() const
319{
320 if(!impl) return DOMString();
321 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
322}
323
324void HTMLTableColElement::setAlign( const DOMString &value )
325{
326 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
327}
328
329DOMString HTMLTableColElement::ch() const
330{
331 if(!impl) return DOMString();
332 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
333}
334
335void HTMLTableColElement::setCh( const DOMString &value )
336{
337 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
338}
339
340DOMString HTMLTableColElement::chOff() const
341{
342 if(!impl) return DOMString();
343 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
344}
345
346void HTMLTableColElement::setChOff( const DOMString &value )
347{
348 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
349}
350
351long HTMLTableColElement::span() const
352{
353 if(!impl) return 0;
354 return ((ElementImpl *)impl)->getAttribute(ATTR_SPAN).toInt();
355}
356
357void HTMLTableColElement::setSpan( long _span )
358{
359 if(impl) {
360 DOMString value(QString::number(_span));
361 ((ElementImpl *)impl)->setAttribute(ATTR_SPAN,value);
362 }
363}
364
365DOMString HTMLTableColElement::vAlign() const
366{
367 if(!impl) return DOMString();
368 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
369}
370
371void HTMLTableColElement::setVAlign( const DOMString &value )
372{
373 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
374}
375
376DOMString HTMLTableColElement::width() const
377{
378 if(!impl) return DOMString();
379 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
380}
381
382void HTMLTableColElement::setWidth( const DOMString &value )
383{
384 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
385}
386
387// --------------------------------------------------------------------------
388
389HTMLTableElement::HTMLTableElement() : HTMLElement()
390{
391}
392
393HTMLTableElement::HTMLTableElement(const HTMLTableElement &other) : HTMLElement(other)
394{
395}
396
397HTMLTableElement::HTMLTableElement(HTMLTableElementImpl *impl) : HTMLElement(impl)
398{
399}
400
401HTMLTableElement &HTMLTableElement::operator = (const Node &other)
402{
403 assignOther( other, ID_TABLE );
404 return *this;
405}
406
407HTMLTableElement &HTMLTableElement::operator = (const HTMLTableElement &other)
408{
409 HTMLElement::operator = (other);
410 return *this;
411}
412
413HTMLTableElement::~HTMLTableElement()
414{
415}
416
417HTMLTableCaptionElement HTMLTableElement::caption() const
418{
419 if(!impl) return 0;
420 return ((HTMLTableElementImpl *)impl)->caption();
421}
422
423void HTMLTableElement::setCaption( const HTMLTableCaptionElement &_caption )
424{
425 if(impl)
426 ((HTMLTableElementImpl *)impl)
427 ->setCaption( ((HTMLTableCaptionElementImpl *)_caption.impl) );
428}
429
430HTMLTableSectionElement HTMLTableElement::tHead() const
431{
432 if(!impl) return 0;
433 return ((HTMLTableElementImpl *)impl)->tHead();
434}
435
436void HTMLTableElement::setTHead( const HTMLTableSectionElement &_tHead )
437{
438
439 if(impl)
440 ((HTMLTableElementImpl *)impl)
441 ->setTHead( ((HTMLTableSectionElementImpl *)_tHead.impl) );
442}
443
444HTMLTableSectionElement HTMLTableElement::tFoot() const
445{
446 if(!impl) return 0;
447 return ((HTMLTableElementImpl *)impl)->tFoot();
448}
449
450void HTMLTableElement::setTFoot( const HTMLTableSectionElement &_tFoot )
451{
452
453 if(impl)
454 ((HTMLTableElementImpl *)impl)
455 ->setTFoot( ((HTMLTableSectionElementImpl *)_tFoot.impl) );
456}
457
458HTMLCollection HTMLTableElement::rows() const
459{
460 if(!impl) return HTMLCollection();
461 return HTMLCollection(impl, HTMLCollectionImpl::TABLE_ROWS);
462}
463
464HTMLCollection HTMLTableElement::tBodies() const
465{
466 if(!impl) return HTMLCollection();
467 return HTMLCollection(impl, HTMLCollectionImpl::TABLE_TBODIES);
468}
469
470DOMString HTMLTableElement::align() const
471{
472 if(!impl) return DOMString();
473 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
474}
475
476void HTMLTableElement::setAlign( const DOMString &value )
477{
478 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
479}
480
481DOMString HTMLTableElement::bgColor() const
482{
483 if(!impl) return DOMString();
484 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
485}
486
487void HTMLTableElement::setBgColor( const DOMString &value )
488{
489 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
490}
491
492DOMString HTMLTableElement::border() const
493{
494 if(!impl) return DOMString();
495 return ((ElementImpl *)impl)->getAttribute(ATTR_BORDER);
496}
497
498void HTMLTableElement::setBorder( const DOMString &value )
499{
500 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BORDER, value);
501}
502
503DOMString HTMLTableElement::cellPadding() const
504{
505 if(!impl) return DOMString();
506 return ((ElementImpl *)impl)->getAttribute(ATTR_CELLPADDING);
507}
508
509void HTMLTableElement::setCellPadding( const DOMString &value )
510{
511 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLPADDING, value);
512}
513
514DOMString HTMLTableElement::cellSpacing() const
515{
516 if(!impl) return DOMString();
517 return ((ElementImpl *)impl)->getAttribute(ATTR_CELLSPACING);
518}
519
520void HTMLTableElement::setCellSpacing( const DOMString &value )
521{
522 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CELLSPACING, value);
523}
524
525DOMString HTMLTableElement::frame() const
526{
527 if(!impl) return DOMString();
528 return ((ElementImpl *)impl)->getAttribute(ATTR_FRAME);
529}
530
531void HTMLTableElement::setFrame( const DOMString &value )
532{
533 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_FRAME, value);
534}
535
536DOMString HTMLTableElement::rules() const
537{
538 if(!impl) return DOMString();
539 return ((ElementImpl *)impl)->getAttribute(ATTR_RULES);
540}
541
542void HTMLTableElement::setRules( const DOMString &value )
543{
544 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_RULES, value);
545}
546
547DOMString HTMLTableElement::summary() const
548{
549 if(!impl) return DOMString();
550 return ((ElementImpl *)impl)->getAttribute(ATTR_SUMMARY);
551}
552
553void HTMLTableElement::setSummary( const DOMString &value )
554{
555 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_SUMMARY, value);
556}
557
558DOMString HTMLTableElement::width() const
559{
560 if(!impl) return DOMString();
561 return ((ElementImpl *)impl)->getAttribute(ATTR_WIDTH);
562}
563
564void HTMLTableElement::setWidth( const DOMString &value )
565{
566 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_WIDTH, value);
567}
568
569HTMLElement HTMLTableElement::createTHead( )
570{
571 if(!impl) return 0;
572 return ((HTMLTableElementImpl *)impl)->createTHead( );
573}
574
575void HTMLTableElement::deleteTHead( )
576{
577 if(impl)
578 ((HTMLTableElementImpl *)impl)->deleteTHead( );
579}
580
581HTMLElement HTMLTableElement::createTFoot( )
582{
583 if(!impl) return 0;
584 return ((HTMLTableElementImpl *)impl)->createTFoot( );
585}
586
587void HTMLTableElement::deleteTFoot( )
588{
589 if(impl)
590 ((HTMLTableElementImpl *)impl)->deleteTFoot( );
591}
592
593HTMLElement HTMLTableElement::createCaption( )
594{
595 if(!impl) return 0;
596 return ((HTMLTableElementImpl *)impl)->createCaption( );
597}
598
599void HTMLTableElement::deleteCaption( )
600{
601 if(impl)
602 ((HTMLTableElementImpl *)impl)->deleteCaption( );
603}
604
605HTMLElement HTMLTableElement::insertRow( long index )
606{
607 if(!impl) return 0;
608 int exceptioncode = 0;
609 HTMLElementImpl* ret = ((HTMLTableElementImpl *)impl)->insertRow( index, exceptioncode );
610 if (exceptioncode)
611 throw DOMException(exceptioncode);
612 return ret;
613}
614
615void HTMLTableElement::deleteRow( long index )
616{
617 int exceptioncode = 0;
618 if(impl)
619 ((HTMLTableElementImpl *)impl)->deleteRow( index, exceptioncode );
620 if (exceptioncode)
621 throw DOMException(exceptioncode);
622}
623
624// --------------------------------------------------------------------------
625
626HTMLTableRowElement::HTMLTableRowElement() : HTMLElement()
627{
628}
629
630HTMLTableRowElement::HTMLTableRowElement(const HTMLTableRowElement &other) : HTMLElement(other)
631{
632}
633
634HTMLTableRowElement::HTMLTableRowElement(HTMLTableRowElementImpl *impl) : HTMLElement(impl)
635{
636}
637
638HTMLTableRowElement &HTMLTableRowElement::operator = (const Node &other)
639{
640 assignOther( other, ID_TR );
641 return *this;
642}
643
644HTMLTableRowElement &HTMLTableRowElement::operator = (const HTMLTableRowElement &other)
645{
646 HTMLElement::operator = (other);
647 return *this;
648}
649
650HTMLTableRowElement::~HTMLTableRowElement()
651{
652}
653
654long HTMLTableRowElement::rowIndex() const
655{
656 if(!impl) return 0;
657 return ((HTMLTableRowElementImpl *)impl)->rowIndex();
658}
659
660void HTMLTableRowElement::setRowIndex( long /*_rowIndex*/ )
661{
662 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
663}
664
665long HTMLTableRowElement::sectionRowIndex() const
666{
667 if(!impl) return 0;
668 return ((HTMLTableRowElementImpl *)impl)->sectionRowIndex();
669}
670
671void HTMLTableRowElement::setSectionRowIndex( long /*_sectionRowIndex*/ )
672{
673 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
674}
675
676HTMLCollection HTMLTableRowElement::cells() const
677{
678 if(!impl) return HTMLCollection();
679 return HTMLCollection(impl, HTMLCollectionImpl::TR_CELLS);
680}
681
682void HTMLTableRowElement::setCells( const HTMLCollection & /*_cells*/ )
683{
684 throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);
685}
686
687DOMString HTMLTableRowElement::align() const
688{
689 if(!impl) return DOMString();
690 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
691}
692
693void HTMLTableRowElement::setAlign( const DOMString &value )
694{
695 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
696}
697
698DOMString HTMLTableRowElement::bgColor() const
699{
700 if(!impl) return DOMString();
701 return ((ElementImpl *)impl)->getAttribute(ATTR_BGCOLOR);
702}
703
704void HTMLTableRowElement::setBgColor( const DOMString &value )
705{
706 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_BGCOLOR, value);
707}
708
709DOMString HTMLTableRowElement::ch() const
710{
711 if(!impl) return DOMString();
712 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
713}
714
715void HTMLTableRowElement::setCh( const DOMString &value )
716{
717 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
718}
719
720DOMString HTMLTableRowElement::chOff() const
721{
722 if(!impl) return DOMString();
723 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
724}
725
726void HTMLTableRowElement::setChOff( const DOMString &value )
727{
728 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
729}
730
731DOMString HTMLTableRowElement::vAlign() const
732{
733 if(!impl) return DOMString();
734 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
735}
736
737void HTMLTableRowElement::setVAlign( const DOMString &value )
738{
739 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
740}
741
742HTMLElement HTMLTableRowElement::insertCell( long index )
743{
744 if(!impl) return 0;
745 int exceptioncode = 0;
746 HTMLElementImpl* ret = ((HTMLTableRowElementImpl *)impl)->insertCell( index, exceptioncode );
747 if (exceptioncode)
748 throw DOMException(exceptioncode);
749 return ret;
750}
751
752void HTMLTableRowElement::deleteCell( long index )
753{
754 int exceptioncode = 0;
755 if(impl)
756 ((HTMLTableRowElementImpl *)impl)->deleteCell( index, exceptioncode );
757 if (exceptioncode)
758 throw DOMException(exceptioncode);
759}
760
761// --------------------------------------------------------------------------
762
763HTMLTableSectionElement::HTMLTableSectionElement() : HTMLElement()
764{
765}
766
767HTMLTableSectionElement::HTMLTableSectionElement(const HTMLTableSectionElement &other) : HTMLElement(other)
768{
769}
770
771HTMLTableSectionElement::HTMLTableSectionElement(HTMLTableSectionElementImpl *impl) : HTMLElement(impl)
772{
773}
774
775HTMLTableSectionElement &HTMLTableSectionElement::operator = (const Node &other)
776{
777 if(other.elementId() != ID_TBODY &&
778 other.elementId() != ID_THEAD &&
779 other.elementId() != ID_TFOOT )
780 {
781 if ( impl ) impl->deref();
782 impl = 0;
783 } else {
784 Node::operator = (other);
785 }
786 return *this;
787}
788
789HTMLTableSectionElement &HTMLTableSectionElement::operator = (const HTMLTableSectionElement &other)
790{
791 HTMLElement::operator = (other);
792 return *this;
793}
794
795HTMLTableSectionElement::~HTMLTableSectionElement()
796{
797}
798
799DOMString HTMLTableSectionElement::align() const
800{
801 if(!impl) return DOMString();
802 return ((ElementImpl *)impl)->getAttribute(ATTR_ALIGN);
803}
804
805void HTMLTableSectionElement::setAlign( const DOMString &value )
806{
807 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_ALIGN, value);
808}
809
810DOMString HTMLTableSectionElement::ch() const
811{
812 if(!impl) return DOMString();
813 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAR);
814}
815
816void HTMLTableSectionElement::setCh( const DOMString &value )
817{
818 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAR, value);
819}
820
821DOMString HTMLTableSectionElement::chOff() const
822{
823 if(!impl) return DOMString();
824 return ((ElementImpl *)impl)->getAttribute(ATTR_CHAROFF);
825}
826
827void HTMLTableSectionElement::setChOff( const DOMString &value )
828{
829 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_CHAROFF, value);
830}
831
832DOMString HTMLTableSectionElement::vAlign() const
833{
834 if(!impl) return DOMString();
835 return ((ElementImpl *)impl)->getAttribute(ATTR_VALIGN);
836}
837
838void HTMLTableSectionElement::setVAlign( const DOMString &value )
839{
840 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_VALIGN, value);
841}
842
843HTMLCollection HTMLTableSectionElement::rows() const
844{
845 if(!impl) return HTMLCollection();
846 return HTMLCollection(impl, HTMLCollectionImpl::TSECTION_ROWS);
847}
848
849HTMLElement HTMLTableSectionElement::insertRow( long index )
850{
851 if(!impl) return 0;
852 int exceptioncode = 0;
853 HTMLElementImpl* ret = ((HTMLTableSectionElementImpl *)impl)->insertRow( index, exceptioncode );
854 if (exceptioncode)
855 throw DOMException(exceptioncode);
856 return ret;
857}
858
859void HTMLTableSectionElement::deleteRow( long index )
860{
861 int exceptioncode = 0;
862 if(impl)
863 ((HTMLTableSectionElementImpl *)impl)->deleteRow( index, exceptioncode );
864 if (exceptioncode)
865 throw DOMException(exceptioncode);
866}
867
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:59
DOM::DOMException::NO_MODIFICATION_ALLOWED_ERR
@ NO_MODIFICATION_ALLOWED_ERR
Definition: dom_exception.h:79
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::HTMLCollection
An HTMLCollection is a list of nodes.
Definition: html_misc.h:131
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::HTMLTableCaptionElement
Table caption See the CAPTION element definition in HTML 4.0.
Definition: html_table.h:48
DOM::HTMLTableCaptionElement::align
DOMString align() const
Caption alignment with respect to the table.
Definition: html_table.cpp:61
DOM::HTMLTableCaptionElement::~HTMLTableCaptionElement
~HTMLTableCaptionElement()
Definition: html_table.cpp:57
DOM::HTMLTableCaptionElement::HTMLTableCaptionElement
HTMLTableCaptionElement()
Definition: html_table.cpp:33
DOM::HTMLTableCaptionElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_table.cpp:67
DOM::HTMLTableCaptionElement::operator=
HTMLTableCaptionElement & operator=(const HTMLTableCaptionElement &other)
Definition: html_table.cpp:51
DOM::HTMLTableCellElement
The object used to represent the TH and TD elements.
Definition: html_table.h:92
DOM::HTMLTableCellElement::height
DOMString height() const
Cell height.
Definition: html_table.cpp:211
DOM::HTMLTableCellElement::setColSpan
void setColSpan(long)
see colSpan
Definition: html_table.cpp:192
DOM::HTMLTableCellElement::axis
DOMString axis() const
Names group of related headers.
Definition: html_table.cpp:142
DOM::HTMLTableCellElement::vAlign
DOMString vAlign() const
Vertical alignment of data in cell.
Definition: html_table.cpp:259
DOM::HTMLTableCellElement::chOff
DOMString chOff() const
Offset of alignment character.
Definition: html_table.cpp:175
DOM::HTMLTableCellElement::setCellIndex
void setCellIndex(long)
see cellIndex
Definition: html_table.cpp:115
DOM::HTMLTableCellElement::setHeight
void setHeight(const DOMString &)
see height
Definition: html_table.cpp:217
DOM::HTMLTableCellElement::setHeaders
void setHeaders(const DOMString &)
see headers
Definition: html_table.cpp:206
DOM::HTMLTableCellElement::setVAlign
void setVAlign(const DOMString &)
see vAlign
Definition: html_table.cpp:265
DOM::HTMLTableCellElement::setBgColor
void setBgColor(const DOMString &)
see bgColor
Definition: html_table.cpp:159
DOM::HTMLTableCellElement::setAbbr
void setAbbr(const DOMString &)
see abbr
Definition: html_table.cpp:126
DOM::HTMLTableCellElement::cellIndex
long cellIndex() const
The index of this cell in the row.
Definition: html_table.cpp:109
DOM::HTMLTableCellElement::headers
DOMString headers() const
List of id attribute values for header cells.
Definition: html_table.cpp:200
DOM::HTMLTableCellElement::setScope
void setScope(const DOMString &)
see scope
Definition: html_table.cpp:254
DOM::HTMLTableCellElement::HTMLTableCellElement
HTMLTableCellElement()
Definition: html_table.cpp:74
DOM::HTMLTableCellElement::setChOff
void setChOff(const DOMString &)
see chOff
Definition: html_table.cpp:181
DOM::HTMLTableCellElement::rowSpan
long rowSpan() const
Number of rows spanned by cell.
Definition: html_table.cpp:234
DOM::HTMLTableCellElement::ch
DOMString ch() const
Alignment character for cells in a column.
Definition: html_table.cpp:164
DOM::HTMLTableCellElement::width
DOMString width() const
Cell width.
Definition: html_table.cpp:270
DOM::HTMLTableCellElement::operator=
HTMLTableCellElement & operator=(const HTMLTableCellElement &other)
Definition: html_table.cpp:99
DOM::HTMLTableCellElement::setNoWrap
void setNoWrap(bool)
see noWrap
Definition: html_table.cpp:228
DOM::HTMLTableCellElement::setCh
void setCh(const DOMString &)
see ch
Definition: html_table.cpp:170
DOM::HTMLTableCellElement::~HTMLTableCellElement
~HTMLTableCellElement()
Definition: html_table.cpp:105
DOM::HTMLTableCellElement::noWrap
bool noWrap() const
Suppress word wrapping.
Definition: html_table.cpp:222
DOM::HTMLTableCellElement::abbr
DOMString abbr() const
Abbreviation for header cells.
Definition: html_table.cpp:120
DOM::HTMLTableCellElement::align
DOMString align() const
Horizontal alignment of data in cell.
Definition: html_table.cpp:131
DOM::HTMLTableCellElement::setWidth
void setWidth(const DOMString &)
see width
Definition: html_table.cpp:276
DOM::HTMLTableCellElement::setAxis
void setAxis(const DOMString &)
see axis
Definition: html_table.cpp:148
DOM::HTMLTableCellElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_table.cpp:137
DOM::HTMLTableCellElement::setRowSpan
void setRowSpan(long)
see rowSpan
Definition: html_table.cpp:240
DOM::HTMLTableCellElement::bgColor
DOMString bgColor() const
Cell background color.
Definition: html_table.cpp:153
DOM::HTMLTableCellElement::colSpan
long colSpan() const
Number of columns spanned by cell.
Definition: html_table.cpp:186
DOM::HTMLTableCellElement::scope
DOMString scope() const
Scope covered by header cells.
Definition: html_table.cpp:248
DOM::HTMLTableColElement
Regroups the COL and COLGROUP elements.
Definition: html_table.h:323
DOM::HTMLTableColElement::~HTMLTableColElement
~HTMLTableColElement()
Definition: html_table.cpp:314
DOM::HTMLTableColElement::width
DOMString width() const
Default column width.
Definition: html_table.cpp:376
DOM::HTMLTableColElement::setChOff
void setChOff(const DOMString &)
see chOff
Definition: html_table.cpp:346
DOM::HTMLTableColElement::operator=
HTMLTableColElement & operator=(const HTMLTableColElement &other)
Definition: html_table.cpp:308
DOM::HTMLTableColElement::setWidth
void setWidth(const DOMString &)
see width
Definition: html_table.cpp:382
DOM::HTMLTableColElement::setVAlign
void setVAlign(const DOMString &)
see vAlign
Definition: html_table.cpp:371
DOM::HTMLTableColElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_table.cpp:324
DOM::HTMLTableColElement::align
DOMString align() const
Horizontal alignment of cell data in column.
Definition: html_table.cpp:318
DOM::HTMLTableColElement::span
long span() const
Indicates the number of columns in a group or affected by a grouping.
Definition: html_table.cpp:351
DOM::HTMLTableColElement::setSpan
void setSpan(long)
see span
Definition: html_table.cpp:357
DOM::HTMLTableColElement::chOff
DOMString chOff() const
Offset of alignment character.
Definition: html_table.cpp:340
DOM::HTMLTableColElement::ch
DOMString ch() const
Alignment character for cells in a column.
Definition: html_table.cpp:329
DOM::HTMLTableColElement::vAlign
DOMString vAlign() const
Vertical alignment of cell data in column.
Definition: html_table.cpp:365
DOM::HTMLTableColElement::HTMLTableColElement
HTMLTableColElement()
Definition: html_table.cpp:283
DOM::HTMLTableColElement::setCh
void setCh(const DOMString &)
see ch
Definition: html_table.cpp:335
DOM::HTMLTableElement
The create* and delete* methods on the table allow authors to construct and modify tables.
Definition: html_table.h:442
DOM::HTMLTableElement::tFoot
HTMLTableSectionElement tFoot() const
Returns the table's TFOOT , or null if none exists.
Definition: html_table.cpp:444
DOM::HTMLTableElement::deleteTFoot
void deleteTFoot()
Delete the footer from the table, if one exists.
Definition: html_table.cpp:587
DOM::HTMLTableElement::insertRow
HTMLElement insertRow(long index)
Insert a new empty row in the table.
Definition: html_table.cpp:605
DOM::HTMLTableElement::caption
HTMLTableCaptionElement caption() const
Returns the table's CAPTION , or void if none exists.
Definition: html_table.cpp:417
DOM::HTMLTableElement::createTHead
HTMLElement createTHead()
Create a table header row or return an existing one.
Definition: html_table.cpp:569
DOM::HTMLTableElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_table.cpp:476
DOM::HTMLTableElement::setBorder
void setBorder(const DOMString &)
see border
Definition: html_table.cpp:498
DOM::HTMLTableElement::setFrame
void setFrame(const DOMString &)
see frame
Definition: html_table.cpp:531
DOM::HTMLTableElement::setCellPadding
void setCellPadding(const DOMString &)
see cellPadding
Definition: html_table.cpp:509
DOM::HTMLTableElement::setSummary
void setSummary(const DOMString &)
see summary
Definition: html_table.cpp:553
DOM::HTMLTableElement::setCellSpacing
void setCellSpacing(const DOMString &)
see cellSpacing
Definition: html_table.cpp:520
DOM::HTMLTableElement::summary
DOMString summary() const
Supplementary description about the purpose or structure of a table.
Definition: html_table.cpp:547
DOM::HTMLTableElement::setRules
void setRules(const DOMString &)
see rules
Definition: html_table.cpp:542
DOM::HTMLTableElement::rows
HTMLCollection rows() const
Returns a collection of all the rows in the table, including all in THEAD , TFOOT ,...
Definition: html_table.cpp:458
DOM::HTMLTableElement::bgColor
DOMString bgColor() const
Cell background color.
Definition: html_table.cpp:481
DOM::HTMLTableElement::frame
DOMString frame() const
Specifies which external table borders to render.
Definition: html_table.cpp:525
DOM::HTMLTableElement::tBodies
HTMLCollection tBodies() const
Returns a collection of the table bodies (including implicit ones).
Definition: html_table.cpp:464
DOM::HTMLTableElement::deleteRow
void deleteRow(long index)
Delete a table row.
Definition: html_table.cpp:615
DOM::HTMLTableElement::setBgColor
void setBgColor(const DOMString &)
see bgColor
Definition: html_table.cpp:487
DOM::HTMLTableElement::cellPadding
DOMString cellPadding() const
Specifies the horizontal and vertical space between cell content and cell borders.
Definition: html_table.cpp:503
DOM::HTMLTableElement::createCaption
HTMLElement createCaption()
Create a new table caption object or return an existing one.
Definition: html_table.cpp:593
DOM::HTMLTableElement::createTFoot
HTMLElement createTFoot()
Create a table footer row or return an existing one.
Definition: html_table.cpp:581
DOM::HTMLTableElement::rules
DOMString rules() const
Specifies which internal table borders to render.
Definition: html_table.cpp:536
DOM::HTMLTableElement::setCaption
void setCaption(const HTMLTableCaptionElement &)
see caption
Definition: html_table.cpp:423
DOM::HTMLTableElement::deleteCaption
void deleteCaption()
Delete the table caption, if one exists.
Definition: html_table.cpp:599
DOM::HTMLTableElement::operator=
HTMLTableElement & operator=(const HTMLTableElement &other)
Definition: html_table.cpp:407
DOM::HTMLTableElement::setTFoot
void setTFoot(const HTMLTableSectionElement &)
see tFoot
Definition: html_table.cpp:450
DOM::HTMLTableElement::HTMLTableElement
HTMLTableElement()
Definition: html_table.cpp:389
DOM::HTMLTableElement::width
DOMString width() const
Specifies the desired table width.
Definition: html_table.cpp:558
DOM::HTMLTableElement::tHead
HTMLTableSectionElement tHead() const
Returns the table's THEAD , or null if none exists.
Definition: html_table.cpp:430
DOM::HTMLTableElement::border
DOMString border() const
The width of the border around the table.
Definition: html_table.cpp:492
DOM::HTMLTableElement::align
DOMString align() const
Specifies the table's position with respect to the rest of the document.
Definition: html_table.cpp:470
DOM::HTMLTableElement::setTHead
void setTHead(const HTMLTableSectionElement &)
see tHead
Definition: html_table.cpp:436
DOM::HTMLTableElement::deleteTHead
void deleteTHead()
Delete the header from the table, if one exists.
Definition: html_table.cpp:575
DOM::HTMLTableElement::~HTMLTableElement
~HTMLTableElement()
Definition: html_table.cpp:413
DOM::HTMLTableElement::setWidth
void setWidth(const DOMString &)
see width
Definition: html_table.cpp:564
DOM::HTMLTableElement::cellSpacing
DOMString cellSpacing() const
Specifies the horizontal and vertical separation between cells.
Definition: html_table.cpp:514
DOM::HTMLTableRowElement
A row in a table.
Definition: html_table.h:726
DOM::HTMLTableRowElement::align
DOMString align() const
Horizontal alignment of data within cells of this row.
Definition: html_table.cpp:687
DOM::HTMLTableRowElement::~HTMLTableRowElement
~HTMLTableRowElement()
Definition: html_table.cpp:650
DOM::HTMLTableRowElement::ch
DOMString ch() const
Alignment character for cells in a column.
Definition: html_table.cpp:709
DOM::HTMLTableRowElement::deleteCell
void deleteCell(long index)
Delete a cell from the current row.
Definition: html_table.cpp:752
DOM::HTMLTableRowElement::setSectionRowIndex
void setSectionRowIndex(long)
see sectionRowIndex
Definition: html_table.cpp:671
DOM::HTMLTableRowElement::HTMLTableRowElement
HTMLTableRowElement()
Definition: html_table.cpp:626
DOM::HTMLTableRowElement::setCh
void setCh(const DOMString &)
see ch
Definition: html_table.cpp:715
DOM::HTMLTableRowElement::operator=
HTMLTableRowElement & operator=(const HTMLTableRowElement &other)
Definition: html_table.cpp:644
DOM::HTMLTableRowElement::chOff
DOMString chOff() const
Offset of alignment character.
Definition: html_table.cpp:720
DOM::HTMLTableRowElement::sectionRowIndex
long sectionRowIndex() const
The index of this row, relative to the current section ( THEAD , TFOOT , or TBODY ).
Definition: html_table.cpp:665
DOM::HTMLTableRowElement::setVAlign
void setVAlign(const DOMString &)
see vAlign
Definition: html_table.cpp:737
DOM::HTMLTableRowElement::setBgColor
void setBgColor(const DOMString &)
see bgColor
Definition: html_table.cpp:704
DOM::HTMLTableRowElement::cells
HTMLCollection cells() const
The collection of cells in this row.
Definition: html_table.cpp:676
DOM::HTMLTableRowElement::vAlign
DOMString vAlign() const
Vertical alignment of data within cells of this row.
Definition: html_table.cpp:731
DOM::HTMLTableRowElement::insertCell
HTMLElement insertCell(long index)
Insert an empty TD cell into this row.
Definition: html_table.cpp:742
DOM::HTMLTableRowElement::bgColor
DOMString bgColor() const
Background color for rows.
Definition: html_table.cpp:698
DOM::HTMLTableRowElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_table.cpp:693
DOM::HTMLTableRowElement::setCells
void setCells(const HTMLCollection &)
see cells
Definition: html_table.cpp:682
DOM::HTMLTableRowElement::setChOff
void setChOff(const DOMString &)
see chOff
Definition: html_table.cpp:726
DOM::HTMLTableRowElement::rowIndex
long rowIndex() const
The index of this row, relative to the entire table.
Definition: html_table.cpp:654
DOM::HTMLTableRowElement::setRowIndex
void setRowIndex(long)
see rowIndex
Definition: html_table.cpp:660
DOM::HTMLTableSectionElement
The THEAD , TFOOT , and TBODY elements.
Definition: html_table.h:896
DOM::HTMLTableSectionElement::setCh
void setCh(const DOMString &)
see ch
Definition: html_table.cpp:816
DOM::HTMLTableSectionElement::vAlign
DOMString vAlign() const
Vertical alignment of data in cells.
Definition: html_table.cpp:832
DOM::HTMLTableSectionElement::operator=
HTMLTableSectionElement & operator=(const HTMLTableSectionElement &other)
Definition: html_table.cpp:789
DOM::HTMLTableSectionElement::setVAlign
void setVAlign(const DOMString &)
see vAlign
Definition: html_table.cpp:838
DOM::HTMLTableSectionElement::HTMLTableSectionElement
HTMLTableSectionElement()
Definition: html_table.cpp:763
DOM::HTMLTableSectionElement::chOff
DOMString chOff() const
Offset of alignment character.
Definition: html_table.cpp:821
DOM::HTMLTableSectionElement::rows
HTMLCollection rows() const
The collection of rows in this table section.
Definition: html_table.cpp:843
DOM::HTMLTableSectionElement::ch
DOMString ch() const
Alignment character for cells in a column.
Definition: html_table.cpp:810
DOM::HTMLTableSectionElement::~HTMLTableSectionElement
~HTMLTableSectionElement()
Definition: html_table.cpp:795
DOM::HTMLTableSectionElement::setChOff
void setChOff(const DOMString &)
see chOff
Definition: html_table.cpp:827
DOM::HTMLTableSectionElement::setAlign
void setAlign(const DOMString &)
see align
Definition: html_table.cpp:805
DOM::HTMLTableSectionElement::insertRow
HTMLElement insertRow(long index)
Insert a row into this section.
Definition: html_table.cpp:849
DOM::HTMLTableSectionElement::align
DOMString align() const
Horizontal alignment of data in cells.
Definition: html_table.cpp:799
DOM::HTMLTableSectionElement::deleteRow
void deleteRow(long index)
Delete a row from this section.
Definition: html_table.cpp:859
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:271
DOM::Node::operator=
Node & operator=(const Node &other)
Definition: dom_node.cpp:145
DOM::Node::impl
NodeImpl * impl
Definition: dom_node.h:948
DOM::Node::index
unsigned long index() const
Definition: dom_node.cpp:406
DOM::Node::elementId
quint32 elementId() const
Definition: dom_node.cpp:400
dom_exception.h
html_misc.h
html_table.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