pelican/viewer/src/DataViewer.cpp
/**
 *@details DataViewer
 *    In development : ideally will use a generic Blob client and be exported to
 *    pelican
 */
@details DataViewer
In development : ideally will use a generic Blob client and be exported to
pelican
@details DataViewer In development : ideally will use a generic Blob client and be exported to pelican
DataViewer::DataViewer(const Config& config, const Config::TreeAddress& base, QWidget* parent)
    : QWidget(parent), _client(0)
{
    _viewerFactory = new DataBlobWidgetFactory(&config, base);
    QWidget *bottomFiller = new QWidget;
    bottomFiller->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
    _streamTabs = new QTabWidget;
    QMenuBar* menubar = new QMenuBar;
    QMenu* mainMenu = new QMenu(tr("Main"));
    QAction* exitAct = new QAction(tr("E&xit"), this);
    exitAct->setShortcut(tr("Ctrl+Q"));
    exitAct->setStatusTip(tr("Exit the application"));
    connect(exitAct, SIGNAL(triggered()), this, SLOT(close()));
    mainMenu->addAction(exitAct);
    menubar->addMenu(mainMenu);
    _viewMenu = new QMenu(tr("View"));
    _viewMenu->setTearOffEnabled(true);
    menubar->addMenu(_viewMenu);
    _streamActionGroup = new QActionGroup(this);
    _streamActionGroup->setExclusive(false);
    _viewMenu->addSeparator();
    QMenu* helpMenu = new QMenu(tr("Help"));
    QAction* aboutAct = new QAction(tr("&About"), this);
    connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
    helpMenu->addAction(aboutAct);
    menubar->addMenu(helpMenu);
    QVBoxLayout* layout = new QVBoxLayout;
    layout->setMargin(5);
    layout->addWidget(menubar);
    layout->addWidget(_streamTabs);
    setLayout(layout);
    setConfig(config.get(base));
}
DataViewer :: DataViewer ( const Config & config , const Config :: TreeAddress & base , QWidget * parent ) : QWidget ( parent ) , _client ( 0 ) { _viewerFactory = new DataBlobWidgetFactory ( & config , base ) ; QWidget * bottomFiller = new QWidget ; bottomFiller -> setSizePolicy ( QSizePolicy :: Expanding , QSizePolicy :: Expanding ) ; _streamTabs = new QTabWidget ; QMenuBar * menubar = new QMenuBar ; QMenu * mainMenu = new QMenu ( tr ( " " ) ) ; QAction * exitAct = new QAction ( tr ( " " ) , this ) ; exitAct -> setShortcut ( tr ( " " ) ) ; exitAct -> setStatusTip ( tr ( " " ) ) ; connect ( exitAct , SIGNAL ( triggered ( ) ) , this , SLOT ( close ( ) ) ) ; mainMenu -> addAction ( exitAct ) ; menubar -> addMenu ( mainMenu ) ; _viewMenu = new QMenu ( tr ( " " ) ) ; _viewMenu -> setTearOffEnabled ( true ) ; menubar -> addMenu ( _viewMenu ) ; _streamActionGroup = new QActionGroup ( this ) ; _streamActionGroup -> setExclusive ( false ) ; _viewMenu -> addSeparator ( ) ; QMenu * helpMenu = new QMenu ( tr ( " " ) ) ; QAction * aboutAct = new QAction ( tr ( " " ) , this ) ; connect ( aboutAct , SIGNAL ( triggered ( ) ) , this , SLOT ( about ( ) ) ) ; helpMenu -> addAction ( aboutAct ) ; menubar -> addMenu ( helpMenu ) ; QVBoxLayout * layout = new QVBoxLayout ; layout -> setMargin ( 5 ) ; layout -> addWidget ( menubar ) ; layout -> addWidget ( _streamTabs ) ; setLayout ( layout ) ; setConfig ( config . get ( base ) ) ; }
@details DataViewer
    In development : ideally will use a generic Blob client and be exported to
    pelican
@details DataViewer In development : ideally will use a generic Blob client and be exported to pelican
// setup our factory // setup generic widgets // setup actions // Main Menu // View Menu // Help Menu // set the layout //layout->addWidget(bottomFiller);