mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
WIP - added project data model files for well log plots
Added command feature for adding new well log plots (right-click "Plots" in the project tree view). Will create dummy Qwt widget added as an MDI window. TODO: Complete the relations between the entities, and add properties/property editors. Create more advanced viewer widget for plotting of multiple traces with multiple curves. Harmonize MDI stuff with 3D viewers.
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
#include "RiuViewer.h"
|
||||
#include "RiuWellImportWizard.h"
|
||||
#include "RiuDragDrop.h"
|
||||
#include "RiuWellLogViewer.h"
|
||||
#include "RiuWellLogPlot.h"
|
||||
|
||||
#include "cafAboutDialog.h"
|
||||
#include "cafAnimationToolBar.h"
|
||||
@@ -1155,6 +1155,24 @@ QMdiSubWindow* RiuMainWindow::findMdiSubWindow(RiuViewer* viewer)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QMdiSubWindow* RiuMainWindow::findMdiSubWindow(RiuWellLogPlot* viewer)
|
||||
{
|
||||
QList<QMdiSubWindow*> subws = m_mdiArea->subWindowList();
|
||||
int i;
|
||||
for (i = 0; i < subws.size(); ++i)
|
||||
{
|
||||
if (subws[i]->widget() == viewer)
|
||||
{
|
||||
return subws[i];
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -1191,6 +1209,47 @@ void RiuMainWindow::addViewer(RiuViewer* viewer)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::addWellLogViewer(RiuWellLogPlot* viewer)
|
||||
{
|
||||
QMdiSubWindow * subWin = m_mdiArea->addSubWindow(viewer);
|
||||
subWin->resize(400, 400);
|
||||
|
||||
if (m_mdiArea->subWindowList().size() == 1)
|
||||
{
|
||||
// Show first view maximized
|
||||
subWin->showMaximized();
|
||||
}
|
||||
else
|
||||
{
|
||||
subWin->show();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::removeWellLogViewer(RiuWellLogPlot* viewer)
|
||||
{
|
||||
m_mdiArea->removeSubWindow(findMdiSubWindow(viewer));
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::setActiveWellLogViewer(RiuWellLogPlot* viewer)
|
||||
{
|
||||
QMdiSubWindow* subWindow = findMdiSubWindow(viewer);
|
||||
if (subWindow)
|
||||
{
|
||||
m_mdiArea->setActiveSubWindow(subWindow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user