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