Beispiel #1
0
void PMMaterialMap::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMBitmapTypeID:
               setBitmapType( ( PMBitmapType )data->intData( ) );
               break;
            case PMBitmapFileID:
               setBitmapFileName( data->stringData( ) );
               break;
            case PMOnceID:
               enableOnce( data->boolData( ) );
               break;
            case PMMapTypeID:
               setMapType( ( PMMapType )data->intData( ) );
               break;
            case PMInterpolateID:
               setInterpolateType( ( PMInterpolateType )data->intData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMMaterialMap::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Beispiel #2
0
void PMDetailObject::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMGlobalDetailID:
               setGlobalDetail( data->boolData( ) );
               break;
            case PMLocalDetailLevelID:
               setLocalDetailLevel( data->intData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMDetailObject::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Beispiel #3
0
void PMListPattern::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMListTypeID:
               setListType( ( PMListType ) data->intData( ) );
               break;
            case PMBrickSizeID:
               setBrickSize( data->vectorData( ) );
               break;
            case PMMortarID:
               setMortar( data->doubleData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMListPattern::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Beispiel #4
0
void PMJuliaFractal::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMJuliaParameterID:
               setJuliaParameter( data->vectorData( ) );
               break;
            case PMAlgebraTypeID:
               setAlgebraType( ( AlgebraType ) data->intData( ) );
               break;
            case PMFunctionTypeID:
               setFunctionType( ( FunctionType ) data->intData( ) );
               break;
            case PMMaxIterationsID:
               setMaximumIterations( data->intData( ) );
               break;
            case PMPrecisionID:
               setPrecision( data->doubleData( ) );
               break;
            case PMSliceNormalID:
               setSliceNormal( data->vectorData( ) );
               break;
            case PMSliceDistanceID:
               setSliceDistance( data->doubleData( ) );
               break;
            case PMExponentID:
               setExponent( data->vectorData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMJuliaFractal::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}