Example #1
0
QString XHtmlElements::Select::toHtml()
{
	QString asHtml = "<selct";
	
	asHtml+= getBasicAttributes();
	
	if( true == _disabled )
		asHtml+=QString( " disabled=\"disabled\" " );

	if( true == _multiple )
		asHtml+=QString( " multiple=\"multiple\" " );
	
	if( false == _name.isEmpty() )
		asHtml+=QString(" name=\"%1\" ").arg( _name );

	if( false == _onFocus.isEmpty() )
		asHtml+=QString(" onFocus=\"%1\" ").arg( _onFocus );

	if( false == _onBlur.isEmpty() )
		asHtml+=QString(" onBlur=\"%1\" ").arg( _onBlur );

	if( false == _onChange.isEmpty() )
		asHtml+=QString(" onChange=\"%1\" ").arg( _onChange );
	
	asHtml+=">"
	asHtml += getContainedObjectsAsHTML();

	asHtml += "</select>"; 

	return asHtml;
}
Example #2
0
QString XHtmlElements::Optgroup::toHtml()
{
	QString asHtml = "<optgroup";
	
	asHtml+= getBasicAttributes();
	
	if( true == _disabled )
		asHtml+=QString( " disabled=\"disabled\" " );

	if( false == _label.isEmpty() )
		asHtml+=QString(" label=\"%1\" ").arg( _label );
	
	asHtml+=">"
	asHtml += getContainedObjectsAsHTML();

	asHtml += "</optgroup>"; 

	return asHtml;
}