KHTML
html_list.cpp
Go to the documentation of this file.
00001 00022 // -------------------------------------------------------------------------- 00023 00024 #include "dom/html_list.h" 00025 #include "html/html_listimpl.h" 00026 00027 using namespace DOM; 00028 00029 HTMLDListElement::HTMLDListElement() : HTMLElement() 00030 { 00031 } 00032 00033 HTMLDListElement::HTMLDListElement(const HTMLDListElement &other) : HTMLElement(other) 00034 { 00035 } 00036 00037 HTMLDListElement::HTMLDListElement(HTMLDListElementImpl *impl) : HTMLElement(impl) 00038 { 00039 } 00040 00041 HTMLDListElement &HTMLDListElement::operator = (const Node &other) 00042 { 00043 assignOther( other, ID_DL ); 00044 return *this; 00045 } 00046 00047 HTMLDListElement &HTMLDListElement::operator = (const HTMLDListElement &other) 00048 { 00049 HTMLElement::operator = (other); 00050 return *this; 00051 } 00052 00053 HTMLDListElement::~HTMLDListElement() 00054 { 00055 } 00056 00057 bool HTMLDListElement::compact() const 00058 { 00059 if(!impl) return 0; 00060 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull(); 00061 } 00062 00063 void HTMLDListElement::setCompact( bool _compact ) 00064 { 00065 if(impl) 00066 { 00067 DOMString str; 00068 if( _compact ) 00069 str = ""; 00070 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str); 00071 } 00072 } 00073 00074 // -------------------------------------------------------------------------- 00075 00076 HTMLDirectoryElement::HTMLDirectoryElement() : HTMLElement() 00077 { 00078 } 00079 00080 HTMLDirectoryElement::HTMLDirectoryElement(const HTMLDirectoryElement &other) : HTMLElement(other) 00081 { 00082 } 00083 00084 HTMLDirectoryElement::HTMLDirectoryElement(HTMLDirectoryElementImpl *impl) : HTMLElement(impl) 00085 { 00086 } 00087 00088 HTMLDirectoryElement &HTMLDirectoryElement::operator = (const Node &other) 00089 { 00090 assignOther( other, ID_DIR ); 00091 return *this; 00092 } 00093 00094 HTMLDirectoryElement &HTMLDirectoryElement::operator = (const HTMLDirectoryElement &other) 00095 { 00096 HTMLElement::operator = (other); 00097 return *this; 00098 } 00099 00100 HTMLDirectoryElement::~HTMLDirectoryElement() 00101 { 00102 } 00103 00104 bool HTMLDirectoryElement::compact() const 00105 { 00106 if(!impl) return 0; 00107 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull(); 00108 } 00109 00110 void HTMLDirectoryElement::setCompact( bool _compact ) 00111 { 00112 if(impl) 00113 { 00114 DOMString str; 00115 if( _compact ) 00116 str = ""; 00117 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str); 00118 } 00119 } 00120 00121 // -------------------------------------------------------------------------- 00122 00123 HTMLLIElement::HTMLLIElement() : HTMLElement() 00124 { 00125 } 00126 00127 HTMLLIElement::HTMLLIElement(const HTMLLIElement &other) : HTMLElement(other) 00128 { 00129 } 00130 00131 HTMLLIElement::HTMLLIElement(HTMLLIElementImpl *impl) : HTMLElement(impl) 00132 { 00133 } 00134 00135 HTMLLIElement &HTMLLIElement::operator = (const Node &other) 00136 { 00137 assignOther( other, ID_LI ); 00138 return *this; 00139 } 00140 00141 HTMLLIElement &HTMLLIElement::operator = (const HTMLLIElement &other) 00142 { 00143 HTMLElement::operator = (other); 00144 return *this; 00145 } 00146 00147 HTMLLIElement::~HTMLLIElement() 00148 { 00149 } 00150 00151 DOMString HTMLLIElement::type() const 00152 { 00153 if(!impl) return DOMString(); 00154 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE); 00155 } 00156 00157 void HTMLLIElement::setType( const DOMString &value ) 00158 { 00159 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value); 00160 } 00161 00162 long HTMLLIElement::value() const 00163 { 00164 if(!impl) return 0; 00165 return ((ElementImpl *)impl)->getAttribute(ATTR_VALUE).toInt(); 00166 } 00167 00168 void HTMLLIElement::setValue( long _value ) 00169 { 00170 if(impl) { 00171 DOMString value(QString::number(_value)); 00172 ((ElementImpl *)impl)->setAttribute(ATTR_VALUE,value); 00173 } 00174 } 00175 00176 // -------------------------------------------------------------------------- 00177 00178 HTMLMenuElement::HTMLMenuElement() : HTMLElement() 00179 { 00180 } 00181 00182 HTMLMenuElement::HTMLMenuElement(const HTMLMenuElement &other) : HTMLElement(other) 00183 { 00184 } 00185 00186 HTMLMenuElement::HTMLMenuElement(HTMLMenuElementImpl *impl) : HTMLElement(impl) 00187 { 00188 } 00189 00190 HTMLMenuElement &HTMLMenuElement::operator = (const Node &other) 00191 { 00192 assignOther( other, ID_MENU ); 00193 return *this; 00194 } 00195 00196 HTMLMenuElement &HTMLMenuElement::operator = (const HTMLMenuElement &other) 00197 { 00198 HTMLElement::operator = (other); 00199 return *this; 00200 } 00201 00202 HTMLMenuElement::~HTMLMenuElement() 00203 { 00204 } 00205 00206 bool HTMLMenuElement::compact() const 00207 { 00208 if(!impl) return 0; 00209 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull(); 00210 } 00211 00212 void HTMLMenuElement::setCompact( bool _compact ) 00213 { 00214 if(impl) 00215 { 00216 DOMString str; 00217 if( _compact ) 00218 str = ""; 00219 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str); 00220 } 00221 } 00222 00223 // -------------------------------------------------------------------------- 00224 00225 HTMLOListElement::HTMLOListElement() : HTMLElement() 00226 { 00227 } 00228 00229 HTMLOListElement::HTMLOListElement(const HTMLOListElement &other) : HTMLElement(other) 00230 { 00231 } 00232 00233 HTMLOListElement::HTMLOListElement(HTMLOListElementImpl *impl) : HTMLElement(impl) 00234 { 00235 } 00236 00237 HTMLOListElement &HTMLOListElement::operator = (const Node &other) 00238 { 00239 assignOther( other, ID_OL ); 00240 return *this; 00241 } 00242 00243 HTMLOListElement &HTMLOListElement::operator = (const HTMLOListElement &other) 00244 { 00245 HTMLElement::operator = (other); 00246 return *this; 00247 } 00248 00249 HTMLOListElement::~HTMLOListElement() 00250 { 00251 } 00252 00253 bool HTMLOListElement::compact() const 00254 { 00255 if(!impl) return 0; 00256 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull(); 00257 } 00258 00259 void HTMLOListElement::setCompact( bool _compact ) 00260 { 00261 if(impl) 00262 { 00263 DOMString str; 00264 if( _compact ) 00265 str = ""; 00266 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str); 00267 } 00268 } 00269 00270 long HTMLOListElement::start() const 00271 { 00272 if(!impl) return 0; 00273 return ((ElementImpl *)impl)->getAttribute(ATTR_START).toInt(); 00274 } 00275 00276 void HTMLOListElement::setStart( long _start ) 00277 { 00278 00279 if(impl) { 00280 DOMString value(QString::number(_start)); 00281 ((ElementImpl *)impl)->setAttribute(ATTR_START,value); 00282 } 00283 } 00284 00285 DOMString HTMLOListElement::type() const 00286 { 00287 if(!impl) return DOMString(); 00288 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE); 00289 } 00290 00291 void HTMLOListElement::setType( const DOMString &value ) 00292 { 00293 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value); 00294 } 00295 00296 // -------------------------------------------------------------------------- 00297 00298 HTMLUListElement::HTMLUListElement() : HTMLElement() 00299 { 00300 } 00301 00302 HTMLUListElement::HTMLUListElement(const HTMLUListElement &other) : HTMLElement(other) 00303 { 00304 } 00305 00306 HTMLUListElement::HTMLUListElement(HTMLUListElementImpl *impl) : HTMLElement(impl) 00307 { 00308 } 00309 00310 HTMLUListElement &HTMLUListElement::operator = (const Node &other) 00311 { 00312 assignOther( other, ID_UL ); 00313 return *this; 00314 } 00315 00316 HTMLUListElement &HTMLUListElement::operator = (const HTMLUListElement &other) 00317 { 00318 HTMLElement::operator = (other); 00319 return *this; 00320 } 00321 00322 HTMLUListElement::~HTMLUListElement() 00323 { 00324 } 00325 00326 bool HTMLUListElement::compact() const 00327 { 00328 if(!impl) return 0; 00329 return !((ElementImpl *)impl)->getAttribute(ATTR_COMPACT).isNull(); 00330 } 00331 00332 void HTMLUListElement::setCompact( bool _compact ) 00333 { 00334 if(impl) 00335 { 00336 DOMString str; 00337 if( _compact ) 00338 str = ""; 00339 ((ElementImpl *)impl)->setAttribute(ATTR_COMPACT, str); 00340 } 00341 } 00342 00343 DOMString HTMLUListElement::type() const 00344 { 00345 if(!impl) return DOMString(); 00346 return ((ElementImpl *)impl)->getAttribute(ATTR_TYPE); 00347 } 00348 00349 void HTMLUListElement::setType( const DOMString &value ) 00350 { 00351 if(impl) ((ElementImpl *)impl)->setAttribute(ATTR_TYPE, value); 00352 } 00353
KDE 4.6 API Reference