mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use helper class to read/write using QSettings
This commit is contained in:
@@ -60,10 +60,7 @@
|
||||
#include "cafAnimationToolBar.h"
|
||||
#include "cafPdmFieldCvfMat4d.h"
|
||||
#include "cafPdmObjectGroup.h"
|
||||
|
||||
// MODTODO
|
||||
//#include "cafPdmUiPropertyDialog.h"
|
||||
|
||||
#include "cafPdmSettings.h"
|
||||
#include "cafPdmUiPropertyView.h"
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
|
||||
@@ -1443,24 +1440,19 @@ void RiuMainWindow::slotShowPerformanceInfo(bool enable)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuMainWindow::slotEditPreferences()
|
||||
{
|
||||
|
||||
// MODTODO
|
||||
// See RPM to find a solution for read/write to registry from pdm object
|
||||
/*
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
caf::PdmUiPropertyDialog propertyDialog(this, app->preferences(), "Preferences");
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(this, app->preferences(), "Preferences", "");
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
// Write preferences using QSettings and apply them to the application
|
||||
app->writeFieldsToApplicationStore(app->preferences());
|
||||
caf::PdmSettings::writeFieldsToApplicationStore(app->preferences());
|
||||
app->applyPreferences();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Read back currently stored values using QSettings
|
||||
app->readFieldsFromApplicationStore(app->preferences());
|
||||
caf::PdmSettings::readFieldsFromApplicationStore(app->preferences());
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -2041,13 +2033,13 @@ void RiuMainWindow::slotShowRegressionTestDialog()
|
||||
RiaRegressionTest regTestConfig;
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
app->readFieldsFromApplicationStore(®TestConfig);
|
||||
caf::PdmSettings::readFieldsFromApplicationStore(®TestConfig);
|
||||
|
||||
caf::PdmUiPropertyViewDialog regressionTestDialog(this, ®TestConfig, "Regression Test", "");
|
||||
if (regressionTestDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
// Write preferences using QSettings and apply them to the application
|
||||
app->writeFieldsToApplicationStore(®TestConfig);
|
||||
caf::PdmSettings::writeFieldsToApplicationStore(®TestConfig);
|
||||
|
||||
QString currentApplicationPath = QDir::currentPath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user