Integrated well import wizard in project file

p4#: 22331
This commit is contained in:
Magne Sjaastad
2013-09-06 13:06:39 +02:00
parent 3ee6d0838f
commit 86f5e6017d
6 changed files with 118 additions and 30 deletions

View File

@@ -58,6 +58,7 @@
#include "RimCellEdgeResultSlot.h"
#include "RimCellRangeFilterCollection.h"
#include "Rim3dOverlayInfoConfig.h"
#include "RiuWellImportWizard.h"
@@ -1597,6 +1598,42 @@ void RiuMainWindow::selectedCases(std::vector<RimCase*>& cases)
//--------------------------------------------------------------------------------------------------
void RiuMainWindow::slotImportWellPathsFromSSIHub()
{
RiaApplication* app = RiaApplication::instance();
if (!app->project())
{
return;
}
if (!QFile::exists(app->project()->fileName()))
{
return;
}
QString wellPathsFolderPath;
QString projectFileName = app->project()->fileName();
QFileInfo fileInfo(projectFileName);
wellPathsFolderPath = fileInfo.canonicalPath();
QString wellPathFolderName = fileInfo.completeBaseName() + "_wellpaths";
QDir projFolder(wellPathsFolderPath);
projFolder.mkdir(wellPathFolderName);
wellPathsFolderPath += "/" + wellPathFolderName;
app->project()->wellPathImport;
RiuWellImportWizard wellImportwizard(app->preferences()->ssihubAddress, wellPathsFolderPath, app->project()->wellPathImport, this);
if (QDialog::Accepted == wellImportwizard.exec())
{
QStringList wellPaths = wellImportwizard.absoluteFilePathsToWellPaths();
if (wellPaths.size() > 0)
{
app->addWellPathsToModel(wellPaths);
app->project()->createDisplayModelAndRedrawAllViews();
}
}
/*
CVF_ASSERT(m_ssihubInterface);