mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7632 Preferences : Add separate tab Eclipse Summary
Remove obsolete includes
This commit is contained in:
parent
46f186b72d
commit
1cf1eef048
@ -134,6 +134,16 @@ void caf::AppEnum<RiaDefines::ThemeEnum>::setUp()
|
||||
setDefault( RiaDefines::ThemeEnum::DEFAULT );
|
||||
}
|
||||
|
||||
template <>
|
||||
void AppEnum<RiaDefines::RINavigationPolicy>::setUp()
|
||||
{
|
||||
addItem( RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_CEETRON, "NAVIGATION_POLICY_CEETRON", "Ceetron" );
|
||||
addItem( RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_CAD, "NAVIGATION_POLICY_CAD", "CAD" );
|
||||
addItem( RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_GEOQUEST, "NAVIGATION_POLICY_GEOQUEST", "GEOQUEST" );
|
||||
addItem( RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_RMS, "NAVIGATION_POLICY_RMS", "RMS" );
|
||||
setDefault( RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_RMS );
|
||||
}
|
||||
|
||||
} // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -175,4 +175,12 @@ enum class ThemeEnum
|
||||
UNDEFINED
|
||||
};
|
||||
|
||||
enum class RINavigationPolicy : short
|
||||
{
|
||||
NAVIGATION_POLICY_CEETRON,
|
||||
NAVIGATION_POLICY_CAD,
|
||||
NAVIGATION_POLICY_GEOQUEST,
|
||||
NAVIGATION_POLICY_RMS
|
||||
};
|
||||
|
||||
}; // namespace RiaDefines
|
||||
|
@ -139,19 +139,6 @@
|
||||
#include "gtest/gtest.h"
|
||||
#endif // USE_UNIT_TESTS
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template <>
|
||||
void AppEnum<RiaGuiApplication::RINavigationPolicy>::setUp()
|
||||
{
|
||||
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CEETRON, "NAVIGATION_POLICY_CEETRON", "Ceetron" );
|
||||
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CAD, "NAVIGATION_POLICY_CAD", "CAD" );
|
||||
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_GEOQUEST, "NAVIGATION_POLICY_GEOQUEST", "GEOQUEST" );
|
||||
addItem( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS, "NAVIGATION_POLICY_RMS", "RMS" );
|
||||
setDefault( RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS );
|
||||
}
|
||||
} // namespace caf
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
/// \class RiaGuiApplication
|
||||
@ -404,7 +391,7 @@ bool RiaGuiApplication::useShaders() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaGuiApplication::RINavigationPolicy RiaGuiApplication::navigationPolicy() const
|
||||
RiaDefines::RINavigationPolicy RiaGuiApplication::navigationPolicy() const
|
||||
{
|
||||
return m_preferences->navigationPolicy();
|
||||
}
|
||||
|
@ -66,6 +66,11 @@ class RiuPlotMainWindow;
|
||||
class RiuRecentFileActionProvider;
|
||||
class RiaArgumentParser;
|
||||
|
||||
namespace RiaDefines
|
||||
{
|
||||
enum class RINavigationPolicy : short;
|
||||
}
|
||||
|
||||
namespace caf
|
||||
{
|
||||
class FontHolderInterface;
|
||||
@ -80,15 +85,6 @@ class RiaGuiApplication : public QApplication, public RiaApplication
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
enum class RINavigationPolicy
|
||||
{
|
||||
NAVIGATION_POLICY_CEETRON,
|
||||
NAVIGATION_POLICY_CAD,
|
||||
NAVIGATION_POLICY_GEOQUEST,
|
||||
NAVIGATION_POLICY_RMS
|
||||
};
|
||||
|
||||
public:
|
||||
static bool isRunning();
|
||||
static RiaGuiApplication* instance();
|
||||
@ -106,7 +102,7 @@ public:
|
||||
const QString& snapshotFolderName );
|
||||
bool useShaders() const;
|
||||
|
||||
RINavigationPolicy navigationPolicy() const;
|
||||
RiaDefines::RINavigationPolicy navigationPolicy() const;
|
||||
|
||||
RiuMainWindow* getOrCreateAndShowMainWindow();
|
||||
RiuMainWindow* mainWindow();
|
||||
|
@ -21,9 +21,11 @@
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaValidRegExpValidator.h"
|
||||
|
||||
#include "RifReaderSettings.h"
|
||||
#include "RiuGuiTheme.h"
|
||||
|
||||
@ -76,8 +78,7 @@ RiaPreferences::RiaPreferences()
|
||||
{
|
||||
CAF_PDM_InitField( &m_navigationPolicy,
|
||||
"navigationPolicy",
|
||||
caf::AppEnum<RiaGuiApplication::RINavigationPolicy>(
|
||||
RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS ),
|
||||
caf::AppEnum<RiaDefines::RINavigationPolicy>( RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_RMS ),
|
||||
"Navigation Mode",
|
||||
"",
|
||||
"",
|
||||
@ -445,15 +446,23 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
otherGroup->add( &holoLensDisableCertificateVerification );
|
||||
otherGroup->add( &m_useUndoRedo );
|
||||
}
|
||||
else if ( uiConfigName == RiaPreferences::tabNameEclipse() )
|
||||
else if ( uiConfigName == RiaPreferences::tabNameEclipseGrid() )
|
||||
{
|
||||
caf::PdmUiGroup* newCaseBehaviourGroup = uiOrdering.addNewGroup( "Behavior When Loading Data" );
|
||||
newCaseBehaviourGroup->add( &autocomputeDepthRelatedProperties );
|
||||
newCaseBehaviourGroup->add( &loadAndShowSoil );
|
||||
|
||||
m_readerSettings->uiOrdering( uiConfigName, *newCaseBehaviourGroup );
|
||||
|
||||
}
|
||||
else if ( uiConfigName == RiaPreferences::tabNameEclipseSummary() )
|
||||
{
|
||||
m_summaryPreferences->appendRestartFileGroup( uiOrdering );
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Summary Data Import" );
|
||||
|
||||
m_summaryPreferences()->uiOrdering( uiConfigName, *group );
|
||||
}
|
||||
}
|
||||
else if ( uiConfigName == RiaPreferences::tabNamePlotting() )
|
||||
{
|
||||
@ -483,12 +492,6 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
m_pageRightMargin.uiCapability()->setUiName( "Right Margin" + unitLabel );
|
||||
m_pageTopMargin.uiCapability()->setUiName( "Top Margin" + unitLabel );
|
||||
m_pageBottomMargin.uiCapability()->setUiName( "Bottom Margin" + unitLabel );
|
||||
|
||||
{
|
||||
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Summary Data Import" );
|
||||
|
||||
m_summaryPreferences()->uiOrdering( uiConfigName, *group );
|
||||
}
|
||||
}
|
||||
|
||||
else if ( uiConfigName == RiaPreferences::tabNameScripting() )
|
||||
@ -620,9 +623,17 @@ QString RiaPreferences::tabNameGeneral()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferences::tabNameEclipse()
|
||||
QString RiaPreferences::tabNameEclipseGrid()
|
||||
{
|
||||
return "Eclipse";
|
||||
return "Eclipse Grid";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaPreferences::tabNameEclipseSummary()
|
||||
{
|
||||
return "Eclipse Summary";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -689,7 +700,8 @@ QStringList RiaPreferences::tabNames()
|
||||
QStringList names;
|
||||
|
||||
names << tabNameGeneral();
|
||||
names << tabNameEclipse();
|
||||
names << tabNameEclipseGrid();
|
||||
names << tabNameEclipseSummary();
|
||||
names << tabNamePlotting();
|
||||
names << tabNameScripting();
|
||||
names << tabNameExport();
|
||||
@ -993,7 +1005,7 @@ RiaDefines::MeshModeType RiaPreferences::defaultMeshModeType() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaGuiApplication::RINavigationPolicy RiaPreferences::navigationPolicy() const
|
||||
RiaDefines::RINavigationPolicy RiaPreferences::navigationPolicy() const
|
||||
{
|
||||
return m_navigationPolicy();
|
||||
}
|
||||
|
@ -23,7 +23,6 @@
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaFontCache.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaQDateTimeTools.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
@ -110,12 +109,12 @@ public:
|
||||
static QString defaultMultiLateralWellNamePattern();
|
||||
|
||||
// 3D view
|
||||
RiaDefines::MeshModeType defaultMeshModeType() const;
|
||||
RiaGuiApplication::RINavigationPolicy navigationPolicy() const;
|
||||
int defaultScaleFactorZ() const;
|
||||
bool showLegendBackground() const;
|
||||
bool showInfoBox() const;
|
||||
bool showGridBox() const;
|
||||
RiaDefines::MeshModeType defaultMeshModeType() const;
|
||||
RiaDefines::RINavigationPolicy navigationPolicy() const;
|
||||
int defaultScaleFactorZ() const;
|
||||
bool showLegendBackground() const;
|
||||
bool showInfoBox() const;
|
||||
bool showGridBox() const;
|
||||
|
||||
// Script paths
|
||||
QString pythonExecutable() const;
|
||||
@ -165,7 +164,8 @@ protected:
|
||||
|
||||
private:
|
||||
static QString tabNameGeneral();
|
||||
static QString tabNameEclipse();
|
||||
static QString tabNameEclipseGrid();
|
||||
static QString tabNameEclipseSummary();
|
||||
static QString tabNamePlotting();
|
||||
static QString tabNameScripting();
|
||||
static QString tabNameExport();
|
||||
@ -223,13 +223,13 @@ private:
|
||||
caf::PdmChildField<RiaPreferencesSummary*> m_summaryPreferences;
|
||||
|
||||
// 3d view
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::MeshModeType>> m_defaultMeshModeType;
|
||||
caf::PdmField<caf::AppEnum<RiaGuiApplication::RINavigationPolicy>> m_navigationPolicy;
|
||||
caf::PdmField<int> m_defaultScaleFactorZ;
|
||||
caf::PdmField<bool> m_showLegendBackground;
|
||||
caf::PdmField<bool> m_enableFaultsByDefault;
|
||||
caf::PdmField<bool> m_showInfoBox;
|
||||
caf::PdmField<bool> m_showGridBox;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::MeshModeType>> m_defaultMeshModeType;
|
||||
caf::PdmField<caf::AppEnum<RiaDefines::RINavigationPolicy>> m_navigationPolicy;
|
||||
caf::PdmField<int> m_defaultScaleFactorZ;
|
||||
caf::PdmField<bool> m_showLegendBackground;
|
||||
caf::PdmField<bool> m_enableFaultsByDefault;
|
||||
caf::PdmField<bool> m_showInfoBox;
|
||||
caf::PdmField<bool> m_showGridBox;
|
||||
|
||||
QStringList m_tabNames;
|
||||
};
|
||||
|
@ -162,14 +162,14 @@ RiaPreferencesSummary::RiaPreferencesSummary()
|
||||
"" );
|
||||
m_showSummaryTimeAsLongString.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
CAF_PDM_InitField( &m_useMultipleThreadsWhenLoadingSummaryData,
|
||||
"useMultipleThreadsWhenLoadingSummaryData",
|
||||
CAF_PDM_InitField( &m_useMultipleThreadsWhenLoadingSummaryCases,
|
||||
"useMultipleThreadsWhenLoadingSummaryCases",
|
||||
true,
|
||||
"Use Multiple Threads for Import of Summary Files",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
m_useMultipleThreadsWhenLoadingSummaryData.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
m_useMultipleThreadsWhenLoadingSummaryCases.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -277,7 +277,7 @@ bool RiaPreferencesSummary::showSummaryTimeAsLongString() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferencesSummary::useMultipleThreadsWhenLoadingSummaryData() const
|
||||
{
|
||||
return m_useMultipleThreadsWhenLoadingSummaryData;
|
||||
return m_useMultipleThreadsWhenLoadingSummaryCases;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -336,7 +336,7 @@ void RiaPreferencesSummary::defineEditorAttribute( const caf::PdmFieldHandle* fi
|
||||
caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_createOptimizedSummaryDataFile || field == &m_showSummaryTimeAsLongString ||
|
||||
field == &m_useMultipleThreadsWhenLoadingSummaryData || field == &m_summaryRestartFilesShowImportDialog ||
|
||||
field == &m_useMultipleThreadsWhenLoadingSummaryCases || field == &m_summaryRestartFilesShowImportDialog ||
|
||||
field == &m_useOptimizedSummaryDataFile || field == &m_createH5SummaryDataFile || field == &m_checkH5FileTimeStamp )
|
||||
{
|
||||
auto myAttr = dynamic_cast<caf::PdmUiCheckBoxEditorAttribute*>( attribute );
|
||||
@ -370,7 +370,7 @@ void RiaPreferencesSummary::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
}
|
||||
}
|
||||
|
||||
uiOrdering.add( &m_useMultipleThreadsWhenLoadingSummaryData );
|
||||
uiOrdering.add( &m_useMultipleThreadsWhenLoadingSummaryCases );
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ private:
|
||||
caf::PdmField<SummaryHistoryCurveStyleModeType> m_defaultSummaryHistoryCurveStyle;
|
||||
|
||||
caf::PdmField<bool> m_showSummaryTimeAsLongString;
|
||||
caf::PdmField<bool> m_useMultipleThreadsWhenLoadingSummaryData;
|
||||
caf::PdmField<bool> m_useMultipleThreadsWhenLoadingSummaryCases;
|
||||
|
||||
caf::PdmField<bool> m_createOptimizedSummaryDataFile;
|
||||
caf::PdmField<bool> m_useOptimizedSummaryDataFile;
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "RiaBaseDefs.h"
|
||||
#include "RiaImportEclipseCaseTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaProjectModifier.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RifEclipseSummaryTools.h"
|
||||
#include "RifSummaryCaseRestartSelector.h"
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "RicOpenLastUsedFileFeature.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
@ -43,7 +44,7 @@ void RicOpenLastUsedFileFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
if ( !app->askUserToSaveModifiedProject() ) return;
|
||||
|
||||
QString fileName = app->preferences()->lastUsedProjectFileName;
|
||||
QString fileName = RiaPreferences::current()->lastUsedProjectFileName;
|
||||
|
||||
if ( app->loadProject( fileName ) )
|
||||
{
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicWellPathExportCompletionDataFeatureImpl.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaFilePathTools.h"
|
||||
#include "RiaFractureDefines.h"
|
||||
@ -138,7 +137,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions( const std::v
|
||||
std::unique_ptr<QTextStream> fractureTransmissibilityExportInformationStream = nullptr;
|
||||
QFile fractureTransmissibilityExportInformationFile;
|
||||
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
if ( prefs->includeFractureDebugInfoFile() )
|
||||
{
|
||||
QDir outputDir = QDir( exportSettings.folder );
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicSnapshotViewToPdfFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
@ -72,7 +71,7 @@ void RicSnapshotViewToPdfFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicSnapshotViewToFileFeature::savePlotPdfReportAs( fileName, plotWindow );
|
||||
|
||||
if ( RiaApplication::instance()->preferences()->openExportedPdfInViewer() )
|
||||
if ( RiaPreferences::current()->openExportedPdfInViewer() )
|
||||
{
|
||||
QDesktopServices::openUrl( fileName );
|
||||
}
|
||||
|
@ -19,7 +19,6 @@
|
||||
#include "RicPlotProductionRateFeature.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RifEclipseSummaryAddress.h"
|
||||
#include "RifSummaryReaderInterface.h"
|
||||
|
@ -195,14 +195,14 @@ std::vector<VdeExportPart> RicHoloLensExportImpl::partsForExport( const RimGridV
|
||||
VdeExportPart exportPart( visiblePart.p() );
|
||||
exportPart.setSourceObjectType( VdeExportPart::OBJ_TYPE_GRID );
|
||||
|
||||
cvf::Color3f lineColor = RiaApplication::instance()->preferences()->defaultGridLineColors();
|
||||
cvf::Color3f lineColor = RiaPreferences::current()->defaultGridLineColors();
|
||||
|
||||
auto linesSourceInfo = dynamic_cast<const RivMeshLinesSourceInfo*>( visiblePart->sourceInfo() );
|
||||
if ( linesSourceInfo )
|
||||
{
|
||||
if ( dynamic_cast<RimFaultInView*>( linesSourceInfo->object() ) )
|
||||
{
|
||||
lineColor = RiaApplication::instance()->preferences()->defaultFaultGridLineColors();
|
||||
lineColor = RiaPreferences::current()->defaultFaultGridLineColors();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ RicHoloLensSession* RicHoloLensSession::createSession( const QString&
|
||||
|
||||
newSession->m_restClient = new RicHoloLensRestClient( serverUrl, sessionName, newSession );
|
||||
|
||||
if ( RiaApplication::instance()->preferences()->holoLensDisableCertificateVerification() )
|
||||
if ( RiaPreferences::current()->holoLensDisableCertificateVerification() )
|
||||
{
|
||||
RiaLogging::warning( "HoloLens: Disabling certificate verification for HTTPS connections" );
|
||||
newSession->m_restClient->dbgDisableCertificateVerification();
|
||||
@ -80,7 +80,7 @@ RicHoloLensSession* RicHoloLensSession::createSession( const QString&
|
||||
|
||||
newSession->m_sessionObserver = sessionObserver;
|
||||
|
||||
const QString dbgExportFolder = RiaApplication::instance()->preferences()->holoLensExportFolder();
|
||||
const QString dbgExportFolder = RiaPreferences::current()->holoLensExportFolder();
|
||||
if ( !dbgExportFolder.isEmpty() )
|
||||
{
|
||||
newSession->m_dbgFileExportDestinationFolder = dbgExportFolder;
|
||||
@ -99,7 +99,7 @@ RicHoloLensSession* RicHoloLensSession::createDummyFileBackedSession()
|
||||
|
||||
newSession->m_isSessionValid = true;
|
||||
|
||||
newSession->m_dbgFileExportDestinationFolder = RiaApplication::instance()->preferences()->holoLensExportFolder();
|
||||
newSession->m_dbgFileExportDestinationFolder = RiaPreferences::current()->holoLensExportFolder();
|
||||
|
||||
return newSession;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ void RicAddScriptPathFeature::onActionTriggered( bool isChecked )
|
||||
RiuFileDialogTools::getExistingDirectory( Riu3DMainWindowTools::mainWindowWidget(), "Select script folder" );
|
||||
if ( !selectedFolder.isEmpty() )
|
||||
{
|
||||
QString filePathString = RiaApplication::instance()->preferences()->scriptDirectories();
|
||||
QString filePathString = RiaPreferences::current()->scriptDirectories();
|
||||
|
||||
QChar separator( ';' );
|
||||
if ( !filePathString.isEmpty() && !filePathString.endsWith( separator, Qt::CaseInsensitive ) )
|
||||
@ -63,7 +63,7 @@ void RicAddScriptPathFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
filePathString += selectedFolder;
|
||||
|
||||
RiaApplication::instance()->preferences()->scriptDirectories = filePathString;
|
||||
RiaPreferences::current()->scriptDirectories = filePathString;
|
||||
RiaApplication::instance()->applyPreferences();
|
||||
|
||||
RicRefreshScriptsFeature::refreshScriptFolders();
|
||||
|
@ -55,12 +55,12 @@ void RicDeleteScriptPathFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
QString toBeRemoved = scriptCollection->directory;
|
||||
|
||||
QString originalFilePathString = RiaApplication::instance()->preferences()->scriptDirectories();
|
||||
QString originalFilePathString = RiaPreferences::current()->scriptDirectories();
|
||||
QStringList allFilePaths = originalFilePathString.split( ";" );
|
||||
allFilePaths.removeOne( toBeRemoved );
|
||||
QString filePathString = allFilePaths.join( ";" );
|
||||
|
||||
RiaApplication::instance()->preferences()->scriptDirectories = filePathString;
|
||||
RiaPreferences::current()->scriptDirectories = filePathString;
|
||||
RiaApplication::instance()->applyPreferences();
|
||||
|
||||
RicRefreshScriptsFeature::refreshScriptFolders();
|
||||
|
@ -96,7 +96,7 @@ void RicExecuteScriptFeature::executeScript( RimCalcScript* calcScript )
|
||||
QProcessEnvironment penv = app->pythonProcessEnvironment();
|
||||
|
||||
RiuProcessMonitor* processMonitor = RiuMainWindow::instance()->processMonitor();
|
||||
if ( RiaApplication::instance()->preferences()->showPythonDebugInfo() && processMonitor )
|
||||
if ( RiaPreferences::current()->showPythonDebugInfo() && processMonitor )
|
||||
{
|
||||
QStringList debugInfo;
|
||||
debugInfo << "----- Launching Python interpreter -----";
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicRefreshScriptsFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimProject.h"
|
||||
@ -59,7 +58,7 @@ void RicRefreshScriptsFeature::setupActionLook( QAction* actionToSetup )
|
||||
void RicRefreshScriptsFeature::refreshScriptFolders()
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
proj->setScriptDirectories( prefs->scriptDirectories() );
|
||||
proj->scriptCollection()->updateConnectedEditors();
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "RicCreatePlotFromTemplateByShortcutFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RicSummaryPlotTemplateTools.h"
|
||||
@ -51,7 +51,7 @@ bool RicCreatePlotFromTemplateByShortcutFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicCreatePlotFromTemplateByShortcutFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
QString fileName = RiaApplication::instance()->preferences()->defaultPlotTemplateAbsolutePath();
|
||||
QString fileName = RiaPreferences::current()->defaultPlotTemplateAbsolutePath();
|
||||
|
||||
if ( !QFile::exists( fileName ) )
|
||||
{
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicReloadPlotTemplatesFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "PlotTemplates/RimPlotTemplateFolderItem.h"
|
||||
@ -34,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicReloadPlotTemplatesFeature, "RicReloadPlotTemplatesFeatu
|
||||
void RicReloadPlotTemplatesFeature::rebuildFromDisc()
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
proj->setPlotTemplateFolders( prefs->plotTemplateFolders() );
|
||||
proj->rootPlotTemlateItem()->updateConnectedEditors();
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicSummaryPlotTemplateTools.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
@ -334,8 +333,8 @@ QString RicSummaryPlotTemplateTools::selectPlotTemplatePath()
|
||||
{
|
||||
QString fileName = ui.selectedPlotTemplates().front()->absoluteFilePath();
|
||||
|
||||
RiaApplication::instance()->preferences()->setDefaultPlotTemplatePath( fileName );
|
||||
RiaApplication::instance()->preferences()->writePreferencesToApplicationStore();
|
||||
RiaPreferences::current()->setDefaultPlotTemplatePath( fileName );
|
||||
RiaPreferences::current()->writePreferencesToApplicationStore();
|
||||
|
||||
return fileName;
|
||||
}
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
#include "RiuGuiTheme.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
@ -406,7 +405,7 @@ void RicNewContourMapViewFeature::assignDefaultResultAndLegend( RimEclipseContou
|
||||
{
|
||||
contourMap->cellResult()->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE );
|
||||
|
||||
if ( RiaApplication::instance()->preferences()->loadAndShowSoil )
|
||||
if ( RiaPreferences::current()->loadAndShowSoil )
|
||||
{
|
||||
contourMap->cellResult()->setResultVariable( "SOIL" );
|
||||
}
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "RicWellPathsImportSsihubFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimFileWellPath.h"
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
#include "RicEditSummaryCrossPlotFeature.h"
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RicSummaryPlotEditorDialog.h"
|
||||
#include "RicSummaryPlotEditorUi.h"
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "RicEditSummaryPlotFeature.h"
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
#include "RicSummaryPlotEditorDialog.h"
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicNewDefaultSummaryPlotFeature.h"
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
#include "RicEditSummaryPlotFeature.h"
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicNewSummaryCrossPlotFeature.h"
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
#include "RicEditSummaryPlotFeature.h"
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RicNewSummaryPlotFeature.h"
|
||||
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
|
||||
#include "RicEditSummaryPlotFeature.h"
|
||||
|
@ -20,8 +20,6 @@
|
||||
|
||||
#include "RiaFilePathTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaPreferencesSummary.h"
|
||||
#include "RiaStdStringTools.h"
|
||||
#include "RiaStringEncodingTools.h"
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RifEclipseUnifiedRestartFileAccess.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
@ -148,7 +147,7 @@ bool RifEclipseUnifiedRestartFileAccess::openFile()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RifEclipseUnifiedRestartFileAccess::useResultIndexFile() const
|
||||
{
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
const RifReaderSettings* readerSettings = prefs->readerSettings();
|
||||
|
||||
return readerSettings->useResultIndexFile();
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RifReaderEclipseOutput.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaCellDividingTools.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaLogging.h"
|
||||
@ -498,7 +497,7 @@ bool RifReaderEclipseOutput::open( const QString& fileName, RigEclipseCaseData*
|
||||
|
||||
{
|
||||
auto task = progress.task( "Handling well information", 10 );
|
||||
if ( !RiaApplication::instance()->preferences()->readerSettings()->skipWellData() )
|
||||
if ( !RiaPreferences::current()->readerSettings()->skipWellData() )
|
||||
{
|
||||
readWellCells( mainEclGrid, isImportOfCompleteMswDataEnabled() );
|
||||
}
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "RivGeoMechPartMgr.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RifGeoMechReaderInterface.h"
|
||||
@ -157,7 +156,7 @@ void RivFemPartPartMgr::generatePartGeometry( RivFemPartGeometryGenerator& geoBu
|
||||
part->setTransform( m_scaleTransform.p() );
|
||||
part->updateBoundingBox();
|
||||
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
cvf::ref<cvf::Effect> eff;
|
||||
caf::MeshEffectGenerator effGen( prefs->defaultGridLineColors() );
|
||||
@ -217,7 +216,7 @@ void RivFemPartPartMgr::updateCellColor( cvf::Color4f color )
|
||||
m_defaultColor = color.toColor3f();
|
||||
|
||||
// Update mesh colors as well, in case of change
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
cvf::ref<cvf::Effect> eff;
|
||||
if ( m_surfaceFaces.notNull() )
|
||||
|
@ -124,7 +124,7 @@ void RivExtrudedCurveIntersectionPartMgr::applySingleColorEffect()
|
||||
}
|
||||
|
||||
// Update mesh colors as well, in case of change
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
if ( m_intersectionGridLines.notNull() )
|
||||
{
|
||||
@ -340,7 +340,7 @@ void RivExtrudedCurveIntersectionPartMgr::createFaultLabelParts( const std::vect
|
||||
}
|
||||
}
|
||||
|
||||
cvf::Color3f faultLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
|
||||
cvf::Color3f faultLabelColor = RiaPreferences::current()->defaultWellLabelColor();
|
||||
if ( faultInViewColl ) faultLabelColor = faultInViewColl->faultLabelColor();
|
||||
|
||||
cvf::Font* font = RiaGuiApplication::instance()->defaultSceneFont();
|
||||
@ -415,7 +415,7 @@ void RivExtrudedCurveIntersectionPartMgr::createFaultLabelParts( const std::vect
|
||||
|
||||
part->updateBoundingBox();
|
||||
|
||||
caf::MeshEffectGenerator gen( RiaApplication::instance()->preferences()->defaultFaultGridLineColors() );
|
||||
caf::MeshEffectGenerator gen( RiaPreferences::current()->defaultFaultGridLineColors() );
|
||||
cvf::ref<cvf::Effect> eff = gen.generateCachedEffect();
|
||||
|
||||
part->setEffect( eff.p() );
|
||||
|
@ -498,7 +498,7 @@ void RivFaultPartMgr::updatePartEffect()
|
||||
updateNNCColors( 0, nullptr );
|
||||
|
||||
// Update mesh colors as well, in case of change
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
cvf::ref<cvf::Effect> eff;
|
||||
caf::MeshEffectGenerator faultEffGen( prefs->defaultFaultGridLineColors() );
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RivGridPartMgr.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
|
||||
@ -175,7 +174,7 @@ void RivGridPartMgr::generatePartGeometry( cvf::StructGridGeometryGenerator& geo
|
||||
part->setTransform( m_scaleTransform.p() );
|
||||
part->updateBoundingBox();
|
||||
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
cvf::ref<cvf::Effect> eff;
|
||||
caf::MeshEffectGenerator effGen( prefs->defaultGridLineColors() );
|
||||
@ -227,7 +226,7 @@ void RivGridPartMgr::updateCellColor( cvf::Color4f color )
|
||||
// Update mesh colors as well, in case of change
|
||||
if ( m_surfaceGridLines.notNull() )
|
||||
{
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
caf::MeshEffectGenerator effGen( prefs->defaultGridLineColors() );
|
||||
cvf::ref<cvf::Effect> eff = effGen.generateCachedEffect();
|
||||
m_surfaceGridLines->setEffect( eff.p() );
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RiaBoundingBoxTools.h"
|
||||
#include "RiaColorTools.h"
|
||||
#include "RiaFontCache.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
@ -186,7 +187,7 @@ void RivMeasurementPartMgr::buildPolyLineParts( const cvf::Camera*
|
||||
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
|
||||
auto backgroundColor = app->preferences()->defaultViewerBackgroundColor;
|
||||
auto backgroundColor = RiaPreferences::current()->defaultViewerBackgroundColor;
|
||||
auto fontColor = RiuGuiTheme::getColorByVariableName( "textColor" );
|
||||
QString text = m_measurement->label();
|
||||
auto labelPosition = pointsInDisplay.back();
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RivSurfacePartMgr.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "ProjectDataModel/RimCase.h"
|
||||
@ -206,7 +205,7 @@ void RivSurfacePartMgr::updateNativeSurfaceColors()
|
||||
|
||||
// Update mesh colors as well, in case of change
|
||||
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
|
||||
if ( m_intersectionGridLines.notNull() )
|
||||
{
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RimAnnotationTextAppearance.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimAnnotationCollection.h"
|
||||
@ -33,7 +32,7 @@ RimAnnotationTextAppearance::RimAnnotationTextAppearance()
|
||||
{
|
||||
CAF_PDM_InitObject( "TextAnnotation", ":/WellCollection.png", "", "" );
|
||||
|
||||
auto prefs = RiaApplication::instance()->preferences();
|
||||
auto prefs = RiaPreferences::current();
|
||||
auto defaultBackgroundColor = prefs->defaultViewerBackgroundColor();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_fontSize, "FontSize", "Font Size", "", "", "" );
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "RimEnsembleFractureStatistics.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaInterpolationTools.h"
|
||||
#include "RiaLogging.h"
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "RimFaultInViewCollection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaPreferences.h"
|
||||
@ -76,7 +75,7 @@ RimFaultInViewCollection::RimFaultInViewCollection()
|
||||
"" );
|
||||
|
||||
CAF_PDM_InitField( &showFaultLabel, "ShowFaultLabel", false, "Show Labels", "", "", "" );
|
||||
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
|
||||
cvf::Color3f defWellLabelColor = RiaPreferences::current()->defaultWellLabelColor();
|
||||
CAF_PDM_InitField( &faultLabelColor, "FaultLabelColor", defWellLabelColor, "Label Color", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &showNNCs, "ShowNNCs", true, "Show NNCs", "", "", "" );
|
||||
|
@ -306,8 +306,7 @@ RimGeoMechView* RimGeoMechCase::createCopyAndAddView( const RimGeoMechView* sour
|
||||
|
||||
RimGeoMechCase* RimGeoMechCase::createCopy( const QString& newInputFileName )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
RimProject* project = RimProject::current();
|
||||
|
||||
RimGeoMechCase* copycase = dynamic_cast<RimGeoMechCase*>(
|
||||
this->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RimPlotTemplateFolderItem.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimPlotTemplateFileItem.h"
|
||||
@ -242,5 +241,5 @@ void RimPlotTemplateFolderItem::createSubFolderItemsFromFolderPaths( const QStri
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPlotTemplateFolderItem::searchSubFoldersRecursively() const
|
||||
{
|
||||
return RiaApplication::instance()->preferences()->searchPlotTemplateFoldersRecursively();
|
||||
return RiaPreferences::current()->searchPlotTemplateFoldersRecursively();
|
||||
}
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include "Rim3dView.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaFieldHandleTools.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaOptionItemFactory.h"
|
||||
@ -63,7 +64,6 @@
|
||||
#include "cvfTransform.h"
|
||||
#include "cvfViewport.h"
|
||||
|
||||
#include "cvfScene.h"
|
||||
#include <climits>
|
||||
|
||||
namespace caf
|
||||
@ -90,8 +90,7 @@ Rim3dView::Rim3dView()
|
||||
, m_animationIntervalMillisec( 50 )
|
||||
, m_animationTimerUsers( 0 )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RiaPreferences* preferences = app->preferences();
|
||||
RiaPreferences* preferences = RiaPreferences::current();
|
||||
CVF_ASSERT( preferences );
|
||||
|
||||
CAF_PDM_InitObject( "3d View", "", "", "" );
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RimEclipseCase.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaFieldHandleTools.h"
|
||||
#include "RiaPreferences.h"
|
||||
@ -186,7 +185,7 @@ void RimEclipseCase::ensureDeckIsParsedForEquilData()
|
||||
{
|
||||
QString includeFileAbsolutePathPrefix;
|
||||
{
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
RiaPreferences* prefs = RiaPreferences::current();
|
||||
if ( prefs->readerSettings() )
|
||||
{
|
||||
includeFileAbsolutePathPrefix = prefs->readerSettings()->includeFileAbsolutePathPrefix();
|
||||
@ -293,7 +292,7 @@ RimEclipseView* RimEclipseCase::createAndAddReservoirView()
|
||||
{
|
||||
rimEclipseView->cellResult()->setResultType( RiaDefines::ResultCatType::DYNAMIC_NATIVE );
|
||||
|
||||
auto prefs = RiaApplication::instance()->preferences();
|
||||
auto prefs = RiaPreferences::current();
|
||||
if ( prefs->loadAndShowSoil )
|
||||
{
|
||||
rimEclipseView->cellResult()->setResultVariable( "SOIL" );
|
||||
@ -695,7 +694,7 @@ void RimEclipseCase::ensureFaultDataIsComputed()
|
||||
RigEclipseCaseData* rigEclipseCase = eclipseCaseData();
|
||||
if ( rigEclipseCase )
|
||||
{
|
||||
bool computeFaults = RiaApplication::instance()->preferences()->readerSettings()->importFaults();
|
||||
bool computeFaults = RiaPreferences::current()->readerSettings()->importFaults();
|
||||
if ( computeFaults )
|
||||
{
|
||||
RigActiveCellInfo* actCellInfo = rigEclipseCase->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL );
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RimEclipseInputCase.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaFieldHandleTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
@ -36,7 +37,6 @@
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RimEclipseInputProperty.h"
|
||||
#include "RimEclipseInputPropertyCollection.h"
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
@ -107,7 +107,7 @@ bool RimEclipseInputCase::openDataFileSet( const QStringList& fileNames )
|
||||
this->setReservoirData( new RigEclipseCaseData( this ) );
|
||||
}
|
||||
|
||||
bool importFaults = RiaApplication::instance()->preferences()->readerSettings()->importFaults();
|
||||
bool importFaults = RiaPreferences::current()->readerSettings()->importFaults();
|
||||
|
||||
std::vector<QString> allErrorMessages;
|
||||
|
||||
@ -221,8 +221,7 @@ bool RimEclipseInputCase::openEclipseGridFile()
|
||||
computeCachedData();
|
||||
}
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
if ( app->preferences()->autocomputeDepthRelatedProperties )
|
||||
if ( RiaPreferences::current()->autocomputeDepthRelatedProperties )
|
||||
{
|
||||
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeDepthRelatedResults();
|
||||
results( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDepthRelatedResults();
|
||||
|
@ -224,8 +224,7 @@ bool RimEclipseResultCase::importGridAndResultMetaData( bool showTimeStepFilter
|
||||
outReader->setHdf5FileName( m_sourSimFileName().path() );
|
||||
}
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
if ( app->preferences()->autocomputeDepthRelatedProperties )
|
||||
if ( RiaPreferences::current()->autocomputeDepthRelatedProperties )
|
||||
{
|
||||
results( RiaDefines::PorosityModelType::MATRIX_MODEL )->computeDepthRelatedResults();
|
||||
results( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDepthRelatedResults();
|
||||
|
@ -15,9 +15,9 @@
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimPlotWindow.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPlotWindowRedrawScheduler.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
@ -227,7 +227,7 @@ void RimPlotWindow::renderWindowContent( QPaintDevice* paintDevice )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QPageLayout RimPlotWindow::pageLayout() const
|
||||
{
|
||||
QPageLayout defaultPageLayout = RiaApplication::instance()->preferences()->defaultPageLayout();
|
||||
QPageLayout defaultPageLayout = RiaPreferences::current()->defaultPageLayout();
|
||||
QPageLayout customPageLayout;
|
||||
if ( hasCustomPageLayout( &customPageLayout ) )
|
||||
{
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
#include "RimRegularLegendConfig.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimCellEdgeColors.h"
|
||||
@ -589,8 +589,7 @@ void RimRegularLegendConfig::updateLegend()
|
||||
m_significantDigitsInData = numDecimalDigits;
|
||||
m_scalarMapperLegend->setTickPrecision( numDecimalDigits );
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RiaPreferences* preferences = app->preferences();
|
||||
RiaPreferences* preferences = RiaPreferences::current();
|
||||
m_scalarMapperLegend->enableBackground( preferences->showLegendBackground() );
|
||||
m_categoryLegend->enableBackground( preferences->showLegendBackground() );
|
||||
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RimSimWellInViewCollection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaFieldHandleTools.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
@ -181,7 +180,7 @@ RimSimWellInViewCollection::RimSimWellInViewCollection()
|
||||
CAF_PDM_InitField( &spheresScaleFactor, "CellCenterSphereScale", 0.2, "Sphere Radius Scale", "", "", "" );
|
||||
|
||||
// Color
|
||||
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
|
||||
cvf::Color3f defWellLabelColor = RiaPreferences::current()->defaultWellLabelColor();
|
||||
CAF_PDM_InitField( &wellLabelColor, "WellLabelColor", defWellLabelColor, "Label Color", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &showConnectionStatusColors, "ShowConnectionStatusColors", true, "Color Pipe Connections", "", "", "" );
|
||||
|
@ -19,8 +19,8 @@
|
||||
|
||||
#include "RimTernaryLegendConfig.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RimEclipseView.h"
|
||||
@ -207,9 +207,7 @@ void RimTernaryLegendConfig::updateLegend()
|
||||
{
|
||||
m_legend->setRangeText( soilRange, sgasRange, swatRange );
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RiaPreferences* preferences = app->preferences();
|
||||
m_legend->enableBackground( preferences->showLegendBackground() );
|
||||
m_legend->enableBackground( RiaPreferences::current()->showLegendBackground() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,6 @@
|
||||
|
||||
#include "RimViewWindow.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaColorTools.h"
|
||||
#include "RiaFieldHandleTools.h"
|
||||
@ -334,7 +333,7 @@ void RimViewWindow::initAfterRead()
|
||||
void RimViewWindow::defineObjectEditorAttribute( QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
caf::PdmUiTreeViewItemAttribute* treeItemAttribute = dynamic_cast<caf::PdmUiTreeViewItemAttribute*>( attribute );
|
||||
if ( treeItemAttribute && RiaApplication::instance()->preferences()->showViewIdInProjectTree() && id() >= 0 )
|
||||
if ( treeItemAttribute && RiaPreferences::current()->showViewIdInProjectTree() && id() >= 0 )
|
||||
{
|
||||
treeItemAttribute->tags.clear();
|
||||
auto tag = caf::PdmUiTreeViewItemAttribute::Tag::create();
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
#include "RimWellLogFileCurve.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
@ -147,7 +146,7 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
.arg( depthTitle );
|
||||
}
|
||||
|
||||
bool showWarning = !RiaApplication::instance()->preferences()->showLasCurveWithoutTvdWarning();
|
||||
bool showWarning = !RiaPreferences::current()->showLasCurveWithoutTvdWarning();
|
||||
if ( !errMsg.isEmpty() && showWarning )
|
||||
{
|
||||
QString tmp = QString( "The LAS curve can not be displayed.\n%1\n" ).arg( errMsg );
|
||||
|
@ -20,7 +20,6 @@
|
||||
|
||||
#include "RimWellPathCollection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaColorTables.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaLogging.h"
|
||||
@ -89,7 +88,7 @@ RimWellPathCollection::RimWellPathCollection()
|
||||
|
||||
CAF_PDM_InitField( &showWellPathLabel, "ShowWellPathLabel", true, "Show Well Path Labels", "", "", "" );
|
||||
|
||||
cvf::Color3f defWellLabelColor = RiaApplication::instance()->preferences()->defaultWellLabelColor();
|
||||
cvf::Color3f defWellLabelColor = RiaPreferences::current()->defaultWellLabelColor();
|
||||
CAF_PDM_InitField( &wellPathLabelColor, "WellPathLabelColor", defWellLabelColor, "Well label color", "", "", "" );
|
||||
|
||||
CAF_PDM_InitField( &wellPathVisibility,
|
||||
|
@ -109,11 +109,11 @@ RimSummaryTimeAxisProperties::RimSummaryTimeAxisProperties()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_dateFormat, "DateFormat", "Date Label Format", "", "", "" );
|
||||
m_dateFormat.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
m_dateFormat = RiaApplication::instance()->preferences()->dateFormat();
|
||||
m_dateFormat = RiaPreferences::current()->dateFormat();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_timeFormat, "TimeFormat", "Time Label Format", "", "", "" );
|
||||
m_timeFormat.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
|
||||
m_timeFormat = RiaApplication::instance()->preferences()->timeFormat();
|
||||
m_timeFormat = RiaPreferences::current()->timeFormat();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_majorTickmarkCount, "MajorTickmarkCount", "Major Tickmark Count", "", "", "" );
|
||||
|
||||
|
@ -106,8 +106,7 @@ QSize RiuAbstractLegendFrame::minimumSizeHint() const
|
||||
void RiuAbstractLegendFrame::renderTo( QPainter* painter, const QRect& targetRect )
|
||||
{
|
||||
QFont font = this->font();
|
||||
font.setPixelSize(
|
||||
caf::FontTools::pointSizeToPixelSize( RiaApplication::instance()->preferences()->defaultPlotFontSize() ) );
|
||||
font.setPixelSize( caf::FontTools::pointSizeToPixelSize( RiaPreferences::current()->defaultPlotFontSize() ) );
|
||||
this->setFont( font );
|
||||
|
||||
QColor textColor = RiuGuiTheme::getColorByVariableName( "textColor" );
|
||||
|
@ -683,8 +683,7 @@ void RiuMainWindow::createToolBars()
|
||||
toolbar->addAction( polyMeasureAction );
|
||||
}
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
if ( app->preferences()->showTestToolbar() )
|
||||
if ( RiaPreferences::current()->showTestToolbar() )
|
||||
{
|
||||
QToolBar* toolbar = addToolBar( tr( "Test" ) );
|
||||
toolbar->setObjectName( toolbar->windowTitle() );
|
||||
@ -715,8 +714,7 @@ void RiuMainWindow::createDockPanels()
|
||||
m_projectTreeView = new caf::PdmUiTreeView( this );
|
||||
m_projectTreeView->enableSelectionManagerUpdating( true );
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
m_projectTreeView->enableAppendOfClassNameToUiItemText( app->preferences()->appendClassNameToUiText() );
|
||||
m_projectTreeView->enableAppendOfClassNameToUiItemText( RiaPreferences::current()->appendClassNameToUiText() );
|
||||
|
||||
dockWidget->setWidget( m_projectTreeView );
|
||||
|
||||
|
@ -474,7 +474,7 @@ QSize RiuMultiPlotPage::sizeHint() const
|
||||
{
|
||||
if ( m_previewMode )
|
||||
{
|
||||
QPageLayout pageLayout = RiaApplication::instance()->preferences()->defaultPageLayout();
|
||||
QPageLayout pageLayout = RiaPreferences::current()->defaultPageLayout();
|
||||
if ( m_plotDefinition )
|
||||
{
|
||||
pageLayout = m_plotDefinition->pageLayout();
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaBaseDefs.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
#include "RiaSummaryTools.h"
|
||||
@ -445,8 +446,7 @@ void RiuPlotMainWindow::createDockPanels()
|
||||
m_projectTreeView = new caf::PdmUiTreeView( this );
|
||||
m_projectTreeView->enableSelectionManagerUpdating( true );
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
m_projectTreeView->enableAppendOfClassNameToUiItemText( app->preferences()->appendClassNameToUiText() );
|
||||
m_projectTreeView->enableAppendOfClassNameToUiItemText( RiaPreferences::current()->appendClassNameToUiText() );
|
||||
|
||||
dockWidget->setWidget( m_projectTreeView );
|
||||
|
||||
|
@ -190,8 +190,8 @@ void RiuResultQwtPlot::setDefaults()
|
||||
enableAxis( QwtPlot::xTop, false );
|
||||
enableAxis( QwtPlot::yRight, false );
|
||||
|
||||
QString dateFormat = RiaApplication::instance()->preferences()->dateFormat();
|
||||
QString timeFormat = RiaApplication::instance()->preferences()->timeFormat();
|
||||
QString dateFormat = RiaPreferences::current()->dateFormat();
|
||||
QString timeFormat = RiaPreferences::current()->timeFormat();
|
||||
|
||||
RiuQwtPlotTools::enableDateBasedBottomXAxis( this, dateFormat, timeFormat );
|
||||
|
||||
|
@ -370,8 +370,8 @@ void RiuSummaryQwtPlot::contextMenuEvent( QContextMenuEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuSummaryQwtPlot::setDefaults()
|
||||
{
|
||||
QString dateFormat = RiaApplication::instance()->preferences()->dateFormat();
|
||||
QString timeFormat = RiaApplication::instance()->preferences()->timeFormat();
|
||||
QString dateFormat = RiaPreferences::current()->dateFormat();
|
||||
QString timeFormat = RiaPreferences::current()->timeFormat();
|
||||
|
||||
useDateBasedTimeAxis( dateFormat, timeFormat );
|
||||
}
|
||||
|
@ -15,9 +15,9 @@
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiuTextContentFrame.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaFontCache.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
@ -93,8 +93,7 @@ QSize RiuTextContentFrame::minimumSizeHint() const
|
||||
void RiuTextContentFrame::renderTo( QPainter* painter, const QRect& targetRect )
|
||||
{
|
||||
QFont font = this->font();
|
||||
font.setPixelSize(
|
||||
caf::FontTools::pointSizeToPixelSize( RiaApplication::instance()->preferences()->defaultPlotFontSize() ) );
|
||||
font.setPixelSize( caf::FontTools::pointSizeToPixelSize( RiaPreferences::current()->defaultPlotFontSize() ) );
|
||||
this->setFont( font );
|
||||
|
||||
QColor textColor = RiuGuiTheme::getColorByVariableName( "textColor" );
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaBaseDefs.h"
|
||||
#include "RiaColorTools.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
|
||||
@ -716,7 +717,6 @@ void RiuViewer::addColorLegendToBottomLeftCorner( caf::TitledOverlayFrame* added
|
||||
if ( !addedLegend || m_visibleLegends.contains( addedLegend ) ) return;
|
||||
|
||||
RiaGuiApplication* app = RiaGuiApplication::instance();
|
||||
RiaPreferences* preferences = app->preferences();
|
||||
cvf::Rendering* overlayRendering = overlayItemsRendering();
|
||||
CVF_ASSERT( overlayRendering );
|
||||
|
||||
@ -728,7 +728,7 @@ void RiuViewer::addColorLegendToBottomLeftCorner( caf::TitledOverlayFrame* added
|
||||
|
||||
updateLegendTextAndTickMarkColor( addedLegend );
|
||||
|
||||
addedLegend->enableBackground( preferences->showLegendBackground() );
|
||||
addedLegend->enableBackground( RiaPreferences::current()->showLegendBackground() );
|
||||
addedLegend->setBackgroundColor( backgroundColor );
|
||||
addedLegend->setBackgroundFrameColor( frameColor );
|
||||
addedLegend->setFont( app->sceneFont( m_fontPointSize ) );
|
||||
@ -946,19 +946,19 @@ void RiuViewer::updateNavigationPolicy()
|
||||
{
|
||||
switch ( RiaGuiApplication::instance()->navigationPolicy() )
|
||||
{
|
||||
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CAD:
|
||||
case RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_CAD:
|
||||
setNavigationPolicy( new RiuCadNavigation );
|
||||
break;
|
||||
|
||||
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_CEETRON:
|
||||
case RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_CEETRON:
|
||||
setNavigationPolicy( new caf::CeetronPlusNavigation );
|
||||
break;
|
||||
|
||||
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_GEOQUEST:
|
||||
case RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_GEOQUEST:
|
||||
setNavigationPolicy( new RiuGeoQuestNavigation );
|
||||
break;
|
||||
|
||||
case RiaGuiApplication::RINavigationPolicy::NAVIGATION_POLICY_RMS:
|
||||
case RiaDefines::RINavigationPolicy::NAVIGATION_POLICY_RMS:
|
||||
setNavigationPolicy( new RiuRmsNavigation );
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user