mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-09 23:16:00 -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:
parent
b7d04375c8
commit
4e6bb1ded3
@ -79,8 +79,8 @@ set( USER_INTERFACE_FILES
|
||||
UserInterface/RiuDragDrop.h
|
||||
UserInterface/RiuTreeViewEventFilter.cpp
|
||||
UserInterface/RiuTreeViewEventFilter.h
|
||||
UserInterface/RiuWellLogViewer.cpp
|
||||
UserInterface/RiuWellLogViewer.h
|
||||
UserInterface/RiuWellLogPlot.cpp
|
||||
UserInterface/RiuWellLogPlot.h
|
||||
)
|
||||
|
||||
set( SOCKET_INTERFACE_FILES
|
||||
@ -162,7 +162,7 @@ set ( QT_MOC_HEADERS
|
||||
UserInterface/RiuMultiCaseImportDialog.h
|
||||
UserInterface/RiuViewerCommands.h
|
||||
UserInterface/RiuTreeViewEventFilter.h
|
||||
UserInterface/RiuWellLogViewer.h
|
||||
UserInterface/RiuWellLogPlot.h
|
||||
)
|
||||
|
||||
qt4_wrap_cpp( MOC_FILES_CPP ${QT_MOC_HEADERS} )
|
||||
|
@ -43,6 +43,7 @@ ${CEE_CURRENT_LIST_DIR}RicImportInputEclipseCaseFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicCreateGridCaseGroupFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicNewStatisticsCaseFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicComputeStatisticsFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeature.h
|
||||
|
||||
${CEE_CURRENT_LIST_DIR}RicWellPathsImportSsihubFeature.h
|
||||
${CEE_CURRENT_LIST_DIR}RicWellPathsImportFileFeature.h
|
||||
@ -92,6 +93,7 @@ ${CEE_CURRENT_LIST_DIR}RicImportInputEclipseCaseFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicCreateGridCaseGroupFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicNewStatisticsCaseFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicComputeStatisticsFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeature.cpp
|
||||
|
||||
${CEE_CURRENT_LIST_DIR}RicWellPathsImportSsihubFeature.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RicWellPathsImportFileFeature.cpp
|
||||
|
67
ApplicationCode/Commands/RicNewWellLogPlotFeature.cpp
Normal file
67
ApplicationCode/Commands/RicNewWellLogPlotFeature.cpp
Normal file
@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicNewWellLogPlotFeature.h"
|
||||
|
||||
#include "RimMainPlotCollection.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicNewWellLogPlotFeature, "RicNewWellLogPlotFeature");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellLogPlotFeature::isCommandEnabled()
|
||||
{
|
||||
return selectedMainPlotCollection() != NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimMainPlotCollection* mainPlotCollection = selectedMainPlotCollection();
|
||||
if (mainPlotCollection)
|
||||
{
|
||||
mainPlotCollection->addWellLogPlot();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewWellLogPlotFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("New Well Log Plot");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimMainPlotCollection* RicNewWellLogPlotFeature::selectedMainPlotCollection()
|
||||
{
|
||||
std::vector<RimMainPlotCollection*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType(&selection);
|
||||
return selection.size() > 0 ? selection[0] : NULL;
|
||||
}
|
@ -17,20 +17,26 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimWellLogViewer.h"
|
||||
#pragma once
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellLogViewer, "WellLogViewer");
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RimMainPlotCollection;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogViewer::RimWellLogViewer(void)
|
||||
//==================================================================================================
|
||||
class RicNewWellLogPlotFeature : public caf::CmdFeature
|
||||
{
|
||||
}
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogViewer::~RimWellLogViewer(void)
|
||||
{
|
||||
}
|
||||
protected:
|
||||
// Overrides
|
||||
virtual bool isCommandEnabled();
|
||||
virtual void onActionTriggered( bool isChecked );
|
||||
virtual void setupActionLook( QAction* actionToSetup );
|
||||
|
||||
private:
|
||||
|
||||
RimMainPlotCollection* selectedMainPlotCollection();
|
||||
};
|
@ -61,6 +61,10 @@ ${CEE_CURRENT_LIST_DIR}RimCase.h
|
||||
${CEE_CURRENT_LIST_DIR}RimTreeViewStateSerializer.h
|
||||
${CEE_CURRENT_LIST_DIR}RimManagedViewConfig.h
|
||||
${CEE_CURRENT_LIST_DIR}RimManagedViewCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimMainPlotCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogPlot.h
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogPlotTrace.h
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogPlotCurve.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@ -120,7 +124,10 @@ ${CEE_CURRENT_LIST_DIR}RimCase.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimTreeViewStateSerializer.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimManagedViewConfig.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimManagedViewCollection.cpp
|
||||
|
||||
${CEE_CURRENT_LIST_DIR}RimMainPlotCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogPlot.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogPlotTrace.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimWellLogPlotCurve.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES
|
||||
|
75
ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp
Normal file
75
ApplicationCode/ProjectDataModel/RimMainPlotCollection.cpp
Normal file
@ -0,0 +1,75 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
#include "cafPdmUiTreeView.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimMainPlotCollection, "MainPlotCollection");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimMainPlotCollection::RimMainPlotCollection()
|
||||
{
|
||||
CAF_PDM_InitObject("Plots", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&show, "Show", true, "Show plots", "", "", "");
|
||||
show.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&wellLogPlots, "WellLogPlots", "", "", "", "");
|
||||
wellLogPlots.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimMainPlotCollection::~RimMainPlotCollection()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMainPlotCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimMainPlotCollection::objectToggleField()
|
||||
{
|
||||
return &show;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimMainPlotCollection::addWellLogPlot()
|
||||
{
|
||||
RimWellLogPlot* view = new RimWellLogPlot();
|
||||
wellLogPlots.push_back(view);
|
||||
|
||||
RiuMainWindow::instance()->projectTreeView()->setExpanded(this, true);
|
||||
updateConnectedEditors();
|
||||
}
|
53
ApplicationCode/ProjectDataModel/RimMainPlotCollection.h
Normal file
53
ApplicationCode/ProjectDataModel/RimMainPlotCollection.h
Normal file
@ -0,0 +1,53 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
||||
class RimWellLogPlot;
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimMainPlotCollection : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
RimMainPlotCollection();
|
||||
virtual ~RimMainPlotCollection();
|
||||
|
||||
void addWellLogPlot();
|
||||
|
||||
protected:
|
||||
|
||||
// Overridden PDM methods
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
private:
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> show;
|
||||
caf::PdmChildArrayField<RimWellLogPlot*> wellLogPlots;
|
||||
};
|
@ -47,6 +47,7 @@
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathImport.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
@ -86,6 +87,9 @@ RimProject::RimProject(void)
|
||||
wellPathImport.uiCapability()->setUiHidden(true);
|
||||
wellPathImport.uiCapability()->setUiChildrenHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&mainPlotCollection, "MainPlotCollection", "Plots", ":/Default.png", "", "");
|
||||
mainPlotCollection.uiCapability()->setUiHidden(true);
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&commandObjects, "CommandObjects", "CommandObjects", "", "", "");
|
||||
//wellPathImport.uiCapability()->setUiHidden(true);
|
||||
|
||||
@ -107,6 +111,8 @@ RimProject::RimProject(void)
|
||||
scriptCollection->uiCapability()->setUiName("Scripts");
|
||||
scriptCollection->uiCapability()->setUiIcon(QIcon(":/Default.png"));
|
||||
|
||||
mainPlotCollection = new RimMainPlotCollection();
|
||||
|
||||
// For now, create a default first oilfield that contains the rest of the project
|
||||
oilFields.push_back(new RimOilField);
|
||||
|
||||
@ -124,6 +130,7 @@ RimProject::~RimProject(void)
|
||||
|
||||
oilFields.deleteAllChildObjects();
|
||||
if (scriptCollection()) delete scriptCollection();
|
||||
if (mainPlotCollection()) delete mainPlotCollection();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -711,7 +718,11 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
|
||||
{
|
||||
commandIds << "RicDeleteItemFeature";
|
||||
}
|
||||
|
||||
else if (dynamic_cast<RimMainPlotCollection*>(uiItem))
|
||||
{
|
||||
commandIds << "RicNewWellLogPlotFeature";
|
||||
}
|
||||
|
||||
if (dynamic_cast<RimManagedViewCollection*>(uiItem))
|
||||
{
|
||||
RimManagedViewCollection* viewCollection = dynamic_cast<RimManagedViewCollection*>(uiItem);
|
||||
@ -841,6 +852,8 @@ void RimProject::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QS
|
||||
}
|
||||
|
||||
uiTreeOrdering.add(scriptCollection());
|
||||
|
||||
if (mainPlotCollection) uiTreeOrdering.add(mainPlotCollection());
|
||||
|
||||
uiTreeOrdering.setForgetRemainingFields(true);
|
||||
}
|
||||
|
@ -36,6 +36,7 @@ class RimIdenticalGridCaseGroup;
|
||||
class RimOilField;
|
||||
class RimScriptCollection;
|
||||
class RimWellPathImport;
|
||||
class RimMainPlotCollection;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@ -104,4 +105,5 @@ private:
|
||||
caf::PdmChildArrayField<RimEclipseCase*> casesObsolete; // obsolete
|
||||
caf::PdmChildArrayField<RimIdenticalGridCaseGroup*> caseGroupsObsolete; // obsolete
|
||||
|
||||
caf::PdmChildField<RimMainPlotCollection*> mainPlotCollection;
|
||||
};
|
||||
|
89
ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp
Normal file
89
ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp
Normal file
@ -0,0 +1,89 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
#include "RiuWellLogPlot.h"
|
||||
#include "RiuMainWindow.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellLogPlot, "WellLogPlot");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlot::RimWellLogPlot()
|
||||
{
|
||||
CAF_PDM_InitObject("Well Log Plot", ":/WellCollection.png", "", "");
|
||||
|
||||
m_viewer = NULL;
|
||||
|
||||
CAF_PDM_InitField(&showWindow, "ShowWindow", true, "Show well log plot", "", "", "");
|
||||
showWindow.uiCapability()->setUiHidden(true);
|
||||
|
||||
updateViewerWidget();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlot::~RimWellLogPlot()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::updateViewerWidget()
|
||||
{
|
||||
if (showWindow())
|
||||
{
|
||||
bool isViewerCreated = false;
|
||||
if (!m_viewer)
|
||||
{
|
||||
m_viewer = new RiuWellLogPlot(RiuMainWindow::instance());
|
||||
|
||||
RiuMainWindow::instance()->addWellLogViewer(m_viewer);
|
||||
isViewerCreated = true;
|
||||
}
|
||||
|
||||
RiuMainWindow::instance()->setActiveWellLogViewer(m_viewer);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &showWindow)
|
||||
{
|
||||
if (newValue == true)
|
||||
{
|
||||
updateViewerWidget();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellLogPlot::objectToggleField()
|
||||
{
|
||||
return &showWindow;
|
||||
}
|
57
ApplicationCode/ProjectDataModel/RimWellLogPlot.h
Normal file
57
ApplicationCode/ProjectDataModel/RimWellLogPlot.h
Normal file
@ -0,0 +1,57 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
class RiuWellLogPlot;
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellLogPlot : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
RimWellLogPlot();
|
||||
virtual ~RimWellLogPlot();
|
||||
|
||||
caf::PdmField<bool> showWindow;
|
||||
|
||||
protected:
|
||||
|
||||
// Overridden PDM methods
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
private:
|
||||
void updateViewerWidget();
|
||||
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
// TODO: Add traces
|
||||
|
||||
private:
|
||||
QPointer<RiuWellLogPlot> m_viewer;
|
||||
};
|
56
ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.cpp
Normal file
56
ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.cpp
Normal file
@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimWellLogPlotCurve.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellLogPlotCurve, "WellLogPlotCurve");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlotCurve::RimWellLogPlotCurve()
|
||||
{
|
||||
CAF_PDM_InitObject("Curve", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&show, "Show", true, "Show curve", "", "", "");
|
||||
show.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlotCurve::~RimWellLogPlotCurve()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCurve::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellLogPlotCurve::objectToggleField()
|
||||
{
|
||||
return &show;
|
||||
}
|
48
ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.h
Normal file
48
ApplicationCode/ProjectDataModel/RimWellLogPlotCurve.h
Normal file
@ -0,0 +1,48 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellLogPlotCurve : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
RimWellLogPlotCurve();
|
||||
virtual ~RimWellLogPlotCurve();
|
||||
|
||||
protected:
|
||||
|
||||
// Overridden PDM methods
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
private:
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> show;
|
||||
|
||||
// TODO: Add curves
|
||||
};
|
56
ApplicationCode/ProjectDataModel/RimWellLogPlotTrace.cpp
Normal file
56
ApplicationCode/ProjectDataModel/RimWellLogPlotTrace.cpp
Normal file
@ -0,0 +1,56 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- Ceetron Solutions AS
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimWellLogPlotTrace.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimWellLogPlotTrace, "WellLogPlotTrace");
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlotTrace::RimWellLogPlotTrace()
|
||||
{
|
||||
CAF_PDM_InitObject("Trace", "", "", "");
|
||||
|
||||
CAF_PDM_InitField(&show, "Show", true, "Show trace", "", "", "");
|
||||
show.uiCapability()->setUiHidden(true);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimWellLogPlotTrace::~RimWellLogPlotTrace()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotTrace::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmFieldHandle* RimWellLogPlotTrace::objectToggleField()
|
||||
{
|
||||
return &show;
|
||||
}
|
@ -20,16 +20,27 @@
|
||||
#pragma once
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmField.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimWellLogViewer : public caf::PdmObject
|
||||
class RimWellLogPlotTrace : public caf::PdmObject
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimWellLogViewer(void);
|
||||
virtual ~RimWellLogViewer(void);
|
||||
RimWellLogPlotTrace();
|
||||
virtual ~RimWellLogPlotTrace();
|
||||
|
||||
protected:
|
||||
|
||||
// Overridden PDM methods
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||
|
||||
private:
|
||||
virtual caf::PdmFieldHandle* objectToggleField();
|
||||
|
||||
private:
|
||||
caf::PdmField<bool> show;
|
||||
};
|
@ -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();
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user