(#435) WIP - Reading metadata from LAS files

This commit is contained in:
Pål Hagen
2015-09-14 16:33:28 +02:00
parent 671506f7cc
commit 095d974e38
17 changed files with 519 additions and 4 deletions

View File

@@ -55,6 +55,7 @@ ${CEE_CURRENT_LIST_DIR}RicLinkVisibleViewsFeature.h
${CEE_CURRENT_LIST_DIR}RicLinkVisibleViewsFeatureUi.h
${CEE_CURRENT_LIST_DIR}RicShowAllLinkedViewsFeature.h
${CEE_CURRENT_LIST_DIR}RicWellLogsImportFileFeature.h
# General delete of any object in a child array field
${CEE_CURRENT_LIST_DIR}RicDeleteItemExec.h
@@ -112,6 +113,8 @@ ${CEE_CURRENT_LIST_DIR}RicLinkVisibleViewsFeature.cpp
${CEE_CURRENT_LIST_DIR}RicLinkVisibleViewsFeatureUi.cpp
${CEE_CURRENT_LIST_DIR}RicShowAllLinkedViewsFeature.cpp
${CEE_CURRENT_LIST_DIR}RicWellLogsImportFileFeature.cpp
# General delete of any object in a child array field
${CEE_CURRENT_LIST_DIR}RicDeleteItemExec.cpp
${CEE_CURRENT_LIST_DIR}RicDeleteItemExecData.cpp

View File

@@ -0,0 +1,69 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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 "RicWellLogsImportFileFeature.h"
#include "RiaApplication.h"
#include "RimProject.h"
#include "RiuMainWindow.h"
#include <QAction>
#include <QFileDialog>
namespace caf
{
CAF_CMD_SOURCE_INIT(RicWellLogsImportFileFeature, "RicWellLogsImportFileFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicWellLogsImportFileFeature::isCommandEnabled()
{
return true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellLogsImportFileFeature::onActionTriggered(bool isChecked)
{
// Open dialog box to select well path files
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->defaultFileDialogDirectory("WELL_LOGS_DIR");
QStringList wellLogFilePaths = QFileDialog::getOpenFileNames(RiuMainWindow::instance(), "Import Well Logs", defaultDir, "Well Logs (*.las);;All Files (*.*)");
if (wellLogFilePaths.size() < 1) return;
// Remember the path to next time
app->setDefaultFileDialogDirectory("WELL_LOGS_DIR", QFileInfo(wellLogFilePaths.last()).absolutePath());
app->addWellLogsToModel(wellLogFilePaths);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellLogsImportFileFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Import Well &Logs from File");
actionToSetup->setIcon(QIcon(":/Well.png"));
}
} // end namespace caf

View File

@@ -0,0 +1,43 @@
/////////////////////////////////////////////////////////////////////////////////
//
// 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"
namespace caf
{
//==================================================================================================
///
//==================================================================================================
class RicWellLogsImportFileFeature : public CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
// Overrides
virtual bool isCommandEnabled();
virtual void onActionTriggered( bool isChecked );
virtual void setupActionLook( QAction* actionToSetup );
};
} // end namespace caf