#850 Summary : Added snapshot of all well log plots and summary plots to file

This commit is contained in:
Magne Sjaastad
2016-10-27 11:03:13 +02:00
parent 5a63b841b8
commit 70fb105ced
13 changed files with 204 additions and 62 deletions

View File

@@ -129,9 +129,7 @@ void RiuMainPlotWindow::closeEvent(QCloseEvent* event)
//--------------------------------------------------------------------------------------------------
void RiuMainPlotWindow::createActions()
{
m_snapshotAllViewsToFile = new QAction(QIcon(":/SnapShotSaveViews.png"), "Snapshot All Views To File", this);
connect(m_snapshotAllViewsToFile, SIGNAL(triggered()), SLOT(slotSnapshotAllViewsToFile()));
}
//--------------------------------------------------------------------------------------------------
@@ -237,6 +235,7 @@ void RiuMainPlotWindow::createToolBars()
toolbar->setObjectName(toolbar->windowTitle());
toolbar->addAction(cmdFeatureMgr->action("RicSnapshotViewToClipboardFeature"));
toolbar->addAction(cmdFeatureMgr->action("RicSnapshotViewToFileFeature"));
toolbar->addAction(cmdFeatureMgr->action("RicSnapshotAllPlotsToFileFeature"));
}
{
@@ -549,10 +548,9 @@ void RiuMainPlotWindow::selectedObjectsChanged()
if (selectedWellLogPlot)
{
if (selectedWellLogPlot->viewer())
if (selectedWellLogPlot->viewWidget())
{
setActiveViewer(selectedWellLogPlot->viewer());
setActiveViewer(selectedWellLogPlot->viewWidget());
}
isActiveWellLogPlotChanged = true;
}
@@ -575,9 +573,9 @@ void RiuMainPlotWindow::selectedObjectsChanged()
if (selectedSummaryPlot)
{
if (selectedSummaryPlot->viewer())
if (selectedSummaryPlot->viewWidget())
{
setActiveViewer(selectedSummaryPlot->viewer());
setActiveViewer(selectedSummaryPlot->viewWidget());
}
isActiveSummaryPlotChanged = true;
}
@@ -597,18 +595,6 @@ void RiuMainPlotWindow::selectedObjectsChanged()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuMainPlotWindow::slotSnapshotAllViewsToFile()
{
RiaApplication* app = RiaApplication::instance();
// Save images in snapshot catalog relative to project directory
QString absolutePathToSnapshotDir = app->createAbsolutePathFromProjectRelativePath("snapshots");
app->saveSnapshotForAllViews(absolutePathToSnapshotDir);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -94,8 +94,6 @@ private:
QByteArray m_initialDockAndToolbarLayout; // Initial dock window and toolbar layout, used to reset GUI
private:
QAction* m_snapshotAllViewsToFile;
QMdiArea* m_mdiArea;
RiuViewer* m_mainViewer;
@@ -107,8 +105,6 @@ private slots:
friend class RiuMdiSubWindow;
void slotSnapshotAllViewsToFile();
void slotBuildWindowActions();
void slotSubWindowActivated(QMdiSubWindow* subWindow);