mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Minor adjustments (#9070)
* Add system commands to test toolbar * #9069 Summary Plot: Update only Y axis values during source stepping * Reduce default brightness for ensemble summary curves * Add a separate flag to control linking of time axis * Make sure interactive zoom in plot is handled * Move message dock window to right dock panel
This commit is contained in:
@@ -19,6 +19,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicDefaultDockConfigGeoMechFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportObjectAndFieldKeywordsFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSaveProjectNoGlobalPathsFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicShowClassNamesFeature.h
|
||||
)
|
||||
|
||||
set(SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -42,6 +43,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicDefaultDockConfigGeoMechFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportObjectAndFieldKeywordsFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicSaveProjectNoGlobalPathsFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicShowClassNamesFeature.cpp
|
||||
)
|
||||
|
||||
list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "RiaRegressionTestRunner.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QDir>
|
||||
|
||||
@@ -46,5 +48,51 @@ void RicLaunchRegressionTestsFeature::onActionTriggered( bool isChecked )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicLaunchRegressionTestsFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Launch Regression Tests" );
|
||||
actionToSetup->setText( "Regression Tests" );
|
||||
}
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicLaunchRegressionTestDialogFeature, "RicLaunchRegressionTestDialogFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicLaunchRegressionTestDialogFeature::showRegressionTestDialog()
|
||||
{
|
||||
RiaRegressionTest regTestConfig;
|
||||
regTestConfig.readSettingsFromApplicationStore();
|
||||
|
||||
caf::PdmUiPropertyViewDialog regressionTestDialog( nullptr, ®TestConfig, "Regression Test", "" );
|
||||
regressionTestDialog.resize( QSize( 600, 350 ) );
|
||||
|
||||
if ( regressionTestDialog.exec() == QDialog::Accepted )
|
||||
{
|
||||
// Write preferences using QSettings and apply them to the application
|
||||
regTestConfig.writeSettingsToApplicationStore();
|
||||
|
||||
RiaRegressionTestRunner::instance()->executeRegressionTests();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicLaunchRegressionTestDialogFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicLaunchRegressionTestDialogFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RicLaunchRegressionTestDialogFeature::showRegressionTestDialog();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicLaunchRegressionTestDialogFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Reg Test Dialog" );
|
||||
}
|
||||
|
||||
@@ -32,3 +32,18 @@ private:
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicLaunchRegressionTestDialogFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
static void showRegressionTestDialog();
|
||||
|
||||
private:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2022 Equinor ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicShowClassNamesFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicShowClassNamesFeature, "RicShowClassNamesFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowClassNamesFeature::isCommandEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowClassNamesFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RiaPreferences::current()->systemPreferences()->setAppendClassNameToUiText( isChecked );
|
||||
|
||||
RiaGuiApplication::instance()->applyPreferences();
|
||||
RiaGuiApplication::instance()->applyGuiPreferences();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowClassNamesFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "Class Names" );
|
||||
actionToSetup->setCheckable( true );
|
||||
actionToSetup->setChecked( isCommandChecked() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicShowClassNamesFeature::isCommandChecked()
|
||||
{
|
||||
return RiaPreferences::current()->systemPreferences()->appendClassNameToUiText();
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2022 Equinor ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicShowClassNamesFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
protected:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
bool isCommandChecked() override;
|
||||
};
|
||||
Reference in New Issue
Block a user