Exemplo n.º 1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
void RimWellLogPlot::updateViewerWidget()
{
    RiuMainPlotWindow* mainPlotWindow = RiaApplication::instance()->mainPlotWindow();
    if (!mainPlotWindow) return;

    if (m_showWindow())
    {
        if (!m_viewer)
        {
            m_viewer = new RiuWellLogPlot(this, mainPlotWindow);

            recreateTrackPlots();

            mainPlotWindow->addViewer(m_viewer, this->mdiWindowGeometry());
            mainPlotWindow->setActiveViewer(m_viewer);
        }

        updateViewerWidgetWindowTitle();
    }
    else
    {
        if (m_viewer)
        {
            this->setMdiWindowGeometry(mainPlotWindow->windowGeometryForViewer(m_viewer));

            mainPlotWindow->removeViewer(m_viewer);
            detachAllCurves();

            delete m_viewer;
            m_viewer = NULL;
        }
    }
}
Exemplo n.º 2
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
QWidget* RimWellLogPlot::createViewWidget(QWidget* mainWindowParent)
{
    m_viewer = new RiuWellLogPlot(this, mainWindowParent);

    recreateTrackPlots();

    return m_viewer;
}