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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -43,6 +43,7 @@ class RimEclipseCase;
|
||||
class RiuProcessMonitor;
|
||||
class RiuResultInfoPanel;
|
||||
class RiuViewer;
|
||||
class RiuWellLogPlot;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -82,6 +83,10 @@ public:
|
||||
void addViewer(RiuViewer* viewer);
|
||||
void setActiveViewer(RiuViewer* subWindow);
|
||||
|
||||
void addWellLogViewer(RiuWellLogPlot* viewer);
|
||||
void removeWellLogViewer(RiuWellLogPlot* viewer);
|
||||
void setActiveWellLogViewer(RiuWellLogPlot* subWindow);
|
||||
|
||||
void setResultInfo(const QString& info) const;
|
||||
|
||||
void refreshAnimationActions();
|
||||
@@ -123,6 +128,7 @@ private:
|
||||
void updateRecentFileActions();
|
||||
|
||||
QMdiSubWindow* findMdiSubWindow(RiuViewer* viewer);
|
||||
QMdiSubWindow* findMdiSubWindow(RiuWellLogPlot* viewer);
|
||||
|
||||
void storeTreeViewState();
|
||||
void restoreTreeViewState();
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiuWellLogViewer.h"
|
||||
#include "RiuWellLogPlot.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellLogViewer::RiuWellLogViewer(QWidget* parent)
|
||||
RiuWellLogPlot::RiuWellLogPlot(QWidget* parent)
|
||||
: QwtPlot(parent)
|
||||
{
|
||||
}
|
||||
@@ -30,6 +30,6 @@ RiuWellLogViewer::RiuWellLogViewer(QWidget* parent)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellLogViewer::~RiuWellLogViewer()
|
||||
RiuWellLogPlot::~RiuWellLogPlot()
|
||||
{
|
||||
}
|
||||
@@ -23,15 +23,16 @@
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
// RiuWellLogViewer
|
||||
// RiuWellLogPlot
|
||||
//
|
||||
//==================================================================================================
|
||||
class RiuWellLogViewer : public QwtPlot
|
||||
class RiuWellLogPlot : public QwtPlot
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuWellLogViewer(QWidget* parent = NULL);
|
||||
virtual ~RiuWellLogViewer();
|
||||
RiuWellLogPlot(QWidget* parent = NULL);
|
||||
virtual ~RiuWellLogPlot();
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user