void SessionManager::updateDataprocessor( Dataprocessor* dataprocessor, portfolio::Folium& folium ) { activeDataprocessor_ = dataprocessor; emit onSessionUpdated( dataprocessor, QString::fromStdWString( folium.id() ) ); }
bool QuanSampleProcessor::fetch( portfolio::Folium& folium ) { try { folium = datafile_->fetch( folium.id(), folium.dataClass() ); portfolio::Folio attachs = folium.attachments(); for ( auto att : attachs ) { if ( att.empty() ) fetch( att ); // recursive call make sure for all blongings load up in memory. } } catch ( std::bad_cast& ) {} return true; }
void SpectrogramWnd::handleSelectionChanged( Dataprocessor*, portfolio::Folium& folium ) { portfolio::Folder folder = folium.parentFolder(); if ( folder && folder.name() == L"Spectrograms" ) { adcontrols::MassSpectraPtr ptr; if ( portfolio::Folium::get< adcontrols::MassSpectraPtr >( ptr, folium ) ) { foliumId_ = folium.id(); fullpath_ = folium.fullpath(); data_ = ptr; plot_->setData( new detail::SpectrogramData( ptr ) ); } portfolio::Folio atts = folium.attachments(); portfolio::Folio::iterator it = portfolio::Folium::find< adcontrols::SpectrogramClustersPtr >( atts.begin(), atts.end() ); if ( it != atts.end() ) { adcontrols::SpectrogramClustersPtr clusters = boost::any_cast< adcontrols::SpectrogramClustersPtr >( *it ); plot_->setData( clusters.get() ); } } }
void SessionManager::selectionChanged( Dataprocessor* dataprocessor, portfolio::Folium& folium ) { adportable::debug(__FILE__, __LINE__) << static_cast<boost::any&>(folium).type().name() << ", id=" << folium.id(); activeDataprocessor_ = dataprocessor; emit signalSelectionChanged( dataprocessor, folium ); }