mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Minor issues related to release
* Add shortcut for Plot Editor, and modify how command features are triggered Use Ctrl-E to launch the Plot Editor. * Add optional use of NOECHO and ECHO keywords in GRDECL files * Add ECHO keywords to sector model export * Add Help button to Preferences
This commit is contained in:
@@ -232,6 +232,9 @@ RiaPreferences::RiaPreferences()
|
||||
CAF_PDM_InitField( &m_openExportedPdfInViewer, "openExportedPdfInViewer", false, "Open Exported PDF in Viewer" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_openExportedPdfInViewer );
|
||||
|
||||
CAF_PDM_InitField( &m_writeEchoInGrdeclFiles, "writeEchoInGrdeclFiles", false, "Write NOECHO and ECHO in GRDECL files" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_writeEchoInGrdeclFiles );
|
||||
|
||||
CAF_PDM_InitField( &m_useQtChartsPlotByDefault, "useQtChartsPlotByDefault", false, "Use QtChart as Default Plot Type" );
|
||||
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_useQtChartsPlotByDefault );
|
||||
|
||||
@@ -446,6 +449,7 @@ void RiaPreferences::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering&
|
||||
caf::PdmUiGroup* exportGroup = uiOrdering.addNewGroup( "Export" );
|
||||
exportGroup->add( &csvTextExportFieldSeparator );
|
||||
exportGroup->add( &m_openExportedPdfInViewer );
|
||||
exportGroup->add( &m_writeEchoInGrdeclFiles );
|
||||
}
|
||||
else if ( RiaApplication::enableDevelopmentFeatures() && uiConfigName == RiaPreferences::tabNameSystem() )
|
||||
{
|
||||
@@ -753,6 +757,14 @@ bool RiaPreferences::useQtChartsAsDefaultPlotType() const
|
||||
return m_useQtChartsPlotByDefault;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiaPreferences::writeEchoInGrdeclFiles() const
|
||||
{
|
||||
return m_writeEchoInGrdeclFiles;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -85,6 +85,7 @@ public:
|
||||
void setLastUsedPlotTemplatePath( const QString& templatePath );
|
||||
bool openExportedPdfInViewer() const;
|
||||
bool useQtChartsAsDefaultPlotType() const;
|
||||
bool writeEchoInGrdeclFiles() const;
|
||||
|
||||
RiaDefines::ThemeEnum guiTheme() const;
|
||||
|
||||
@@ -184,6 +185,7 @@ private:
|
||||
caf::PdmField<double> m_pageTopMargin;
|
||||
caf::PdmField<double> m_pageBottomMargin;
|
||||
caf::PdmField<bool> m_openExportedPdfInViewer;
|
||||
caf::PdmField<bool> m_writeEchoInGrdeclFiles;
|
||||
|
||||
caf::PdmField<QString> m_plotTemplateFolders;
|
||||
caf::PdmField<int> m_maxPlotTemplateFoldersDepth;
|
||||
|
@@ -19,6 +19,7 @@
|
||||
#include "RiaNetworkTools.h"
|
||||
|
||||
#include <QDesktopServices>
|
||||
#include <QErrorMessage>
|
||||
#include <QEventLoop>
|
||||
#include <QNetworkAccessManager>
|
||||
#include <QNetworkReply>
|
||||
@@ -26,6 +27,28 @@
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaNetworkTools::openSearchPage( const QString& searchText )
|
||||
{
|
||||
QString url = QString( "https://resinsight.org/search/?q=" ) + searchText;
|
||||
|
||||
RiaNetworkTools::openUrl( url );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaNetworkTools::openUrlWithErrorReporting( const QString& urlString )
|
||||
{
|
||||
if ( !QDesktopServices::openUrl( urlString ) )
|
||||
{
|
||||
QErrorMessage* errorHandler = QErrorMessage::qtHandler();
|
||||
errorHandler->showMessage( "Failed open browser with the following url\n\n" + urlString );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@@ -28,6 +28,8 @@
|
||||
class RiaNetworkTools
|
||||
{
|
||||
public:
|
||||
static void openSearchPage( const QString& searchText );
|
||||
static void openUrlWithErrorReporting( const QString& urlString );
|
||||
static void openUrl( const QString& urlString );
|
||||
static void createAndOpenUrlWithFallback( const QString& urlSubString );
|
||||
static void openUrlWithFallback( const QStringList& urlList );
|
||||
|
Reference in New Issue
Block a user