Added updateViewerWidgetWindowTitle for summary plots

This commit is contained in:
Magne Sjaastad 2016-06-29 14:15:39 +02:00
parent ea6d652a17
commit ac5402ca5a
4 changed files with 24 additions and 10 deletions

View File

@ -1316,7 +1316,7 @@ void RiaApplication::createMainPlotWindow()
m_mainPlotWindow = new RiuMainPlotWindow;
m_mainPlotWindow->setWindowTitle("Summary Plots for ResInsight");
m_mainPlotWindow->setWindowTitle("Plots - ResInsight");
m_mainPlotWindow->setDefaultWindowSize();
m_mainPlotWindow->loadWinGeoAndDockToolBarLayout();
m_mainPlotWindow->showWindow();
@ -1327,11 +1327,11 @@ void RiaApplication::createMainPlotWindow()
//--------------------------------------------------------------------------------------------------
void RiaApplication::deleteMainPlotWindow()
{
m_mainPlotWindow->deleteLater();
processEvents();
m_mainPlotWindow = NULL;
if (m_mainPlotWindow)
{
m_mainPlotWindow->deleteLater();
m_mainPlotWindow = NULL;
}
}
//--------------------------------------------------------------------------------------------------

View File

@ -189,6 +189,10 @@ void RimSummaryPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
uiCapability()->updateUiIconFromToggleField();
}
else if (changedField == &m_userName)
{
updateViewerWidgetWindowTitle();
}
}
//--------------------------------------------------------------------------------------------------
@ -202,7 +206,6 @@ void RimSummaryPlot::setupBeforeSave()
{
this->setMdiWindowGeometry(RiaApplication::instance()->mainPlotWindow()->windowGeometryForViewer(m_qwtPlot));
}
}
}
@ -223,7 +226,6 @@ QImage RimSummaryPlot::snapshotWindowContent()
QwtPlotRenderer plotRenderer;
plotRenderer.render(m_qwtPlot, &painter, rect);
}
return image;
@ -286,7 +288,7 @@ void RimSummaryPlot::updateViewerWidget()
mainPlotWindow->setActiveViewer(m_qwtPlot);
}
//updateViewerWidgetWindowTitle();
updateViewerWidgetWindowTitle();
}
else
{
@ -302,6 +304,17 @@ void RimSummaryPlot::updateViewerWidget()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::updateViewerWidgetWindowTitle()
{
if (m_qwtPlot)
{
m_qwtPlot->setWindowTitle(m_userName);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -68,6 +68,7 @@ protected:
private:
void updateViewerWidget();
void updateViewerWidgetWindowTitle();
void detachAllCurves();
void deletePlotWidget();

View File

@ -168,8 +168,8 @@ void RiuMainPlotWindow::createToolBars()
{
// Snapshots
QToolBar* toolbar = addToolBar(tr("View Snapshots"));
/*
toolbar->setObjectName(toolbar->windowTitle());
/*
toolbar->addAction(m_snapshotToClipboard);
toolbar->addAction(m_snapshotToFile);
toolbar->addAction(m_snapshotAllViewsToFile);