Export well paths dialog. Set default export folder

This commit is contained in:
Bjørn Erik Jensen 2018-09-28 09:13:51 +02:00
parent b584ab905c
commit fe6de813f4
3 changed files with 10 additions and 24 deletions

View File

@ -172,6 +172,7 @@ RicExportWellPathsUi* RicExportSelectedWellPathsFeature::openDialog()
}
RicExportWellPathsUi* featureUi = app->project()->dialogData()->wellPathsExportData();
featureUi->setExportFolder(startPath);
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, featureUi, "Export Well Paths", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
propertyDialog.resize(QSize(600, 60));

View File

@ -43,6 +43,14 @@ RicExportWellPathsUi::RicExportWellPathsUi()
CAF_PDM_InitField(&m_mdStepSize, "MdStepSize", 5.0, "MD Step Size", "", "", "");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicExportWellPathsUi::setExportFolder(const QString& exportFolder)
{
m_exportFolder = exportFolder;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -67,28 +75,6 @@ double RicExportWellPathsUi::mdStepSize() const
return m_mdStepSize;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
//QList<caf::PdmOptionItemInfo> RicExportWellPathsUi::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
// bool* useOptionsOnly)
//{
// QList<caf::PdmOptionItemInfo> options;
//
// if (fieldNeedingOptions == &m_mdStepSize)
// {
// std::vector<RimGridView*> visibleViews;
// RiaApplication::instance()->project()->allVisibleGridViews(visibleViews);
//
// for (RimGridView* v : visibleViews)
// {
// RiaOptionItemFactory::appendOptionItemFromViewNameAndCaseName(v, &options);
// }
// }
//
// return options;
//}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -34,14 +34,13 @@ class RicExportWellPathsUi : public caf::PdmObject
public:
RicExportWellPathsUi();
void setExportFolder(const QString& exportFolder);
void setMdStepSize(double mdStepSize);
QString exportFolder() const;
double mdStepSize() const;
private:
//QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
// bool* useOptionsOnly) override;
void defineEditorAttribute(const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute) override;