pelican/viewer/src/DataViewer.cpp
/*
 * @details
 * updates the Gui to reflect the specified streams
 */
@details
updates the Gui to reflect the specified streams
@details updates the Gui to reflect the specified streams
void DataViewer::_updatedStreams( const QSet<QString>& streams )
{
    foreach(QAction* action, _streamActionGroup->actions() )
    {
        _streamActionGroup->removeAction(action);
        _viewMenu->removeAction(action);
        delete action;
    }
    foreach(const QString& stream, streams )
    {
        QAction* a = _streamActionGroup->addAction(stream);
        a->setCheckable(true);
        _viewMenu->addAction(a);
        connect( a, SIGNAL(triggered() ), this, SLOT(_streamToggled()) );
        if( _defaultsEnabled.contains(stream) )
        {
            a->setChecked(true);
            enableStream(stream);
        }
        else {
            _defaultsEnabled[stream] = false;
            a->setChecked(false);
        }
    }
    connectStreams();
}
void DataViewer :: _updatedStreams ( const QSet < QString > & streams ) { foreach ( QAction * action , _streamActionGroup -> actions ( ) ) { _streamActionGroup -> removeAction ( action ) ; _viewMenu -> removeAction ( action ) ; delete action ; } foreach ( const QString & stream , streams ) { QAction * a = _streamActionGroup -> addAction ( stream ) ; a -> setCheckable ( true ) ; _viewMenu -> addAction ( a ) ; connect ( a , SIGNAL ( triggered ( ) ) , this , SLOT ( _streamToggled ( ) ) ) ; if ( _defaultsEnabled . contains ( stream ) ) { a -> setChecked ( true ) ; enableStream ( stream ) ; } else { _defaultsEnabled [ stream ] = false ; a -> setChecked ( false ) ; } } connectStreams ( ) ; }
@details
 updates the Gui to reflect the specified streams
@details updates the Gui to reflect the specified streams
// clean up the previous state // set up the new streams