#3557 HoloLens : Add export folder to preferences

This commit is contained in:
Magne Sjaastad 2018-10-25 09:25:53 +02:00
parent 8ad1748597
commit bb674e7504
2 changed files with 23 additions and 0 deletions

View File

@ -105,6 +105,10 @@ RiaPreferences::RiaPreferences(void)
CAF_PDM_InitField(&summaryImportMode, "summaryImportMode", SummaryRestartFilesImportModeType(RiaPreferences::IMPORT), "Default Summary Import Option", "", "", "");
CAF_PDM_InitField(&gridImportMode, "gridImportMode", SummaryRestartFilesImportModeType(RiaPreferences::NOT_IMPORT), "Default Grid Import Option", "", "", "");
CAF_PDM_InitFieldNoDefault(&m_holoLensExportFolder, "holoLensExportFolder", "HoloLens Export Folder", "", "", "");
m_holoLensExportFolder.uiCapability()->setUiLabelPosition(caf::PdmUiItemInfo::TOP);
m_holoLensExportFolder.uiCapability()->setUiEditorTypeName(caf::PdmUiFilePathEditor::uiEditorTypeName());
CAF_PDM_InitFieldNoDefault(&m_readerSettings, "readerSettings", "Reader Settings", "", "", "");
m_readerSettings = new RifReaderSettings;
@ -158,6 +162,14 @@ void RiaPreferences::defineEditorAttribute(const caf::PdmFieldHandle* field, QSt
myAttr->m_useNativeCheckBoxLabel = true;
}
}
else if (field == &m_holoLensExportFolder)
{
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>(attribute);
if (myAttr)
{
myAttr->m_selectDirectory = true;
}
}
}
//--------------------------------------------------------------------------------------------------
@ -219,6 +231,7 @@ void RiaPreferences::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
uiOrdering.add(&m_appendFieldKeywordToToolTipText);
uiOrdering.add(&m_showTestToolbar);
uiOrdering.add(&m_includeFractureDebugInfoFile);
uiOrdering.add(&m_holoLensExportFolder);
}
uiOrdering.skipRemainingFields(true);
@ -307,3 +320,11 @@ bool RiaPreferences::includeFractureDebugInfoFile() const
return RiaApplication::enableDevelopmentFeatures() && m_includeFractureDebugInfoFile();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaPreferences::holoLensExportFolder() const
{
return m_holoLensExportFolder();
}

View File

@ -52,6 +52,7 @@ public:
bool appendFieldKeywordToToolTipText() const;
bool showTestToolbar() const;
bool includeFractureDebugInfoFile() const;
QString holoLensExportFolder() const;
public: // Pdm Fields
caf::PdmField<caf::AppEnum< RiaApplication::RINavigationPolicy > > navigationPolicy;
@ -97,5 +98,6 @@ private:
caf::PdmField<bool> m_appendFieldKeywordToToolTipText;
caf::PdmField<bool> m_showTestToolbar;
caf::PdmField<bool> m_includeFractureDebugInfoFile;
caf::PdmField<QString> m_holoLensExportFolder;
QStringList m_tabNames;
};