(#492) Created folder for well log commands, added "New Well Log LAS Curve" feature

This commit is contained in:
Magne Sjaastad
2015-09-18 09:07:06 +02:00
parent b3620355de
commit 0f5fed1768
21 changed files with 198 additions and 39 deletions

View File

@@ -121,6 +121,7 @@ list( APPEND REFERENCED_CMAKE_FILES
Commands/ToggleCommands/CMakeLists_files.cmake
Commands/OctaveScriptCommands/CMakeLists_files.cmake
Commands/ViewLink/CMakeLists_files.cmake
Commands/WellLogCommands/CMakeLists_files.cmake
)
# Include source file lists from *.cmake files

View File

@@ -21,9 +21,6 @@ ${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewFeature.h
${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewExec.h
${CEE_CURRENT_LIST_DIR}RicNewViewFeature.h
${CEE_CURRENT_LIST_DIR}RicEclipseViewPasteFeature.h
#${CEE_CURRENT_LIST_DIR}RicGridModelsCreateCaseGroupFromFiles.h
#${CEE_CURRENT_LIST_DIR}RicGridModelsImport.h
#${CEE_CURRENT_LIST_DIR}RicGridModelsImportInput.h
${CEE_CURRENT_LIST_DIR}RicPropertyFilterNewExec.h
${CEE_CURRENT_LIST_DIR}RicRangeFilterExecImpl.h
${CEE_CURRENT_LIST_DIR}RicRangeFilterInsertExec.h
@@ -43,12 +40,6 @@ ${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}RicNewWellLogPlotTraceFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotCurveFeature.h
${CEE_CURRENT_LIST_DIR}RicAddWellLogToPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicWellLogPlotCurveFeatureImpl.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeatureImpl.h
${CEE_CURRENT_LIST_DIR}RicWellPathsImportSsihubFeature.h
${CEE_CURRENT_LIST_DIR}RicWellPathsImportFileFeature.h
@@ -82,9 +73,6 @@ ${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewFeature.cpp
${CEE_CURRENT_LIST_DIR}RicEclipsePropertyFilterNewExec.cpp
${CEE_CURRENT_LIST_DIR}RicNewViewFeature.cpp
${CEE_CURRENT_LIST_DIR}RicEclipseViewPasteFeature.cpp
#${CEE_CURRENT_LIST_DIR}RicGridModelsCreateCaseGroupFromFiles.cpp
#${CEE_CURRENT_LIST_DIR}RicGridModelsImport.cpp
#${CEE_CURRENT_LIST_DIR}RicGridModelsImportInput.cpp
${CEE_CURRENT_LIST_DIR}RicRangeFilterExecImpl.cpp
${CEE_CURRENT_LIST_DIR}RicRangeFilterInsertExec.cpp
${CEE_CURRENT_LIST_DIR}RicRangeFilterInsertFeature.cpp
@@ -103,19 +91,11 @@ ${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}RicNewWellLogPlotTraceFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotCurveFeature.cpp
${CEE_CURRENT_LIST_DIR}RicAddWellLogToPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicWellLogPlotCurveFeatureImpl.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeatureImpl.cpp
${CEE_CURRENT_LIST_DIR}RicWellPathsImportSsihubFeature.cpp
${CEE_CURRENT_LIST_DIR}RicWellPathsImportFileFeature.cpp
${CEE_CURRENT_LIST_DIR}RicWellPathsDeleteAllFeature.cpp
${CEE_CURRENT_LIST_DIR}RicWellLogsImportFileFeature.cpp
${CEE_CURRENT_LIST_DIR}RicTileWindowsFeature.cpp

View File

@@ -0,0 +1,37 @@
# Use this workaround until we're on 2.8.3 on all platforms and can use CMAKE_CURRENT_LIST_DIR directly
if (${CMAKE_VERSION} VERSION_GREATER "2.8.2")
set(CEE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_DIR}/)
endif()
set (SOURCE_GROUP_HEADER_FILES
${CEE_CURRENT_LIST_DIR}RicAddWellLogToPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogCurveExtractionFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogCurveLasFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeature.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeatureImpl.h
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotTraceFeature.h
${CEE_CURRENT_LIST_DIR}RicWellLogPlotCurveFeatureImpl.h
${CEE_CURRENT_LIST_DIR}RicWellLogsImportFileFeature.h
)
set (SOURCE_GROUP_SOURCE_FILES
${CEE_CURRENT_LIST_DIR}RicAddWellLogToPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogCurveExtractionFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogCurveLasFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeature.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotFeatureImpl.cpp
${CEE_CURRENT_LIST_DIR}RicNewWellLogPlotTraceFeature.cpp
${CEE_CURRENT_LIST_DIR}RicWellLogPlotCurveFeatureImpl.cpp
${CEE_CURRENT_LIST_DIR}RicWellLogsImportFileFeature.cpp
)
list(APPEND CODE_HEADER_FILES
${SOURCE_GROUP_HEADER_FILES}
)
list(APPEND CODE_SOURCE_FILES
${SOURCE_GROUP_SOURCE_FILES}
)
source_group( "CommandFeature\\WellLog" FILES ${SOURCE_GROUP_HEADER_FILES} ${SOURCE_GROUP_SOURCE_FILES} ${CEE_CURRENT_LIST_DIR}CMakeLists_files.cmake )

View File

@@ -17,7 +17,7 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicNewWellLogPlotCurveFeature.h"
#include "RicNewWellLogCurveExtractionFeature.h"
#include "RicWellLogPlotCurveFeatureImpl.h"
@@ -33,12 +33,12 @@
#include <vector>
CAF_CMD_SOURCE_INIT(RicNewWellLogPlotCurveFeature, "RicNewWellLogPlotCurveFeature");
CAF_CMD_SOURCE_INIT(RicNewWellLogCurveExtractionFeature, "RicNewWellLogCurveExtractionFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewWellLogPlotCurveFeature::isCommandEnabled()
bool RicNewWellLogCurveExtractionFeature::isCommandEnabled()
{
return selectedWellLogPlotTrace() != NULL;
}
@@ -46,7 +46,7 @@ bool RicNewWellLogPlotCurveFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellLogPlotCurveFeature::onActionTriggered(bool isChecked)
void RicNewWellLogCurveExtractionFeature::onActionTriggered(bool isChecked)
{
RimWellLogPlotTrace* wellLogPlotTrace = selectedWellLogPlotTrace();
if (wellLogPlotTrace)
@@ -58,15 +58,15 @@ void RicNewWellLogPlotCurveFeature::onActionTriggered(bool isChecked)
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellLogPlotCurveFeature::setupActionLook(QAction* actionToSetup)
void RicNewWellLogCurveExtractionFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("New Curve");
actionToSetup->setText("New Well Log Extraction Curve");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogPlotTrace* RicNewWellLogPlotCurveFeature::selectedWellLogPlotTrace()
RimWellLogPlotTrace* RicNewWellLogCurveExtractionFeature::selectedWellLogPlotTrace()
{
std::vector<RimWellLogPlotTrace*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
@@ -76,7 +76,7 @@ RimWellLogPlotTrace* RicNewWellLogPlotCurveFeature::selectedWellLogPlotTrace()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellLogPlotCurveFeature::addCurve(RimWellLogPlotTrace* plotTrace)
void RicNewWellLogCurveExtractionFeature::addCurve(RimWellLogPlotTrace* plotTrace)
{
CVF_ASSERT(plotTrace);

View File

@@ -0,0 +1,45 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "cafCmdFeature.h"
class RimWellLogPlotTrace;
//==================================================================================================
///
//==================================================================================================
class RicNewWellLogCurveExtractionFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
public:
static void addCurve(RimWellLogPlotTrace* plotTrace);
protected:
// Overrides
virtual bool isCommandEnabled();
virtual void onActionTriggered( bool isChecked );
virtual void setupActionLook( QAction* actionToSetup );
private:
RimWellLogPlotTrace* selectedWellLogPlotTrace();
};

View File

@@ -0,0 +1,95 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "RicNewWellLogCurveLasFeature.h"
#include "RicWellLogPlotCurveFeatureImpl.h"
#include "RimWellLogFileCurve.h"
#include "RimWellLogPlotTrace.h"
#include "RiuMainWindow.h"
#include "cafSelectionManager.h"
#include <QAction>
#include <vector>
CAF_CMD_SOURCE_INIT(RicNewWellLogCurveLasFeature, "RicNewWellLogCurveLasFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicNewWellLogCurveLasFeature::isCommandEnabled()
{
return selectedWellLogPlotTrace() != NULL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellLogCurveLasFeature::onActionTriggered(bool isChecked)
{
RimWellLogPlotTrace* wellLogPlotTrace = selectedWellLogPlotTrace();
if (wellLogPlotTrace)
{
addCurve(wellLogPlotTrace);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellLogCurveLasFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("New Well Log LAS Curve");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimWellLogPlotTrace* RicNewWellLogCurveLasFeature::selectedWellLogPlotTrace()
{
std::vector<RimWellLogPlotTrace*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
return selection.size() > 0 ? selection[0] : NULL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicNewWellLogCurveLasFeature::addCurve(RimWellLogPlotTrace* plotTrace)
{
CVF_ASSERT(plotTrace);
size_t curveIndex = plotTrace->curveCount();
RimWellLogPlotCurve* curve = new RimWellLogFileCurve();
plotTrace->addCurve(curve);
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromIndex(curveIndex);
curve->setColor(curveColor);
curve->setDescription(QString("Curve %1").arg(plotTrace->curveCount()));
plotTrace->updateConnectedEditors();
RiuMainWindow::instance()->setCurrentObjectInTreeView(curve);
}

View File

@@ -26,7 +26,7 @@ class RimWellLogPlotTrace;
//==================================================================================================
///
//==================================================================================================
class RicNewWellLogPlotCurveFeature : public caf::CmdFeature
class RicNewWellLogCurveLasFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;

View File

@@ -24,7 +24,7 @@
#include "RimProject.h"
#include "RimWellLogPlot.h"
#include "RimWellLogPlotTrace.h"
#include "RicNewWellLogPlotCurveFeature.h"
#include "RicNewWellLogCurveExtractionFeature.h"
#include "RiaApplication.h"
#include <QAction>
@@ -56,7 +56,7 @@ void RicNewWellLogPlotFeature::onActionTriggered(bool isChecked)
plot->updateConnectedEditors();
RiaApplication::instance()->project()->updateConnectedEditors();
RicNewWellLogPlotCurveFeature::addCurve(plotTrace);
RicNewWellLogCurveExtractionFeature::addCurve(plotTrace);
}
//--------------------------------------------------------------------------------------------------

View File

@@ -24,7 +24,7 @@
#include "RiuMainWindow.h"
#include "RicNewWellLogPlotCurveFeature.h"
#include "RicNewWellLogCurveExtractionFeature.h"
#include "cafSelectionManager.h"
@@ -54,7 +54,7 @@ void RicNewWellLogPlotTraceFeature::onActionTriggered(bool isChecked)
plotTrace->setUiName(QString("Trace %1").arg(wellLogPlot->traceCount()));
wellLogPlot->updateConnectedEditors();
RicNewWellLogPlotCurveFeature::addCurve(plotTrace);
RicNewWellLogCurveExtractionFeature::addCurve(plotTrace);
}
}

View File

@@ -820,7 +820,8 @@ void RimProject::actionsBasedOnSelection(QMenu& contextMenu)
}
else if (dynamic_cast<RimWellLogPlotTrace*>(uiItem))
{
commandIds << "RicNewWellLogPlotCurveFeature";
commandIds << "RicNewWellLogCurveExtractionFeature";
commandIds << "RicNewWellLogCurveLasFeature";
commandIds << "RicDeleteItemFeature";
}
else if (dynamic_cast<RimWellLogPlotCurve*>(uiItem))

View File

@@ -1253,12 +1253,12 @@ void RiuMainWindow::addViewer(QWidget* viewer, const std::vector<int>& windowsGe
else
{
subWindowSize = QSize(400, 400);
}
if (!wellLogPlot && m_mdiArea->subWindowList().size() < 1)
{
// Show first 3D view maximized
showMax = true;
if (m_mdiArea->subWindowList().size() < 1)
{
// Show first 3D view maximized
showMax = true;
}
}
}