html_form.cpp
来自「将konqueror浏览器移植到ARM9 2410中」· C++ 代码 · 共 1,254 行 · 第 1/2 页
CPP
1,254 行
}// --------------------------------------------------------------------------HTMLLegendElement::HTMLLegendElement() : HTMLElement(){}HTMLLegendElement::HTMLLegendElement(const HTMLLegendElement &other) : HTMLElement(other){}HTMLLegendElement::HTMLLegendElement(HTMLLegendElementImpl *impl) : HTMLElement(impl){}HTMLLegendElement &HTMLLegendElement::operator = (const Node &other){ if(other.elementId() != ID_LEGEND) { impl = 0; return *this; } Node::operator = (other); return *this;}HTMLLegendElement &HTMLLegendElement::operator = (const HTMLLegendElement &other){ HTMLElement::operator = (other); return *this;}HTMLLegendElement::~HTMLLegendElement(){}HTMLFormElement HTMLLegendElement::form() const{ if(!impl) return 0; return ((HTMLLegendElementImpl *)impl)->form();}DOMString HTMLLegendElement::accessKey() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);}void HTMLLegendElement::setAccessKey( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);}DOMString HTMLLegendElement::align() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ALIGN);}void HTMLLegendElement::setAlign( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ALIGN, value);}// --------------------------------------------------------------------------HTMLOptGroupElement::HTMLOptGroupElement() : HTMLElement(){}HTMLOptGroupElement::HTMLOptGroupElement(const HTMLOptGroupElement &other) : HTMLElement(other){}HTMLOptGroupElement::HTMLOptGroupElement(HTMLOptGroupElementImpl *impl) : HTMLElement(impl){}HTMLOptGroupElement &HTMLOptGroupElement::operator = (const Node &other){ if(other.elementId() != ID_OPTGROUP) { impl = 0; return *this; } Node::operator = (other); return *this;}HTMLOptGroupElement &HTMLOptGroupElement::operator = (const HTMLOptGroupElement &other){ HTMLElement::operator = (other); return *this;}HTMLOptGroupElement::~HTMLOptGroupElement(){}bool HTMLOptGroupElement::disabled() const{ if(!impl) return 0; return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();}void HTMLOptGroupElement::setDisabled( bool _disabled ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);}DOMString HTMLOptGroupElement::label() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_LABEL);}void HTMLOptGroupElement::setLabel( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_LABEL, value);}// --------------------------------------------------------------------------HTMLSelectElement::HTMLSelectElement() : HTMLElement(){}HTMLSelectElement::HTMLSelectElement(const HTMLSelectElement &other) : HTMLElement(other){}HTMLSelectElement::HTMLSelectElement(HTMLSelectElementImpl *impl) : HTMLElement(impl){}HTMLSelectElement &HTMLSelectElement::operator = (const Node &other){ if(other.elementId() != ID_SELECT) { impl = 0; return *this; } Node::operator = (other); return *this;}HTMLSelectElement &HTMLSelectElement::operator = (const HTMLSelectElement &other){ HTMLElement::operator = (other); return *this;}HTMLSelectElement::~HTMLSelectElement(){}DOMString HTMLSelectElement::type() const{ if(!impl) return DOMString(); return ((HTMLSelectElementImpl *)impl)->type();}long HTMLSelectElement::selectedIndex() const{ if(!impl) return 0; return ((HTMLSelectElementImpl *)impl)->selectedIndex();}void HTMLSelectElement::setSelectedIndex( long _selectedIndex ){ if(impl) ((HTMLSelectElementImpl *)impl)->setSelectedIndex(_selectedIndex);}DOMString HTMLSelectElement::value() const{ if(!impl) return DOMString(); return static_cast<HTMLSelectElementImpl*>(impl)->value();}void HTMLSelectElement::setValue( const DOMString &value ){ if(!impl || value.isNull()) return; static_cast<HTMLSelectElementImpl*>(impl)->setValue(value.implementation());}long HTMLSelectElement::length() const{ if(!impl) return 0; return ((HTMLSelectElementImpl *)impl)->length();}HTMLFormElement HTMLSelectElement::form() const{ if(!impl) return 0; return ((HTMLSelectElementImpl *)impl)->form();}HTMLCollection HTMLSelectElement::options() const{ if(!impl) return HTMLCollection(); return HTMLCollection(impl, HTMLCollectionImpl::SELECT_OPTIONS);}bool HTMLSelectElement::disabled() const{ if(!impl) return 0; return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();}void HTMLSelectElement::setDisabled( bool _disabled ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);}bool HTMLSelectElement::multiple() const{ if(!impl) return 0; return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_MULTIPLE).isNull();}void HTMLSelectElement::setMultiple( bool _multiple ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_MULTIPLE, _multiple ? "" : 0);}DOMString HTMLSelectElement::name() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_NAME);}void HTMLSelectElement::setName( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_NAME, value);}long HTMLSelectElement::size() const{ if(!impl) return 0; return ((HTMLSelectElementImpl *)impl)->getAttribute(ATTR_SIZE).toInt();}void HTMLSelectElement::setSize( long _size ){ if(impl) { DOMString value(QString::number(_size)); static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SIZE,value); }}long HTMLSelectElement::tabIndex() const{ if(!impl) return 0; return static_cast<ElementImpl*>(impl)->tabIndex();}void HTMLSelectElement::setTabIndex( long _tabIndex ){ if (!impl) return; static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);}void HTMLSelectElement::add( const HTMLElement &element, const HTMLElement &before ){ if(impl) static_cast<HTMLSelectElementImpl*>(impl)->add( element, before );}void HTMLSelectElement::remove( long index ){ if(impl) static_cast<HTMLSelectElementImpl*>(impl)->remove( index );}void HTMLSelectElement::blur( ){ if(impl && impl->ownerDocument() && impl->ownerDocument()->focusNode()==impl) impl->ownerDocument()->setFocusNode(0);}void HTMLSelectElement::focus( ){ if(impl && impl->ownerDocument()) impl->ownerDocument()->setFocusNode(static_cast<ElementImpl*>(impl));}// --------------------------------------------------------------------------HTMLTextAreaElement::HTMLTextAreaElement() : HTMLElement(){}HTMLTextAreaElement::HTMLTextAreaElement(const HTMLTextAreaElement &other) : HTMLElement(other){}HTMLTextAreaElement::HTMLTextAreaElement(HTMLTextAreaElementImpl *impl) : HTMLElement(impl){}HTMLTextAreaElement &HTMLTextAreaElement::operator = (const Node &other){ if(other.elementId() != ID_TEXTAREA) { impl = 0; return *this; } Node::operator = (other); return *this;}HTMLTextAreaElement &HTMLTextAreaElement::operator = (const HTMLTextAreaElement &other){ HTMLElement::operator = (other); return *this;}HTMLTextAreaElement::~HTMLTextAreaElement(){}DOMString HTMLTextAreaElement::defaultValue() const{ if(!impl) return DOMString(); return ((HTMLTextAreaElementImpl *)impl)->defaultValue();}void HTMLTextAreaElement::setDefaultValue( const DOMString &value ){ if (impl) ((HTMLTextAreaElementImpl *)impl)->setDefaultValue(value);}HTMLFormElement HTMLTextAreaElement::form() const{ if(!impl) return 0; return ((HTMLTextAreaElementImpl *)impl)->form();}DOMString HTMLTextAreaElement::accessKey() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_ACCESSKEY);}void HTMLTextAreaElement::setAccessKey( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ACCESSKEY, value);}long HTMLTextAreaElement::cols() const{ if(!impl) return 0; return ((HTMLTextAreaElementImpl *)impl)->getAttribute(ATTR_COLS).toInt();}void HTMLTextAreaElement::setCols( long _cols ){ if(impl) { DOMString value(QString::number(_cols)); static_cast<ElementImpl*>(impl)->setAttribute(ATTR_COLS,value); }}bool HTMLTextAreaElement::disabled() const{ if(!impl) return 0; return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();}void HTMLTextAreaElement::setDisabled( bool _disabled ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);}DOMString HTMLTextAreaElement::name() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_NAME);}void HTMLTextAreaElement::setName( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_NAME, value);}bool HTMLTextAreaElement::readOnly() const{ if(!impl) return 0; return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_READONLY).isNull();}void HTMLTextAreaElement::setReadOnly( bool _readOnly ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_READONLY, _readOnly ? "" : 0);}long HTMLTextAreaElement::rows() const{ if(!impl) return 0; return ((HTMLTextAreaElementImpl *)impl)->getAttribute(ATTR_ROWS).toInt();}void HTMLTextAreaElement::setRows( long _rows ){ if(impl) { DOMString value(QString::number(_rows)); static_cast<ElementImpl*>(impl)->setAttribute(ATTR_ROWS,value); }}long HTMLTextAreaElement::tabIndex() const{ if(!impl) return 0; return static_cast<ElementImpl*>(impl)->tabIndex();}void HTMLTextAreaElement::setTabIndex( long _tabIndex ){ if (!impl) return; static_cast<ElementImpl*>(impl)->setTabIndex(_tabIndex);}DOMString HTMLTextAreaElement::type() const{ if(!impl) return DOMString(); return ((HTMLTextAreaElementImpl *)impl)->type();}DOMString HTMLTextAreaElement::value() const{ if(!impl) return DOMString(); return ((HTMLTextAreaElementImpl *)impl)->value();}void HTMLTextAreaElement::setValue( const DOMString &value ){ if(impl) ((HTMLTextAreaElementImpl *)impl)->setValue(value);}void HTMLTextAreaElement::blur( ){ if(impl && impl->ownerDocument() && impl->ownerDocument()->focusNode()==impl) impl->ownerDocument()->setFocusNode(0);}void HTMLTextAreaElement::focus( ){ if(impl && impl->ownerDocument()) impl->ownerDocument()->setFocusNode(static_cast<ElementImpl*>(impl));}void HTMLTextAreaElement::select( ){ if(impl) ((HTMLTextAreaElementImpl *)impl)->select( );}// --------------------------------------------------------------------------HTMLOptionElement::HTMLOptionElement() : HTMLElement(){}HTMLOptionElement::HTMLOptionElement(const HTMLOptionElement &other) : HTMLElement(other){}HTMLOptionElement::HTMLOptionElement(HTMLOptionElementImpl *impl) : HTMLElement(impl){}HTMLOptionElement &HTMLOptionElement::operator = (const Node &other){ if(other.elementId() != ID_OPTION) { impl = 0; return *this; } Node::operator = (other); return *this;}HTMLOptionElement &HTMLOptionElement::operator = (const HTMLOptionElement &other){ HTMLElement::operator = (other); return *this;}HTMLOptionElement::~HTMLOptionElement(){}HTMLFormElement HTMLOptionElement::form() const{ if(!impl) return 0; return ((HTMLOptionElementImpl *)impl)->form();}bool HTMLOptionElement::defaultSelected() const{ if(!impl) return 0; return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_SELECTED).isNull();}void HTMLOptionElement::setDefaultSelected( bool _defaultSelected ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_SELECTED, _defaultSelected ? "" : 0);}DOMString HTMLOptionElement::text() const{ if(!impl) return DOMString(); return ((HTMLOptionElementImpl *)impl)->text();}long HTMLOptionElement::index() const{ if(!impl) return 0; return ((HTMLOptionElementImpl *)impl)->index();}void HTMLOptionElement::setIndex( long /*_index*/ ){ throw DOMException(DOMException::NO_MODIFICATION_ALLOWED_ERR);}bool HTMLOptionElement::disabled() const{ if(!impl) return 0; return !static_cast<ElementImpl*>(impl)->getAttribute(ATTR_DISABLED).isNull();}void HTMLOptionElement::setDisabled( bool _disabled ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_DISABLED, _disabled ? "" : 0);}DOMString HTMLOptionElement::label() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_LABEL);}void HTMLOptionElement::setLabel( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_LABEL, value);}bool HTMLOptionElement::selected() const{ if(!impl) return 0; return ((HTMLOptionElementImpl *)impl)->selected();}void HTMLOptionElement::setSelected(bool _selected) { if(!impl) return; ((HTMLOptionElementImpl *)impl)->setSelected(_selected);}DOMString HTMLOptionElement::value() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_VALUE);}void HTMLOptionElement::setValue( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_VALUE, value);}// -----------------------------------------------------------------------------HTMLIsIndexElement::HTMLIsIndexElement() : HTMLElement(){}HTMLIsIndexElement::HTMLIsIndexElement(const HTMLIsIndexElement &other) : HTMLElement(other){}HTMLIsIndexElement::HTMLIsIndexElement(HTMLIsIndexElementImpl *impl) : HTMLElement(impl){}HTMLIsIndexElement &HTMLIsIndexElement::operator = (const Node &other){ if(other.elementId() != ID_ISINDEX) { impl = 0; return *this; } Node::operator = (other); return *this;}HTMLIsIndexElement &HTMLIsIndexElement::operator = (const HTMLIsIndexElement &other){ HTMLElement::operator = (other); return *this;}HTMLIsIndexElement::~HTMLIsIndexElement(){}HTMLFormElement HTMLIsIndexElement::form() const{ if(!impl) return 0; return ((HTMLIsIndexElementImpl *)impl)->form();}DOMString HTMLIsIndexElement::prompt() const{ if(!impl) return DOMString(); return static_cast<ElementImpl*>(impl)->getAttribute(ATTR_PROMPT);}void HTMLIsIndexElement::setPrompt( const DOMString &value ){ if(impl) static_cast<ElementImpl*>(impl)->setAttribute(ATTR_PROMPT, value);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?