2012-05-18 02:45:23 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2019-04-02 06:28:31 -05:00
|
|
|
// Copyright (C) 2019- Equinor ASA
|
|
|
|
// Copyright (C) 2011-2018 Statoil ASA
|
2014-09-23 08:04:57 -05:00
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2012-05-18 02:45:23 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2012-05-18 02:45:23 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2013-03-22 10:24:42 -05:00
|
|
|
#include "RiaPreferences.h"
|
2013-05-06 03:55:00 -05:00
|
|
|
|
2019-04-02 06:28:31 -05:00
|
|
|
#include "RiaColorTables.h"
|
2019-08-19 02:37:42 -05:00
|
|
|
#include "RiaQDateTimeTools.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "RifReaderSettings.h"
|
|
|
|
|
2013-05-06 03:55:00 -05:00
|
|
|
#include "cafPdmFieldCvfColor.h"
|
2014-07-22 05:10:51 -05:00
|
|
|
#include "cafPdmUiCheckBoxEditor.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmUiComboBoxEditor.h"
|
2015-07-31 11:58:23 -05:00
|
|
|
#include "cafPdmUiFieldHandle.h"
|
|
|
|
#include "cafPdmUiFilePathEditor.h"
|
2012-05-18 02:45:23 -05:00
|
|
|
|
2019-08-19 02:37:42 -05:00
|
|
|
#include <QDate>
|
2019-08-26 01:46:16 -05:00
|
|
|
#include <QDir>
|
2019-08-19 02:37:42 -05:00
|
|
|
#include <QLocale>
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
2019-07-30 07:04:51 -05:00
|
|
|
#include <QStandardPaths>
|
|
|
|
#endif
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
namespace caf
|
2018-03-19 07:35:56 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
template <>
|
|
|
|
void RiaPreferences::SummaryRestartFilesImportModeType::setUp()
|
|
|
|
{
|
|
|
|
addItem( RiaPreferences::IMPORT, "IMPORT", "Unified" );
|
|
|
|
addItem( RiaPreferences::SEPARATE_CASES, "SEPARATE_CASES", "Separate Cases" );
|
|
|
|
addItem( RiaPreferences::NOT_IMPORT, "NOT_IMPORT", "Skip" );
|
|
|
|
setDefault( RiaPreferences::IMPORT );
|
|
|
|
}
|
2018-03-19 07:35:56 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
template <>
|
|
|
|
void RiaPreferences::SummaryHistoryCurveStyleModeType::setUp()
|
|
|
|
{
|
|
|
|
addItem( RiaPreferences::SYMBOLS, "SYMBOLS", "Symbols" );
|
|
|
|
addItem( RiaPreferences::LINES, "LINES", "Lines" );
|
|
|
|
addItem( RiaPreferences::SYMBOLS_AND_LINES, "SYMBOLS_AND_LINES", "Symbols and Lines" );
|
|
|
|
setDefault( RiaPreferences::SYMBOLS );
|
|
|
|
}
|
|
|
|
} // namespace caf
|
2018-03-19 07:35:56 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_SOURCE_INIT( RiaPreferences, "RiaPreferences" );
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
RiaPreferences::RiaPreferences( void )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitField( &navigationPolicy,
|
|
|
|
"navigationPolicy",
|
|
|
|
caf::AppEnum<RiaGuiApplication::RINavigationPolicy>( RiaGuiApplication::NAVIGATION_POLICY_RMS ),
|
|
|
|
"Navigation Mode",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &enableGrpcServer,
|
|
|
|
"enableGrpcServer",
|
|
|
|
true,
|
|
|
|
"Enable Python Script Server",
|
|
|
|
"",
|
|
|
|
"Remote Procedure Call Scripting Engine",
|
|
|
|
"" );
|
|
|
|
CAF_PDM_InitField( &defaultGrpcPortNumber, "defaultGrpcPort", 50051, "Default Python Script Server Port", "", "", "" );
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &scriptDirectories, "scriptDirectory", "Shared Script Folder(s)", "", "", "" );
|
|
|
|
scriptDirectories.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
|
|
|
|
|
|
|
// TODO: This only currently works for installed ResInsight.
|
|
|
|
scriptDirectories = QCoreApplication::applicationDirPath() + "/Python/rips/PythonExamples";
|
|
|
|
|
|
|
|
QString defaultTextEditor;
|
2019-07-30 07:04:51 -05:00
|
|
|
#ifdef WIN32
|
2019-09-06 03:40:57 -05:00
|
|
|
defaultTextEditor = QString( "notepad.exe" );
|
2019-07-30 07:04:51 -05:00
|
|
|
#else
|
2019-09-06 03:40:57 -05:00
|
|
|
defaultTextEditor = QString( "kate" );
|
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK( 5, 0, 0 )
|
|
|
|
defaultTextEditor = QStandardPaths::findExecutable( "kate" );
|
|
|
|
if ( defaultTextEditor.isEmpty() )
|
2019-07-30 07:04:51 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
defaultTextEditor = QStandardPaths::findExecutable( "gedit" );
|
2019-07-30 07:04:51 -05:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitField( &scriptEditorExecutable, "scriptEditorExecutable", defaultTextEditor, "Script Editor", "", "", "" );
|
|
|
|
scriptEditorExecutable.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &octaveExecutable, "octaveExecutable", QString( "octave" ), "Octave Executable Location", "", "", "" );
|
|
|
|
octaveExecutable.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
|
|
|
octaveExecutable.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &octaveShowHeaderInfoWhenExecutingScripts,
|
|
|
|
"octaveShowHeaderInfoWhenExecutingScripts",
|
|
|
|
false,
|
|
|
|
"Show Text Header When Executing Scripts",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
octaveShowHeaderInfoWhenExecutingScripts.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &pythonExecutable, "pythonExecutable", QString( "python" ), "Python Executable Location", "", "", "" );
|
|
|
|
pythonExecutable.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
|
|
|
pythonExecutable.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
|
|
|
CAF_PDM_InitField( &showPythonDebugInfo, "pythonDebugInfo", false, "Show Python Debug Info", "", "", "" );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &ssihubAddress, "ssihubAddress", QString( "http://" ), "SSIHUB Address", "", "", "" );
|
|
|
|
ssihubAddress.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &defaultMeshModeType, "defaultMeshModeType", "Show Grid Lines", "", "", "" );
|
|
|
|
CAF_PDM_InitField( &defaultGridLineColors,
|
|
|
|
"defaultGridLineColors",
|
|
|
|
RiaColorTables::defaultGridLineColor(),
|
|
|
|
"Mesh Color",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
CAF_PDM_InitField( &defaultFaultGridLineColors,
|
|
|
|
"defaultFaultGridLineColors",
|
|
|
|
RiaColorTables::defaultFaultLineColor(),
|
|
|
|
"Mesh Color Along Faults",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
CAF_PDM_InitField( &defaultWellLabelColor,
|
|
|
|
"defaultWellLableColor",
|
|
|
|
RiaColorTables::defaultWellLabelColor(),
|
|
|
|
"Well Label Color",
|
|
|
|
"",
|
|
|
|
"The default well label color in new views",
|
|
|
|
"" );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &defaultViewerBackgroundColor,
|
|
|
|
"defaultViewerBackgroundColor",
|
|
|
|
RiaColorTables::defaultViewerBackgroundColor(),
|
|
|
|
"Viewer Background",
|
|
|
|
"",
|
|
|
|
"The viewer background color for new views",
|
|
|
|
"" );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &defaultScaleFactorZ, "defaultScaleFactorZ", 5, "Default Z Scale Factor", "", "", "" );
|
|
|
|
|
|
|
|
caf::AppEnum<RiaFontCache::FontSize> fontSize = RiaFontCache::FONT_SIZE_8;
|
|
|
|
caf::AppEnum<RiaFontCache::FontSize> plotFontSize = RiaFontCache::FONT_SIZE_10;
|
|
|
|
CAF_PDM_InitField( &defaultSceneFontSize, "fontSizeInScene", fontSize, "Viewer Font Size", "", "", "" );
|
|
|
|
CAF_PDM_InitField( &defaultAnnotationFontSize, "defaultAnnotationFontSize", fontSize, "Annotation Font Size", "", "", "" );
|
|
|
|
CAF_PDM_InitField( &defaultWellLabelFontSize, "wellLabelFontSize", fontSize, "Well Label Font Size", "", "", "" );
|
|
|
|
CAF_PDM_InitField( &defaultPlotFontSize, "defaultPlotFontSize", plotFontSize, "Plot Font Size", "", "", "" );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &showLasCurveWithoutTvdWarning,
|
|
|
|
"showLasCurveWithoutTvdWarning",
|
|
|
|
true,
|
|
|
|
"Show LAS Curve Without TVD Warning",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
showLasCurveWithoutTvdWarning.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &useShaders, "useShaders", true, "Use Shaders", "", "", "" );
|
|
|
|
useShaders.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
CAF_PDM_InitField( &showHud, "showHud", false, "Show 3D Information", "", "", "" );
|
|
|
|
showHud.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
CAF_PDM_InitField( &m_appendClassNameToUiText, "appendClassNameToUiText", false, "Show Class Names", "", "", "" );
|
|
|
|
m_appendClassNameToUiText.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
CAF_PDM_InitField( &m_appendFieldKeywordToToolTipText,
|
|
|
|
"appendFieldKeywordToToolTipText",
|
|
|
|
false,
|
|
|
|
"Show Field Keyword in ToolTip",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
m_appendFieldKeywordToToolTipText.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
CAF_PDM_InitField( &m_showTestToolbar, "showTestToolbar", false, "Enable Test Toolbar", "", "", "" );
|
|
|
|
m_showTestToolbar.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
CAF_PDM_InitField( &m_includeFractureDebugInfoFile,
|
|
|
|
"includeFractureDebugInfoFile",
|
|
|
|
false,
|
|
|
|
"Include Fracture Debug Info for Completion Export",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
m_includeFractureDebugInfoFile.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &showLegendBackground, "showLegendBackground", true, "Show Box around Legends", "", "", "" );
|
|
|
|
showLegendBackground.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &lastUsedProjectFileName, "lastUsedProjectFileName", "Last Used Project File", "", "", "" );
|
|
|
|
lastUsedProjectFileName.uiCapability()->setUiHidden( true );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &autocomputeDepthRelatedProperties,
|
|
|
|
"autocomputeDepth",
|
|
|
|
true,
|
|
|
|
"Compute DEPTH Related Properties",
|
|
|
|
"",
|
|
|
|
"DEPTH, DX, DY, DZ, TOP, BOTTOM",
|
|
|
|
"" );
|
|
|
|
autocomputeDepthRelatedProperties.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &loadAndShowSoil, "loadAndShowSoil", true, "Load and Show SOIL", "", "", "" );
|
|
|
|
loadAndShowSoil.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &summaryRestartFilesShowImportDialog,
|
|
|
|
"summaryRestartFilesShowImportDialog",
|
|
|
|
"Show Import Dialog",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
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_InitField( &summaryEnsembleImportMode,
|
|
|
|
"summaryEnsembleImportMode",
|
|
|
|
SummaryRestartFilesImportModeType( RiaPreferences::IMPORT ),
|
|
|
|
"Default Ensemble Summary Import Option",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &defaultSummaryHistoryCurveStyle,
|
|
|
|
"defaultSummaryHistoryCurveStyle",
|
|
|
|
SummaryHistoryCurveStyleModeType( RiaPreferences::SYMBOLS ),
|
|
|
|
"Default Curve Style for History Vectors",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
CAF_PDM_InitField( &defaultSummaryCurvesTextFilter,
|
|
|
|
"defaultSummaryCurvesTextFilter",
|
|
|
|
QString( "FOPT" ),
|
|
|
|
"Default Summary Curves",
|
|
|
|
"",
|
|
|
|
"Semicolon separated list of filters used to create curves in new summary plots",
|
|
|
|
"" );
|
|
|
|
|
|
|
|
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_InitField( &holoLensDisableCertificateVerification,
|
|
|
|
"holoLensDisableCertificateVerification",
|
|
|
|
false,
|
|
|
|
"Disable SSL Certificate Verification (HoloLens)",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
holoLensDisableCertificateVerification.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &csvTextExportFieldSeparator,
|
|
|
|
"csvTextExportFieldSeparator",
|
|
|
|
QString( "," ),
|
|
|
|
"CSV Text Export Field Separator",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
|
|
|
|
CAF_PDM_InitField( &m_showProjectChangedDialog,
|
|
|
|
"showProjectChangedDialog",
|
|
|
|
true,
|
|
|
|
"Show 'Project has changed' dialog",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
m_showProjectChangedDialog.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_readerSettings, "readerSettings", "Reader Settings", "", "", "" );
|
2017-08-29 01:27:42 -05:00
|
|
|
m_readerSettings = new RifReaderSettings;
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_dateFormat, "dateFormat", "Date Format", "", "", "" );
|
|
|
|
m_dateFormat.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
2019-08-19 02:37:42 -05:00
|
|
|
m_dateFormat = RiaQDateTimeTools::supportedDateFormats().front();
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
CAF_PDM_InitFieldNoDefault( &m_timeFormat, "timeFormat", "Time Format", "", "", "" );
|
|
|
|
m_timeFormat.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
2019-08-19 02:37:42 -05:00
|
|
|
m_timeFormat = RiaQDateTimeTools::supportedTimeFormats().front();
|
2019-09-11 02:33:03 -05:00
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_plotTemplateFolders, "plotTemplateFolders", "Plot Template Folder(s)", "", "", "" );
|
|
|
|
m_plotTemplateFolders.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
|
|
|
CAF_PDM_InitField( &m_searchPlotTemplateFoldersRecursively,
|
|
|
|
"SearchPlotTemplateFoldersRecursively",
|
|
|
|
true,
|
|
|
|
"Search Plot Templates Recursively",
|
|
|
|
"",
|
|
|
|
"",
|
|
|
|
"" );
|
|
|
|
m_searchPlotTemplateFoldersRecursively.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
2019-09-30 00:50:51 -05:00
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault( &m_defaultPlotTemplate, "defaultPlotTemplate", "Default Plot Template", "", "", "" );
|
|
|
|
// m_plotTemplateFolders.uiCapability()->setUiEditorTypeName( caf::PdmUiFilePathEditor::uiEditorTypeName() );
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-05-18 02:45:23 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
RiaPreferences::~RiaPreferences( void )
|
2012-05-18 02:45:23 -05:00
|
|
|
{
|
2017-08-29 01:27:42 -05:00
|
|
|
delete m_readerSettings;
|
2012-05-18 02:45:23 -05:00
|
|
|
}
|
2012-06-26 09:10:41 -05:00
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-06-26 09:10:41 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RiaPreferences::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|
|
|
QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute )
|
2012-06-26 09:10:41 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
m_readerSettings->defineEditorAttribute( field, uiConfigName, attribute );
|
2014-07-30 02:13:47 -05:00
|
|
|
|
2012-06-26 09:10:41 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
|
|
|
if ( myAttr )
|
2012-06-26 09:10:41 -05:00
|
|
|
{
|
2019-09-30 00:50:51 -05:00
|
|
|
if ( field == &scriptDirectories || field == &m_plotTemplateFolders )
|
|
|
|
{
|
|
|
|
myAttr->m_selectDirectory = true;
|
|
|
|
myAttr->m_appendUiSelectedFolderToText = true;
|
|
|
|
}
|
|
|
|
else if ( field == &m_defaultPlotTemplate )
|
|
|
|
{
|
|
|
|
auto folders = plotTemplateFolders();
|
|
|
|
if ( !folders.empty() )
|
|
|
|
{
|
|
|
|
myAttr->m_defaultPath = folders.back();
|
|
|
|
}
|
|
|
|
}
|
2012-06-26 09:10:41 -05:00
|
|
|
}
|
|
|
|
}
|
2019-09-30 00:50:51 -05:00
|
|
|
|
|
|
|
if ( field == &octaveShowHeaderInfoWhenExecutingScripts || field == &autocomputeDepthRelatedProperties ||
|
|
|
|
field == &loadAndShowSoil || field == &useShaders || field == &showHud || field == &m_appendClassNameToUiText ||
|
|
|
|
field == &m_appendFieldKeywordToToolTipText || field == &m_showTestToolbar ||
|
|
|
|
field == &m_includeFractureDebugInfoFile || field == &showLasCurveWithoutTvdWarning ||
|
|
|
|
field == &holoLensDisableCertificateVerification || field == &m_showProjectChangedDialog ||
|
|
|
|
field == &m_searchPlotTemplateFoldersRecursively || field == &showLegendBackground )
|
2014-07-22 05:10:51 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiCheckBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiCheckBoxEditorAttribute*>( attribute );
|
|
|
|
if ( myAttr )
|
2014-07-22 05:10:51 -05:00
|
|
|
{
|
|
|
|
myAttr->m_useNativeCheckBoxLabel = true;
|
|
|
|
}
|
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( field == &m_holoLensExportFolder )
|
2018-10-25 02:25:53 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiFilePathEditorAttribute* myAttr = dynamic_cast<caf::PdmUiFilePathEditorAttribute*>( attribute );
|
|
|
|
if ( myAttr )
|
2018-10-25 02:25:53 -05:00
|
|
|
{
|
|
|
|
myAttr->m_selectDirectory = true;
|
|
|
|
}
|
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( field == &defaultSceneFontSize || field == &defaultWellLabelFontSize || field == &defaultAnnotationFontSize ||
|
|
|
|
field == &defaultPlotFontSize )
|
2019-04-14 08:40:37 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiComboBoxEditorAttribute* myAttr = dynamic_cast<caf::PdmUiComboBoxEditorAttribute*>( attribute );
|
|
|
|
myAttr->minimumContentsLength = 2;
|
2019-04-14 08:40:37 -05:00
|
|
|
}
|
2012-06-26 09:10:41 -05:00
|
|
|
}
|
|
|
|
|
2012-10-12 08:05:42 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2012-10-12 08:05:42 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
2012-10-12 08:05:42 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( uiConfigName == RiaPreferences::tabNameGeneral() )
|
2016-08-09 06:09:08 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* colorGroup = uiOrdering.addNewGroup( "Default Colors" );
|
|
|
|
colorGroup->add( &defaultViewerBackgroundColor );
|
|
|
|
colorGroup->add( &defaultGridLineColors, false );
|
|
|
|
colorGroup->add( &defaultFaultGridLineColors );
|
|
|
|
colorGroup->add( &defaultWellLabelColor, false );
|
|
|
|
|
|
|
|
caf::PdmUiGroup* fontGroup = uiOrdering.addNewGroup( "Default Font Sizes" );
|
|
|
|
fontGroup->add( &defaultSceneFontSize );
|
|
|
|
fontGroup->add( &defaultAnnotationFontSize, false );
|
|
|
|
fontGroup->add( &defaultWellLabelFontSize );
|
|
|
|
fontGroup->add( &defaultPlotFontSize, false );
|
|
|
|
|
|
|
|
caf::PdmUiGroup* viewsGroup = uiOrdering.addNewGroup( "3d Views" );
|
|
|
|
viewsGroup->add( &defaultMeshModeType );
|
|
|
|
viewsGroup->add( &navigationPolicy );
|
|
|
|
viewsGroup->add( &defaultScaleFactorZ );
|
|
|
|
viewsGroup->add( &showLegendBackground );
|
|
|
|
viewsGroup->add( &useShaders );
|
|
|
|
viewsGroup->add( &showHud );
|
|
|
|
|
|
|
|
caf::PdmUiGroup* otherGroup = uiOrdering.addNewGroup( "Other" );
|
|
|
|
otherGroup->add( &ssihubAddress );
|
|
|
|
otherGroup->add( &showLasCurveWithoutTvdWarning );
|
|
|
|
otherGroup->add( &holoLensDisableCertificateVerification );
|
2017-04-27 06:16:44 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( uiConfigName == RiaPreferences::tabNameEclipse() )
|
2017-04-27 06:16:44 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* newCaseBehaviourGroup = uiOrdering.addNewGroup( "Behavior When Loading Data" );
|
|
|
|
newCaseBehaviourGroup->add( &autocomputeDepthRelatedProperties );
|
|
|
|
newCaseBehaviourGroup->add( &loadAndShowSoil );
|
|
|
|
|
|
|
|
m_readerSettings->defineUiOrdering( uiConfigName, *newCaseBehaviourGroup );
|
|
|
|
|
|
|
|
caf::PdmUiGroup* restartBehaviourGroup = uiOrdering.addNewGroup( "Origin Files" );
|
|
|
|
restartBehaviourGroup->add( &summaryRestartFilesShowImportDialog );
|
2019-06-21 02:11:10 -05:00
|
|
|
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* group = restartBehaviourGroup->addNewGroup( "Origin Summary Files" );
|
|
|
|
group->add( &summaryImportMode );
|
2019-06-21 02:11:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* group = restartBehaviourGroup->addNewGroup( "Origin Grid Files" );
|
|
|
|
group->add( &gridImportMode );
|
2019-06-21 02:11:10 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* group = restartBehaviourGroup->addNewGroup( "Origin Ensemble Summary Files" );
|
|
|
|
group->add( &summaryEnsembleImportMode );
|
2019-06-21 02:11:10 -05:00
|
|
|
}
|
2019-08-16 08:41:58 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( uiConfigName == RiaPreferences::tabNamePlotting() )
|
2019-08-16 08:41:58 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiOrdering.add( &defaultSummaryCurvesTextFilter );
|
|
|
|
uiOrdering.add( &defaultSummaryHistoryCurveStyle );
|
|
|
|
uiOrdering.add( &m_dateFormat );
|
|
|
|
uiOrdering.add( &m_timeFormat );
|
2019-09-11 02:33:03 -05:00
|
|
|
|
|
|
|
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Plot Templates" );
|
|
|
|
group->add( &m_plotTemplateFolders );
|
|
|
|
group->add( &m_searchPlotTemplateFoldersRecursively );
|
2019-09-30 00:50:51 -05:00
|
|
|
group->add( &m_defaultPlotTemplate );
|
2016-08-09 06:09:08 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( uiConfigName == RiaPreferences::tabNameScripting() )
|
2014-07-30 02:13:47 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* octaveGroup = uiOrdering.addNewGroup( "Octave" );
|
|
|
|
octaveGroup->add( &octaveExecutable );
|
|
|
|
octaveGroup->add( &octaveShowHeaderInfoWhenExecutingScripts );
|
2016-08-09 06:21:59 -05:00
|
|
|
|
2019-07-30 04:29:20 -05:00
|
|
|
#ifdef ENABLE_GRPC
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* pythonGroup = uiOrdering.addNewGroup( "Python" );
|
|
|
|
pythonGroup->add( &enableGrpcServer );
|
|
|
|
pythonGroup->add( &showPythonDebugInfo );
|
|
|
|
pythonGroup->add( &defaultGrpcPortNumber );
|
|
|
|
pythonGroup->add( &pythonExecutable );
|
2019-07-30 04:29:20 -05:00
|
|
|
#endif
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmUiGroup* scriptGroup = uiOrdering.addNewGroup( "Script files" );
|
|
|
|
scriptGroup->add( &scriptDirectories );
|
|
|
|
scriptGroup->add( &scriptEditorExecutable );
|
2014-07-30 02:13:47 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( uiConfigName == RiaPreferences::tabNameExport() )
|
2019-06-23 11:32:05 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiOrdering.add( &csvTextExportFieldSeparator );
|
2019-06-23 11:32:05 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( RiaApplication::enableDevelopmentFeatures() && uiConfigName == RiaPreferences::tabNameSystem() )
|
2017-09-21 05:05:45 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
uiOrdering.add( &m_appendClassNameToUiText );
|
|
|
|
uiOrdering.add( &m_appendFieldKeywordToToolTipText );
|
2019-02-15 02:07:13 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
uiOrdering.add( &m_showProjectChangedDialog );
|
2019-02-15 02:07:13 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
uiOrdering.add( &m_showTestToolbar );
|
|
|
|
uiOrdering.add( &m_includeFractureDebugInfoFile );
|
|
|
|
uiOrdering.add( &m_holoLensExportFolder );
|
2017-09-21 05:05:45 -05:00
|
|
|
}
|
2016-08-09 06:09:08 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
uiOrdering.skipRemainingFields( true );
|
2016-08-09 06:09:08 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2016-08-09 06:09:08 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
QList<caf::PdmOptionItemInfo> RiaPreferences::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
bool* useOptionsOnly )
|
2016-08-09 06:09:08 -05:00
|
|
|
{
|
|
|
|
QList<caf::PdmOptionItemInfo> options;
|
|
|
|
*useOptionsOnly = true;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( fieldNeedingOptions == &gridImportMode )
|
2018-04-13 08:44:28 -05:00
|
|
|
{
|
|
|
|
// Manual option handling in order to one only a subset of the enum values
|
2019-09-06 03:40:57 -05:00
|
|
|
SummaryRestartFilesImportModeType skip( RiaPreferences::NOT_IMPORT );
|
|
|
|
SummaryRestartFilesImportModeType separate( RiaPreferences::SEPARATE_CASES );
|
2018-04-13 08:44:28 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
options.push_back( caf::PdmOptionItemInfo( skip.uiText(), RiaPreferences::NOT_IMPORT ) );
|
|
|
|
options.push_back( caf::PdmOptionItemInfo( separate.uiText(), RiaPreferences::SEPARATE_CASES ) );
|
2018-04-13 08:44:28 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( fieldNeedingOptions == &summaryEnsembleImportMode )
|
2019-06-21 02:11:10 -05:00
|
|
|
{
|
|
|
|
// Manual option handling in order to one only a subset of the enum values
|
2019-09-06 03:40:57 -05:00
|
|
|
SummaryRestartFilesImportModeType skip( RiaPreferences::NOT_IMPORT );
|
|
|
|
SummaryRestartFilesImportModeType allowImport( RiaPreferences::IMPORT );
|
2019-06-21 02:11:10 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
options.push_back( caf::PdmOptionItemInfo( skip.uiText(), RiaPreferences::NOT_IMPORT ) );
|
|
|
|
options.push_back( caf::PdmOptionItemInfo( allowImport.uiText(), RiaPreferences::IMPORT ) );
|
2019-06-21 02:11:10 -05:00
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( fieldNeedingOptions == &m_dateFormat )
|
2019-08-19 02:37:42 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( auto dateFormat : RiaQDateTimeTools::supportedDateFormats() )
|
2019-08-19 02:37:42 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
QDate exampleDate = QDate( 2019, 8, 16 );
|
|
|
|
QString fullDateFormat = RiaQDateTimeTools::dateFormatString( dateFormat,
|
|
|
|
RiaQDateTimeTools::DATE_FORMAT_YEAR_MONTH_DAY );
|
|
|
|
QString uiText = QString( "%1 (%2)" ).arg( fullDateFormat ).arg( exampleDate.toString( fullDateFormat ) );
|
|
|
|
uiText.replace( "AP", "AM/PM" );
|
|
|
|
options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( dateFormat ) ) );
|
2019-08-19 02:37:42 -05:00
|
|
|
}
|
|
|
|
}
|
2019-09-06 03:40:57 -05:00
|
|
|
else if ( fieldNeedingOptions == &m_timeFormat )
|
2019-08-19 02:37:42 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
for ( auto timeFormat : RiaQDateTimeTools::supportedTimeFormats() )
|
2019-08-19 02:37:42 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
QTime exampleTime = QTime( 15, 48, 22 );
|
2019-08-19 02:37:42 -05:00
|
|
|
QString timeFormatString =
|
2019-09-06 03:40:57 -05:00
|
|
|
RiaQDateTimeTools::timeFormatString( timeFormat, RiaQDateTimeTools::TIME_FORMAT_HOUR_MINUTE_SECOND );
|
|
|
|
QString uiText = QString( "%1 (%2)" ).arg( timeFormatString ).arg( exampleTime.toString( timeFormatString ) );
|
|
|
|
uiText.replace( "AP", "AM/PM" );
|
|
|
|
options.push_back( caf::PdmOptionItemInfo( uiText, QVariant::fromValue( timeFormat ) ) );
|
2019-08-19 02:37:42 -05:00
|
|
|
}
|
|
|
|
}
|
2016-08-09 06:09:08 -05:00
|
|
|
|
|
|
|
return options;
|
2012-10-12 08:05:42 -05:00
|
|
|
}
|
|
|
|
|
2019-05-13 06:47:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RiaPreferences::initAfterRead()
|
|
|
|
{
|
|
|
|
// If the stored font size is larger than the maximum enum value, the stored font size is actually point size
|
2019-09-06 03:40:57 -05:00
|
|
|
int defaultSceneFontEnumValue = static_cast<int>( defaultSceneFontSize.v() );
|
|
|
|
if ( defaultSceneFontEnumValue > (int)RiaFontCache::MAX_FONT_SIZE )
|
2019-05-13 06:47:03 -05:00
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
defaultSceneFontSize = RiaFontCache::fontSizeEnumFromPointSize( defaultSceneFontEnumValue );
|
2019-05-13 06:47:03 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-16 08:10:32 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RiaPreferences::tabNameGeneral()
|
|
|
|
{
|
|
|
|
return "General";
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RiaPreferences::tabNameEclipse()
|
|
|
|
{
|
|
|
|
return "Eclipse";
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
QString RiaPreferences::tabNamePlotting()
|
2019-08-16 08:10:32 -05:00
|
|
|
{
|
2019-08-26 03:02:02 -05:00
|
|
|
return "Plotting";
|
2019-08-16 08:10:32 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RiaPreferences::tabNameScripting()
|
|
|
|
{
|
|
|
|
return "Scripting";
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RiaPreferences::tabNameExport()
|
|
|
|
{
|
|
|
|
return "Export";
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RiaPreferences::tabNameSystem()
|
|
|
|
{
|
|
|
|
return "System";
|
|
|
|
}
|
|
|
|
|
2016-08-09 06:09:08 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2016-08-09 06:09:08 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QStringList RiaPreferences::tabNames()
|
|
|
|
{
|
2019-08-16 08:10:32 -05:00
|
|
|
QStringList names;
|
|
|
|
|
|
|
|
names << tabNameGeneral();
|
|
|
|
names << tabNameEclipse();
|
2019-08-26 03:02:02 -05:00
|
|
|
names << tabNamePlotting();
|
2019-08-16 08:10:32 -05:00
|
|
|
names << tabNameScripting();
|
|
|
|
names << tabNameExport();
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( RiaApplication::enableDevelopmentFeatures() )
|
2019-08-16 08:10:32 -05:00
|
|
|
{
|
|
|
|
names << tabNameSystem();
|
|
|
|
}
|
|
|
|
|
|
|
|
return names;
|
2016-08-09 06:09:08 -05:00
|
|
|
}
|
|
|
|
|
2017-08-29 01:27:42 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2017-08-29 01:27:42 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const RifReaderSettings* RiaPreferences::readerSettings() const
|
|
|
|
{
|
|
|
|
return m_readerSettings;
|
|
|
|
}
|
|
|
|
|
2018-09-19 07:43:06 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RiaPreferences::appendClassNameToUiText() const
|
|
|
|
{
|
|
|
|
return RiaApplication::enableDevelopmentFeatures() && m_appendClassNameToUiText();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RiaPreferences::appendFieldKeywordToToolTipText() const
|
|
|
|
{
|
|
|
|
return RiaApplication::enableDevelopmentFeatures() && m_appendFieldKeywordToToolTipText();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RiaPreferences::showTestToolbar() const
|
|
|
|
{
|
|
|
|
return RiaApplication::enableDevelopmentFeatures() && m_showTestToolbar();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RiaPreferences::includeFractureDebugInfoFile() const
|
|
|
|
{
|
|
|
|
return RiaApplication::enableDevelopmentFeatures() && m_includeFractureDebugInfoFile();
|
|
|
|
}
|
|
|
|
|
2019-02-15 02:07:13 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2019-02-15 02:07:13 -06:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RiaPreferences::showProjectChangedDialog() const
|
|
|
|
{
|
2019-09-06 03:40:57 -05:00
|
|
|
if ( !RiaApplication::enableDevelopmentFeatures() )
|
2019-02-15 02:07:13 -06:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return m_showProjectChangedDialog();
|
|
|
|
}
|
|
|
|
|
2018-10-25 02:25:53 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
2019-09-06 03:40:57 -05:00
|
|
|
///
|
2018-10-25 02:25:53 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RiaPreferences::holoLensExportFolder() const
|
|
|
|
{
|
|
|
|
return m_holoLensExportFolder();
|
|
|
|
}
|
|
|
|
|
2019-08-19 02:37:42 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const QString& RiaPreferences::dateFormat() const
|
|
|
|
{
|
|
|
|
return m_dateFormat();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
const QString& RiaPreferences::timeFormat() const
|
|
|
|
{
|
|
|
|
return m_timeFormat();
|
|
|
|
}
|
|
|
|
|
2019-09-11 02:33:03 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
bool RiaPreferences::searchPlotTemplateFoldersRecursively() const
|
|
|
|
{
|
|
|
|
return m_searchPlotTemplateFoldersRecursively();
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QStringList RiaPreferences::plotTemplateFolders() const
|
|
|
|
{
|
|
|
|
QStringList filteredFolders;
|
|
|
|
QStringList pathList = m_plotTemplateFolders().split( ';' );
|
|
|
|
for ( const auto& path : pathList )
|
|
|
|
{
|
|
|
|
QDir dir( path );
|
|
|
|
if ( !path.isEmpty() && dir.exists() && dir.isReadable() )
|
|
|
|
{
|
|
|
|
filteredFolders.push_back( path );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return filteredFolders;
|
|
|
|
}
|
|
|
|
|
2019-09-19 04:39:32 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RiaPreferences::appendPlotTemplateFolders( const QString& folder )
|
|
|
|
{
|
|
|
|
QString folders = m_plotTemplateFolders();
|
|
|
|
if ( !folders.isEmpty() )
|
|
|
|
{
|
|
|
|
folders += ";";
|
|
|
|
}
|
|
|
|
|
|
|
|
folders += folder;
|
|
|
|
|
|
|
|
m_plotTemplateFolders = folders;
|
|
|
|
}
|
|
|
|
|
2019-09-30 00:50:51 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RiaPreferences::defaultPlotTemplateAbsolutePath() const
|
|
|
|
{
|
|
|
|
return m_defaultPlotTemplate().path();
|
|
|
|
}
|
|
|
|
|
2019-09-30 06:28:08 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RiaPreferences::setDefaultPlotTemplatePath( const QString& templatePath )
|
|
|
|
{
|
|
|
|
m_defaultPlotTemplate = templatePath;
|
|
|
|
}
|
|
|
|
|
2019-04-10 09:13:40 -05:00
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
std::map<RiaDefines::FontSettingType, RiaFontCache::FontSize> RiaPreferences::defaultFontSizes() const
|
|
|
|
{
|
|
|
|
std::map<RiaDefines::FontSettingType, RiaFontCache::FontSize> fontSizes;
|
|
|
|
fontSizes[RiaDefines::SCENE_FONT] = defaultSceneFontSize();
|
|
|
|
fontSizes[RiaDefines::ANNOTATION_FONT] = defaultAnnotationFontSize();
|
|
|
|
fontSizes[RiaDefines::WELL_LABEL_FONT] = defaultWellLabelFontSize();
|
|
|
|
fontSizes[RiaDefines::PLOT_FONT] = defaultPlotFontSize();
|
|
|
|
return fontSizes;
|
|
|
|
}
|