28 #include <QDomDocument>
29 #include <QDomElement>
94 switch ( theDataType )
143 switch ( theDataType )
272 QgsDebugMsg(
"called algorithm: " + QString::number((
int )theAlgorithm ) +
" generate lookup table: " + QString::number((
int )generateTable ) );
276 switch ( theAlgorithm )
314 if ( 0 != theFunction )
330 QgsDebugMsg(
"called value: " + QString::number( theValue ) +
" generate lookup table: " + QString::number((
int )generateTable ) );
362 QgsDebugMsg(
"called value: " + QString::number( theValue ) +
" generate lookup table: " + QString::number((
int )generateTable ) );
389 QDomElement minElem = doc.createElement(
"minValue" );
390 QDomText minText = doc.createTextNode( QString::number(
mMinimumValue ) );
391 minElem.appendChild( minText );
392 parentElem.appendChild( minElem );
395 QDomElement maxElem = doc.createElement(
"maxValue" );
396 QDomText maxText = doc.createTextNode( QString::number(
mMaximumValue ) );
397 maxElem.appendChild( maxText );
398 parentElem.appendChild( maxElem );
401 QDomElement algorithmElem = doc.createElement(
"algorithm" );
403 algorithmElem.appendChild( algorithmText );
404 parentElem.appendChild( algorithmElem );
409 QDomElement minValueElem = elem.firstChildElement(
"minValue" );
410 if ( !minValueElem.isNull() )
414 QDomElement maxValueElem = elem.firstChildElement(
"maxValue" );
415 if ( !maxValueElem.isNull() )
419 QDomElement algorithmElem = elem.firstChildElement(
"algorithm" );
420 if ( !algorithmElem.isNull() )
422 QString algorithmString = algorithmElem.text();
425 if ( algorithmString ==
"0" )
429 else if ( algorithmString ==
"1" )
433 else if ( algorithmString ==
"2" )
437 else if ( algorithmString ==
"3" )
441 else if ( algorithmString ==
"4" )
459 return "NoEnhancement";
461 return "StretchToMinimumMaximum";
463 return "StretchAndClipToMinimumMaximum";
465 return "ClipToMinimumMaximum";
467 return "UserDefinedEnhancement";
469 return "NoEnhancement";
474 if ( contrastEnhancementString ==
"StretchToMinimumMaximum" )
478 else if ( contrastEnhancementString ==
"StretchAndClipToMinimumMaximum" )
482 else if ( contrastEnhancementString ==
"ClipToMinimumMaximum" )
486 else if ( contrastEnhancementString ==
"UserDefinedEnhancement" )