mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5100 Regression Test : Move summary dialog to main plot window
This commit is contained in:
parent
d6bdc53ee5
commit
2f2a2188fe
@ -27,6 +27,8 @@
|
||||
|
||||
#include "RimSummaryPlot.h"
|
||||
|
||||
#include "RiuPlotMainWindow.h"
|
||||
|
||||
#include "cafPdmUiPropertyViewDialog.h"
|
||||
#include "cafSelectionManager.h"
|
||||
#include "cvfAssert.h"
|
||||
@ -62,14 +64,14 @@ void RicEditSummaryPlotFeature::closeDialogAndResetTargetPlot()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicSummaryCurveCreatorDialog* RicEditSummaryPlotFeature::curveCreatorDialog()
|
||||
{
|
||||
static std::unique_ptr<RicSummaryCurveCreatorDialog> singletonDialog;
|
||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||
|
||||
if ( !singletonDialog )
|
||||
if ( mainPlotWindow )
|
||||
{
|
||||
singletonDialog.reset( new RicSummaryCurveCreatorDialog( nullptr ) );
|
||||
return mainPlotWindow->summaryCurveCreatorDialog();
|
||||
}
|
||||
|
||||
return singletonDialog.get();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellRftPlot.h"
|
||||
|
||||
#include "SummaryPlotCommands/RicSummaryCurveCreatorDialog.h"
|
||||
|
||||
#include "RiuDockWidgetTools.h"
|
||||
#include "RiuDragDrop.h"
|
||||
#include "RiuMdiSubWindow.h"
|
||||
@ -639,6 +641,19 @@ void RiuPlotMainWindow::setFocusToLineEditInSummaryToolBar()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicSummaryCurveCreatorDialog* RiuPlotMainWindow::summaryCurveCreatorDialog()
|
||||
{
|
||||
if ( m_summaryCurveCreatorDialog.isNull() )
|
||||
{
|
||||
m_summaryCurveCreatorDialog = new RicSummaryCurveCreatorDialog( this );
|
||||
}
|
||||
|
||||
return m_summaryCurveCreatorDialog;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "cafPdmPointer.h"
|
||||
#include "cafPdmUiDragDropInterface.h"
|
||||
|
||||
#include <QPointer>
|
||||
|
||||
#include <memory>
|
||||
|
||||
class QMdiSubWindow;
|
||||
@ -32,6 +34,7 @@ class RiuViewer;
|
||||
|
||||
struct RimMdiWindowGeometry;
|
||||
class RimViewWindow;
|
||||
class RicSummaryCurveCreatorDialog;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@ -84,6 +87,8 @@ public:
|
||||
void updateSummaryPlotToolBar( bool forceUpdateUi = false );
|
||||
void setFocusToLineEditInSummaryToolBar();
|
||||
|
||||
RicSummaryCurveCreatorDialog* summaryCurveCreatorDialog();
|
||||
|
||||
protected:
|
||||
void closeEvent( QCloseEvent* event ) override;
|
||||
void keyPressEvent( QKeyEvent* ) override;
|
||||
@ -127,5 +132,7 @@ private:
|
||||
|
||||
caf::PdmUiPropertyView* m_pdmUiPropertyView;
|
||||
|
||||
QPointer<RicSummaryCurveCreatorDialog> m_summaryCurveCreatorDialog;
|
||||
|
||||
std::vector<QWidget*> m_temporaryWidgets;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user