void PMCone::restoreMemento( PMMemento * s ) { PMMementoDataIterator it( s ); PMMementoData* data; for( ; it.current( ); ++it ) { data = it.current( ); if( data->objectType( ) == s_pMetaObject ) { switch( data->valueID( ) ) { case PMEnd1ID: setEnd1( data->vectorData( ) ); break; case PMEnd2ID: setEnd2( data->vectorData( ) ); break; case PMRadius1ID: setRadius1( data->doubleData( ) ); break; case PMRadius2ID: setRadius2( data->doubleData( ) ); break; case PMOpenID: setOpen( data->boolData( ) ); break; default: kdError( PMArea ) << "Wrong ID in PMCone::restoreMemento\n"; break; } } } Base::restoreMemento (s); }
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 ); }
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 ); }
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 ); }
void PMTranslate::restoreMemento( PMMemento* s ) { PMMementoDataIterator it( s ); PMMementoData* data; for( ; it.current( ); ++it ) { data = it.current( ); if( data->objectType( ) == s_pMetaObject ) { switch( data->valueID( ) ) { case PMTranslationID: setTranslation( data->vectorData( ) ); break; default: kdError( PMArea ) << "Wrong ID in PMTranslate::restoreMemento\n"; break; } } } Base::restoreMemento( s ); }