mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
commit
57b94d8795
@ -153,6 +153,9 @@ RiaApplication::RiaApplication()
|
|||||||
RiaApplication::~RiaApplication()
|
RiaApplication::~RiaApplication()
|
||||||
{
|
{
|
||||||
delete m_preferences;
|
delete m_preferences;
|
||||||
|
delete m_project;
|
||||||
|
|
||||||
|
RiaFontCache::clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -129,3 +129,11 @@ RiaFontCache::FontSize RiaFontCache::fontSizeEnumFromPointSize( int pointSize )
|
|||||||
}
|
}
|
||||||
return closestEnumValue;
|
return closestEnumValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiaFontCache::clear()
|
||||||
|
{
|
||||||
|
ms_fonts.clear();
|
||||||
|
}
|
||||||
|
@ -56,6 +56,8 @@ public:
|
|||||||
static int pointSizeFromFontSizeEnum( FontSize fontSize );
|
static int pointSizeFromFontSizeEnum( FontSize fontSize );
|
||||||
static FontSize fontSizeEnumFromPointSize( int pointSize );
|
static FontSize fontSizeEnumFromPointSize( int pointSize );
|
||||||
|
|
||||||
|
static void clear();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static std::map<FontSize, cvf::ref<caf::FixedAtlasFont>> ms_fonts;
|
static std::map<FontSize, cvf::ref<caf::FixedAtlasFont>> ms_fonts;
|
||||||
};
|
};
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
CAF_CMD_SOURCE_INIT( RicEditSummaryPlotFeature, "RicEditSummaryPlotFeature" );
|
CAF_CMD_SOURCE_INIT( RicEditSummaryPlotFeature, "RicEditSummaryPlotFeature" );
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -60,9 +62,14 @@ void RicEditSummaryPlotFeature::closeDialogAndResetTargetPlot()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RicSummaryCurveCreatorDialog* RicEditSummaryPlotFeature::curveCreatorDialog()
|
RicSummaryCurveCreatorDialog* RicEditSummaryPlotFeature::curveCreatorDialog()
|
||||||
{
|
{
|
||||||
static RicSummaryCurveCreatorDialog* singletonDialog = new RicSummaryCurveCreatorDialog( nullptr );
|
static std::unique_ptr<RicSummaryCurveCreatorDialog> singletonDialog;
|
||||||
|
|
||||||
return singletonDialog;
|
if ( !singletonDialog )
|
||||||
|
{
|
||||||
|
singletonDialog.reset( new RicSummaryCurveCreatorDialog( nullptr ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
return singletonDialog.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog( QWidget* parent )
|
RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog( QWidget* parent )
|
||||||
: QDialog( parent, RiuTools::defaultDialogFlags() )
|
: QDialog( parent, RiuTools::defaultDialogFlags() )
|
||||||
{
|
{
|
||||||
m_curveCreatorSplitterUi = new RicSummaryCurveCreatorSplitterUi( this );
|
m_curveCreatorSplitterUi.reset( new RicSummaryCurveCreatorSplitterUi( this ) );
|
||||||
|
|
||||||
QWidget* propertyWidget = m_curveCreatorSplitterUi->getOrCreateWidget( this );
|
QWidget* propertyWidget = m_curveCreatorSplitterUi->getOrCreateWidget( this );
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog( QWidget* parent )
|
|||||||
|
|
||||||
setWindowTitle( "Plot Editor" );
|
setWindowTitle( "Plot Editor" );
|
||||||
resize( 1200, 800 );
|
resize( 1200, 800 );
|
||||||
connect( m_curveCreatorSplitterUi, SIGNAL( signalCloseButtonPressed() ), this, SLOT( accept() ) );
|
connect( m_curveCreatorSplitterUi.get(), SIGNAL( signalCloseButtonPressed() ), this, SLOT( accept() ) );
|
||||||
|
|
||||||
connect( this, SIGNAL( finished( int ) ), this, SLOT( slotDialogFinished() ) );
|
connect( this, SIGNAL( finished( int ) ), this, SLOT( slotDialogFinished() ) );
|
||||||
}
|
}
|
||||||
@ -54,7 +54,10 @@ RicSummaryCurveCreatorDialog::RicSummaryCurveCreatorDialog( QWidget* parent )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RicSummaryCurveCreatorDialog::~RicSummaryCurveCreatorDialog() {}
|
RicSummaryCurveCreatorDialog::~RicSummaryCurveCreatorDialog()
|
||||||
|
{
|
||||||
|
m_curveCreatorSplitterUi->setPdmObject( nullptr );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
|
@ -20,6 +20,8 @@
|
|||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
namespace caf
|
namespace caf
|
||||||
{
|
{
|
||||||
class PdmObject;
|
class PdmObject;
|
||||||
@ -47,5 +49,5 @@ private slots:
|
|||||||
void slotDialogFinished();
|
void slotDialogFinished();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RicSummaryCurveCreatorSplitterUi* m_curveCreatorSplitterUi;
|
std::unique_ptr<RicSummaryCurveCreatorSplitterUi> m_curveCreatorSplitterUi;
|
||||||
};
|
};
|
||||||
|
@ -65,6 +65,10 @@ void RifEclipseSummaryTools::findSummaryFiles( const QString& inputFile, QString
|
|||||||
std::string extention;
|
std::string extention;
|
||||||
if ( myExtention ) extention = myExtention;
|
if ( myExtention ) extention = myExtention;
|
||||||
|
|
||||||
|
free( myExtention );
|
||||||
|
free( myBase );
|
||||||
|
free( myPath );
|
||||||
|
|
||||||
if ( path.isEmpty() || base.isEmpty() ) return;
|
if ( path.isEmpty() || base.isEmpty() ) return;
|
||||||
|
|
||||||
char* myHeaderFile = nullptr;
|
char* myHeaderFile = nullptr;
|
||||||
|
@ -203,13 +203,7 @@ RimProject::RimProject( void )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RimProject::~RimProject( void )
|
RimProject::~RimProject( void ) {}
|
||||||
{
|
|
||||||
close();
|
|
||||||
|
|
||||||
oilFields.deleteAllChildObjects();
|
|
||||||
if ( scriptCollection() ) delete scriptCollection();
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
|
@ -52,7 +52,7 @@ RiuQwtPlotCurve::RiuQwtPlotCurve( const QString& title )
|
|||||||
|
|
||||||
m_symbolSkipPixelDistance = 10.0f;
|
m_symbolSkipPixelDistance = 10.0f;
|
||||||
|
|
||||||
m_errorBars = new QwtPlotIntervalCurve();
|
m_errorBars = std::unique_ptr<QwtPlotIntervalCurve>( new QwtPlotIntervalCurve() );
|
||||||
m_errorBars->setStyle( QwtPlotIntervalCurve::CurveStyle::NoCurve );
|
m_errorBars->setStyle( QwtPlotIntervalCurve::CurveStyle::NoCurve );
|
||||||
m_errorBars->setSymbol( new QwtIntervalSymbol( QwtIntervalSymbol::Bar ) );
|
m_errorBars->setSymbol( new QwtIntervalSymbol( QwtIntervalSymbol::Bar ) );
|
||||||
m_errorBars->setItemAttribute( QwtPlotItem::Legend, false );
|
m_errorBars->setItemAttribute( QwtPlotItem::Legend, false );
|
||||||
|
@ -23,6 +23,8 @@
|
|||||||
#include "qwt_plot_intervalcurve.h"
|
#include "qwt_plot_intervalcurve.h"
|
||||||
#include "qwt_symbol.h"
|
#include "qwt_symbol.h"
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
class RiuErrorBarsQwtPlotCurve;
|
class RiuErrorBarsQwtPlotCurve;
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
@ -150,10 +152,10 @@ private:
|
|||||||
std::vector<std::pair<size_t, size_t>> m_polyLineStartStopIndices;
|
std::vector<std::pair<size_t, size_t>> m_polyLineStartStopIndices;
|
||||||
float m_symbolSkipPixelDistance;
|
float m_symbolSkipPixelDistance;
|
||||||
|
|
||||||
bool m_showErrorBars;
|
bool m_showErrorBars;
|
||||||
QwtPlotIntervalCurve* m_errorBars;
|
std::unique_ptr<QwtPlotIntervalCurve> m_errorBars;
|
||||||
QwtPlot* m_attachedToPlot;
|
QwtPlot* m_attachedToPlot;
|
||||||
bool m_blackAndWhiteLegendIcon;
|
bool m_blackAndWhiteLegendIcon;
|
||||||
|
|
||||||
std::vector<QString> m_perPointLabels;
|
std::vector<QString> m_perPointLabels;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user