void PMNormal::restoreMemento( PMMemento* s ) { PMMementoDataIterator it( s ); PMMementoData* data; for( ; it.current( ); ++it ) { data = it.current( ); if( data->objectType( ) == s_pMetaObject ) { switch( data->valueID( ) ) { case PMEnableBumpSizeID: enableBumpSize( data->boolData( ) ); break; case PMBumpSizeID: setBumpSize( data->doubleData( ) ); break; case PMAccuracyID: setAccuracy( data->doubleData( ) ); break; case PMUVMappingID: setUVMapping( data->boolData( ) ); break; default: kdError( PMArea ) << "Wrong ID in PMNormal::restoreMemento\n"; break; } } } Base::restoreMemento( s ); }
void PMPigment::restoreMemento( PMMemento *s ) { PMMementoDataIterator it( s ); PMMementoData* data; for( ; it.current( ); ++it ) { data = it.current( ); if( data->objectType( ) == s_pMetaObject ) { switch( data->valueID( ) ) { case PMUVMappingID: setUVMapping( data->boolData( ) ); break; default: kdError( PMArea ) << "Wrong ID in PMPigment::restoreMemento\n"; break; } } } Base::restoreMemento( s ); }