Ejemplo n.º 1
0
void PMText::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMFontID:
               setFont( data->stringData( ) );
               break;
            case PMTextID:
               setText( data->stringData( ) );
               break;
            case PMThicknessID:
               setThickness( data->doubleData( ) );
               break;
            case PMOffsetID:
               setOffset( data->vectorData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMText::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}
Ejemplo n.º 2
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 );
}
Ejemplo n.º 3
0
void PMRaw::restoreMemento( PMMemento* s )
{
   PMMementoDataIterator it( s );
   PMMementoData* data;

   for( ; it.current( ); ++it )
   {
      data = it.current( );
      if( data->objectType( ) == s_pMetaObject )
      {
         switch( data->valueID( ) )
         {
            case PMCodeID:
               setCode( data->stringData( ) );
               break;
            default:
               kdError( PMArea ) << "Wrong ID in PMRaw::restoreMemento\n";
               break;
         }
      }
   }
   Base::restoreMemento( s );
}