mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Rename GridPlot to MultiPlot throughout
This commit is contained in:
@@ -51,7 +51,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuViewerCommands.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuPickItemInfo.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogTrack.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuGridPlotWindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuMultiPlotWindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotWidget.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotLegend.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuPlotAnnotationTool.h
|
||||
@@ -139,7 +139,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuViewerCommands.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuPickItemInfo.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogTrack.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogPlot.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuGridPlotWindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuMultiPlotWindow.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotWidget.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotLegend.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuPlotAnnotationTool.cpp
|
||||
@@ -201,7 +201,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RiuViewerCommands.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuTreeViewEventFilter.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogPlot.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuWellLogTrack.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuGridPlotWindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuMultiPlotWindow.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotWidget.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuQwtPlotLegend.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RiuRecentFileActionProvider.h
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#include "RimCaseCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseResultCase.h"
|
||||
#include "RimGridPlotWindow.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimMimeData.h"
|
||||
#include "RimMultiPlot.h"
|
||||
#include "RimPlotInterface.h"
|
||||
#include "RimSummaryCase.h"
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
@@ -186,7 +186,7 @@ Qt::ItemFlags RiuDragDrop::flags( const QModelIndex& index ) const
|
||||
itemflags |= Qt::ItemIsDropEnabled;
|
||||
}
|
||||
}
|
||||
else if ( dynamic_cast<RimGridPlotWindow*>( uiItem ) )
|
||||
else if ( dynamic_cast<RimMultiPlot*>( uiItem ) )
|
||||
{
|
||||
if ( RiuTypedPdmObjects<RimPlotInterface>::containsTypedObjects( m_dragItems ) )
|
||||
{
|
||||
@@ -304,11 +304,11 @@ bool RiuDragDrop::dropMimeData( const QMimeData* data, Qt::DropAction action, in
|
||||
return handleWellLogPlotTrackDrop( action, draggedObjects, wellLogPlotTrack, row );
|
||||
}
|
||||
|
||||
RimGridPlotWindow* gridPlotWindow;
|
||||
dropTarget->firstAncestorOrThisOfType( gridPlotWindow );
|
||||
if ( gridPlotWindow )
|
||||
RimMultiPlot* multiPlot;
|
||||
dropTarget->firstAncestorOrThisOfType( multiPlot );
|
||||
if ( multiPlot )
|
||||
{
|
||||
return handleGridPlotWindowDrop( action, draggedObjects, gridPlotWindow, row );
|
||||
return handleMultiPlotDrop( action, draggedObjects, multiPlot, row );
|
||||
}
|
||||
|
||||
RimSummaryCaseCollection* summaryCaseCollection;
|
||||
@@ -444,7 +444,7 @@ bool RiuDragDrop::handleWellLogPlotTrackDrop( Qt::DropAction action,
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
trackTarget->firstAncestorOrThisOfType( wellLogPlot );
|
||||
return handleGridPlotWindowDrop( action, draggedObjects, wellLogPlot, insertAtPosition );
|
||||
return handleMultiPlotDrop( action, draggedObjects, wellLogPlot, insertAtPosition );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -454,10 +454,10 @@ bool RiuDragDrop::handleWellLogPlotTrackDrop( Qt::DropAction action,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiuDragDrop::handleGridPlotWindowDrop( Qt::DropAction action,
|
||||
caf::PdmObjectGroup& draggedObjects,
|
||||
RimGridPlotWindow* gridPlotWindow,
|
||||
int insertAtPosition )
|
||||
bool RiuDragDrop::handleMultiPlotDrop( Qt::DropAction action,
|
||||
caf::PdmObjectGroup& draggedObjects,
|
||||
RimMultiPlot* multiPlot,
|
||||
int insertAtPosition )
|
||||
{
|
||||
std::vector<RimPlotInterface*> plots = RiuTypedPdmObjects<RimPlotInterface>::typedObjectsFromGroup( draggedObjects );
|
||||
if ( plots.size() > 0 )
|
||||
@@ -467,14 +467,14 @@ bool RiuDragDrop::handleGridPlotWindowDrop( Qt::DropAction action,
|
||||
RimPlotInterface* insertAfter = nullptr;
|
||||
if ( insertAtPosition > 0 )
|
||||
{
|
||||
auto visibleTracks = gridPlotWindow->visiblePlots();
|
||||
auto visibleTracks = multiPlot->visiblePlots();
|
||||
if ( !visibleTracks.empty() )
|
||||
{
|
||||
int insertAfterPosition = std::min( insertAtPosition - 1, (int)visibleTracks.size() - 1 );
|
||||
insertAfter = dynamic_cast<RimPlotInterface*>( visibleTracks[insertAfterPosition] );
|
||||
}
|
||||
}
|
||||
gridPlotWindow->movePlotsToThis( plots, insertAfter );
|
||||
multiPlot->movePlotsToThis( plots, insertAfter );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace caf
|
||||
class PdmObjectHandle;
|
||||
}
|
||||
|
||||
class RimGridPlotWindow;
|
||||
class RimMultiPlot;
|
||||
class RimIdenticalGridCaseGroup;
|
||||
class RimSummaryCaseCollection;
|
||||
class RimSummaryCaseMainCollection;
|
||||
@@ -65,10 +65,10 @@ private:
|
||||
caf::PdmObjectGroup& objectGroup,
|
||||
RimWellLogTrack* wellLogPlotTrack,
|
||||
int insertAtPosition );
|
||||
bool handleGridPlotWindowDrop( Qt::DropAction action,
|
||||
caf::PdmObjectGroup& objectGroup,
|
||||
RimGridPlotWindow* gridPlotWindow,
|
||||
int insertAtPosition );
|
||||
bool handleMultiPlotDrop( Qt::DropAction action,
|
||||
caf::PdmObjectGroup& objectGroup,
|
||||
RimMultiPlot* multiPlot,
|
||||
int insertAtPosition );
|
||||
bool handleWellLogPlotCurveDrop( Qt::DropAction action,
|
||||
caf::PdmObjectGroup& objectGroup,
|
||||
RimWellLogCurve* wellLogPlotCurve );
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiuGridPlotWindow.h"
|
||||
#include "RiuMultiPlotWindow.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPlotWindowRedrawScheduler.h"
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "WellLogCommands/RicWellLogPlotTrackFeatureImpl.h"
|
||||
|
||||
#include "RimContextCommandBuilder.h"
|
||||
#include "RimGridPlotWindow.h"
|
||||
#include "RimMultiPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
@@ -57,7 +57,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuGridPlotWindow::RiuGridPlotWindow( RimGridPlotWindow* plotDefinition, QWidget* parent )
|
||||
RiuMultiPlotWindow::RiuMultiPlotWindow( RimMultiPlot* plotDefinition, QWidget* parent )
|
||||
: QWidget( parent )
|
||||
{
|
||||
Q_ASSERT( plotDefinition );
|
||||
@@ -112,7 +112,12 @@ RiuGridPlotWindow::RiuGridPlotWindow( RimGridPlotWindow* plotDefinition, QWidget
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGridPlotWindow* RiuGridPlotWindow::ownerPlotDefinition()
|
||||
RiuMultiPlotWindow::~RiuMultiPlotWindow() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimMultiPlot* RiuMultiPlotWindow::ownerPlotDefinition()
|
||||
{
|
||||
return m_plotDefinition;
|
||||
}
|
||||
@@ -120,7 +125,7 @@ RimGridPlotWindow* RiuGridPlotWindow::ownerPlotDefinition()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimViewWindow* RiuGridPlotWindow::ownerViewWindow() const
|
||||
RimViewWindow* RiuMultiPlotWindow::ownerViewWindow() const
|
||||
{
|
||||
return m_plotDefinition;
|
||||
}
|
||||
@@ -128,7 +133,7 @@ RimViewWindow* RiuGridPlotWindow::ownerViewWindow() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::addPlot( RiuQwtPlotWidget* plotWidget )
|
||||
void RiuMultiPlotWindow::addPlot( RiuQwtPlotWidget* plotWidget )
|
||||
{
|
||||
// Insert the plot to the left of the scroll bar
|
||||
insertPlot( plotWidget, m_plotWidgets.size() );
|
||||
@@ -137,7 +142,7 @@ void RiuGridPlotWindow::addPlot( RiuQwtPlotWidget* plotWidget )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::insertPlot( RiuQwtPlotWidget* plotWidget, size_t index )
|
||||
void RiuMultiPlotWindow::insertPlot( RiuQwtPlotWidget* plotWidget, size_t index )
|
||||
{
|
||||
plotWidget->setDraggable( true ); // Becomes draggable when added to a grid plot window
|
||||
m_plotWidgets.insert( static_cast<int>( index ), plotWidget );
|
||||
@@ -171,7 +176,7 @@ void RiuGridPlotWindow::insertPlot( RiuQwtPlotWidget* plotWidget, size_t index )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::removePlot( RiuQwtPlotWidget* plotWidget )
|
||||
void RiuMultiPlotWindow::removePlot( RiuQwtPlotWidget* plotWidget )
|
||||
{
|
||||
if ( !plotWidget ) return;
|
||||
|
||||
@@ -198,7 +203,7 @@ void RiuGridPlotWindow::removePlot( RiuQwtPlotWidget* plotWidget )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::setPlotTitle( const QString& plotTitle )
|
||||
void RiuMultiPlotWindow::setPlotTitle( const QString& plotTitle )
|
||||
{
|
||||
m_plotTitle->setText( plotTitle );
|
||||
}
|
||||
@@ -206,7 +211,7 @@ void RiuGridPlotWindow::setPlotTitle( const QString& plotTitle )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::setTitleVisible( bool visible )
|
||||
void RiuMultiPlotWindow::setTitleVisible( bool visible )
|
||||
{
|
||||
m_plotTitle->setVisible( visible );
|
||||
}
|
||||
@@ -214,7 +219,7 @@ void RiuGridPlotWindow::setTitleVisible( bool visible )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::setSelectionsVisible( bool visible )
|
||||
void RiuMultiPlotWindow::setSelectionsVisible( bool visible )
|
||||
{
|
||||
for ( RiuQwtPlotWidget* plotWidget : m_plotWidgets )
|
||||
{
|
||||
@@ -232,7 +237,7 @@ void RiuGridPlotWindow::setSelectionsVisible( bool visible )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::setFontSize( int fontSize )
|
||||
void RiuMultiPlotWindow::setFontSize( int fontSize )
|
||||
{
|
||||
QFont font = m_plotTitle->font();
|
||||
|
||||
@@ -244,7 +249,7 @@ void RiuGridPlotWindow::setFontSize( int fontSize )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiuGridPlotWindow::fontSize() const
|
||||
int RiuMultiPlotWindow::fontSize() const
|
||||
{
|
||||
return m_plotTitle->font().pointSize() - 1;
|
||||
}
|
||||
@@ -252,7 +257,7 @@ int RiuGridPlotWindow::fontSize() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiuGridPlotWindow::indexOfPlotWidget( RiuQwtPlotWidget* plotWidget )
|
||||
int RiuMultiPlotWindow::indexOfPlotWidget( RiuQwtPlotWidget* plotWidget )
|
||||
{
|
||||
return m_plotWidgets.indexOf( plotWidget );
|
||||
}
|
||||
@@ -260,7 +265,7 @@ int RiuGridPlotWindow::indexOfPlotWidget( RiuQwtPlotWidget* plotWidget )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::scheduleUpdate()
|
||||
void RiuMultiPlotWindow::scheduleUpdate()
|
||||
{
|
||||
RiaPlotWindowRedrawScheduler::instance()->schedulePlotWindowUpdate( this );
|
||||
}
|
||||
@@ -268,7 +273,7 @@ void RiuGridPlotWindow::scheduleUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::scheduleReplotOfAllPlots()
|
||||
void RiuMultiPlotWindow::scheduleReplotOfAllPlots()
|
||||
{
|
||||
for ( RiuQwtPlotWidget* plotWidget : visiblePlotWidgets() )
|
||||
{
|
||||
@@ -279,7 +284,7 @@ void RiuGridPlotWindow::scheduleReplotOfAllPlots()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::contextMenuEvent( QContextMenuEvent* event )
|
||||
void RiuMultiPlotWindow::contextMenuEvent( QContextMenuEvent* event )
|
||||
{
|
||||
QMenu menu;
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
@@ -300,7 +305,7 @@ void RiuGridPlotWindow::contextMenuEvent( QContextMenuEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::keyPressEvent( QKeyEvent* keyEvent )
|
||||
void RiuMultiPlotWindow::keyPressEvent( QKeyEvent* keyEvent )
|
||||
{
|
||||
m_plotDefinition->handleKeyPressEvent( keyEvent );
|
||||
}
|
||||
@@ -308,7 +313,7 @@ void RiuGridPlotWindow::keyPressEvent( QKeyEvent* keyEvent )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QLabel* RiuGridPlotWindow::createTitleLabel() const
|
||||
QLabel* RiuMultiPlotWindow::createTitleLabel() const
|
||||
{
|
||||
QLabel* plotTitle = new QLabel( "PLOT TITLE HERE", nullptr );
|
||||
plotTitle->setVisible( m_plotDefinition->isMultiPlotTitleVisible() );
|
||||
@@ -321,7 +326,7 @@ QLabel* RiuGridPlotWindow::createTitleLabel() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::resizeEvent( QResizeEvent* event )
|
||||
void RiuMultiPlotWindow::resizeEvent( QResizeEvent* event )
|
||||
{
|
||||
QWidget::resizeEvent( event );
|
||||
bool needsUpdate = false;
|
||||
@@ -350,7 +355,7 @@ void RiuGridPlotWindow::resizeEvent( QResizeEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::showEvent( QShowEvent* event )
|
||||
void RiuMultiPlotWindow::showEvent( QShowEvent* event )
|
||||
{
|
||||
QWidget::showEvent( event );
|
||||
performUpdate();
|
||||
@@ -359,7 +364,7 @@ void RiuGridPlotWindow::showEvent( QShowEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::dragEnterEvent( QDragEnterEvent* event )
|
||||
void RiuMultiPlotWindow::dragEnterEvent( QDragEnterEvent* event )
|
||||
{
|
||||
RiuQwtPlotWidget* source = dynamic_cast<RiuQwtPlotWidget*>( event->source() );
|
||||
if ( source )
|
||||
@@ -372,7 +377,7 @@ void RiuGridPlotWindow::dragEnterEvent( QDragEnterEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::dragMoveEvent( QDragMoveEvent* event )
|
||||
void RiuMultiPlotWindow::dragMoveEvent( QDragMoveEvent* event )
|
||||
{
|
||||
if ( event->answerRect().intersects( this->geometry() ) )
|
||||
{
|
||||
@@ -415,7 +420,7 @@ void RiuGridPlotWindow::dragMoveEvent( QDragMoveEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::dragLeaveEvent( QDragLeaveEvent* event )
|
||||
void RiuMultiPlotWindow::dragLeaveEvent( QDragLeaveEvent* event )
|
||||
{
|
||||
setWidgetState( RiuWidgetStyleSheet::DEFAULT );
|
||||
|
||||
@@ -428,7 +433,7 @@ void RiuGridPlotWindow::dragLeaveEvent( QDragLeaveEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::dropEvent( QDropEvent* event )
|
||||
void RiuMultiPlotWindow::dropEvent( QDropEvent* event )
|
||||
{
|
||||
setWidgetState( RiuWidgetStyleSheet::DEFAULT );
|
||||
|
||||
@@ -480,7 +485,7 @@ void RiuGridPlotWindow::dropEvent( QDropEvent* event )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiuGridPlotWindow::willAcceptDroppedPlot( const RiuQwtPlotWidget* plotWidget ) const
|
||||
bool RiuMultiPlotWindow::willAcceptDroppedPlot( const RiuQwtPlotWidget* plotWidget ) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -488,7 +493,7 @@ bool RiuGridPlotWindow::willAcceptDroppedPlot( const RiuQwtPlotWidget* plotWidge
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<int, int> RiuGridPlotWindow::rowAndColumnCount( int plotWidgetCount ) const
|
||||
std::pair<int, int> RiuMultiPlotWindow::rowAndColumnCount( int plotWidgetCount ) const
|
||||
{
|
||||
if ( plotWidgetCount == 0 )
|
||||
{
|
||||
@@ -503,7 +508,7 @@ std::pair<int, int> RiuGridPlotWindow::rowAndColumnCount( int plotWidgetCount )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::onSelectionManagerSelectionChanged( const std::set<int>& changedSelectionLevels )
|
||||
void RiuMultiPlotWindow::onSelectionManagerSelectionChanged( const std::set<int>& changedSelectionLevels )
|
||||
{
|
||||
for ( RiuQwtPlotWidget* plotWidget : m_plotWidgets )
|
||||
{
|
||||
@@ -529,7 +534,7 @@ void RiuGridPlotWindow::onSelectionManagerSelectionChanged( const std::set<int>&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::setWidgetState( RiuWidgetStyleSheet::StateTag widgetState )
|
||||
void RiuMultiPlotWindow::setWidgetState( RiuWidgetStyleSheet::StateTag widgetState )
|
||||
{
|
||||
m_dropTargetStyleSheet.setWidgetState( m_dropTargetPlaceHolder, widgetState );
|
||||
}
|
||||
@@ -537,7 +542,7 @@ void RiuGridPlotWindow::setWidgetState( RiuWidgetStyleSheet::StateTag widgetStat
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiuGridPlotWindow::showYAxis( int row, int column ) const
|
||||
bool RiuMultiPlotWindow::showYAxis( int row, int column ) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -545,7 +550,7 @@ bool RiuGridPlotWindow::showYAxis( int row, int column ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::performUpdate()
|
||||
void RiuMultiPlotWindow::performUpdate()
|
||||
{
|
||||
reinsertPlotWidgets();
|
||||
alignCanvasTops();
|
||||
@@ -554,7 +559,7 @@ void RiuGridPlotWindow::performUpdate()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::reinsertPlotWidgets()
|
||||
void RiuMultiPlotWindow::reinsertPlotWidgets()
|
||||
{
|
||||
clearGridLayout();
|
||||
|
||||
@@ -646,7 +651,7 @@ void RiuGridPlotWindow::reinsertPlotWidgets()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiuGridPlotWindow::alignCanvasTops()
|
||||
int RiuMultiPlotWindow::alignCanvasTops()
|
||||
{
|
||||
CVF_ASSERT( m_legends.size() == m_plotWidgets.size() );
|
||||
|
||||
@@ -677,7 +682,7 @@ int RiuGridPlotWindow::alignCanvasTops()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuGridPlotWindow::clearGridLayout()
|
||||
void RiuMultiPlotWindow::clearGridLayout()
|
||||
{
|
||||
if ( m_gridLayout )
|
||||
{
|
||||
@@ -701,7 +706,7 @@ void RiuGridPlotWindow::clearGridLayout()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWidgetStyleSheet RiuGridPlotWindow::createDropTargetStyleSheet()
|
||||
RiuWidgetStyleSheet RiuMultiPlotWindow::createDropTargetStyleSheet()
|
||||
{
|
||||
RiuWidgetStyleSheet styleSheet;
|
||||
|
||||
@@ -717,7 +722,7 @@ RiuWidgetStyleSheet RiuGridPlotWindow::createDropTargetStyleSheet()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<QPointer<RiuQwtPlotWidget>> RiuGridPlotWindow::visiblePlotWidgets() const
|
||||
QList<QPointer<RiuQwtPlotWidget>> RiuMultiPlotWindow::visiblePlotWidgets() const
|
||||
{
|
||||
QList<QPointer<RiuQwtPlotWidget>> plotWidgets;
|
||||
for ( QPointer<RiuQwtPlotWidget> plotWidget : m_plotWidgets )
|
||||
@@ -733,7 +738,7 @@ QList<QPointer<RiuQwtPlotWidget>> RiuGridPlotWindow::visiblePlotWidgets() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<QPointer<RiuQwtPlotLegend>> RiuGridPlotWindow::visibleLegends() const
|
||||
QList<QPointer<RiuQwtPlotLegend>> RiuMultiPlotWindow::visibleLegends() const
|
||||
{
|
||||
QList<QPointer<RiuQwtPlotLegend>> legends;
|
||||
for ( int i = 0; i < m_plotWidgets.size(); ++i )
|
||||
@@ -749,7 +754,7 @@ QList<QPointer<RiuQwtPlotLegend>> RiuGridPlotWindow::visibleLegends() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<QPointer<QLabel>> RiuGridPlotWindow::visibleTitles() const
|
||||
QList<QPointer<QLabel>> RiuMultiPlotWindow::visibleTitles() const
|
||||
{
|
||||
QList<QPointer<QLabel>> subTitles;
|
||||
for ( int i = 0; i < m_plotWidgets.size(); ++i )
|
||||
@@ -766,7 +771,7 @@ QList<QPointer<QLabel>> RiuGridPlotWindow::visibleTitles() const
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::pair<int, int>
|
||||
RiuGridPlotWindow::findAvailableRowAndColumn( int startRow, int startColumn, int columnSpan, int columnCount ) const
|
||||
RiuMultiPlotWindow::findAvailableRowAndColumn( int startRow, int startColumn, int columnSpan, int columnCount ) const
|
||||
{
|
||||
int availableRow = startRow;
|
||||
int availableColumn = startColumn;
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <map>
|
||||
|
||||
class RiaPlotWindowRedrawScheduler;
|
||||
class RimGridPlotWindow;
|
||||
class RimMultiPlot;
|
||||
class RiuQwtPlotLegend;
|
||||
class RiuQwtPlotWidget;
|
||||
|
||||
@@ -45,18 +45,19 @@ class QScrollBar;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
// RiuGridPlotWindow
|
||||
// RiuMultiPlotWidget
|
||||
//
|
||||
//==================================================================================================
|
||||
class RiuGridPlotWindow : public QWidget, public RiuInterfaceToViewWindow, public caf::SelectionChangedReceiver
|
||||
class RiuMultiPlotWindow : public QWidget, public RiuInterfaceToViewWindow, public caf::SelectionChangedReceiver
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RiuGridPlotWindow( RimGridPlotWindow* plotDefinition, QWidget* parent = nullptr );
|
||||
RiuMultiPlotWindow( RimMultiPlot* plotDefinition, QWidget* parent = nullptr );
|
||||
~RiuMultiPlotWindow() override;
|
||||
|
||||
RimGridPlotWindow* ownerPlotDefinition();
|
||||
RimViewWindow* ownerViewWindow() const override;
|
||||
RimMultiPlot* ownerPlotDefinition();
|
||||
RimViewWindow* ownerViewWindow() const override;
|
||||
|
||||
void addPlot( RiuQwtPlotWidget* plotWidget );
|
||||
void insertPlot( RiuQwtPlotWidget* plotWidget, size_t index );
|
||||
@@ -113,17 +114,17 @@ private slots:
|
||||
virtual void performUpdate();
|
||||
|
||||
protected:
|
||||
QPointer<QVBoxLayout> m_layout;
|
||||
QPointer<QHBoxLayout> m_plotLayout;
|
||||
QPointer<QFrame> m_plotWidgetFrame;
|
||||
QPointer<QGridLayout> m_gridLayout;
|
||||
QPointer<QLabel> m_plotTitle;
|
||||
QList<int> m_legendColumns;
|
||||
QList<QPointer<QLabel>> m_subTitles;
|
||||
QList<QPointer<RiuQwtPlotLegend>> m_legends;
|
||||
QList<QPointer<RiuQwtPlotWidget>> m_plotWidgets;
|
||||
caf::PdmPointer<RimGridPlotWindow> m_plotDefinition;
|
||||
QPointer<QLabel> m_dropTargetPlaceHolder;
|
||||
QPointer<QVBoxLayout> m_layout;
|
||||
QPointer<QHBoxLayout> m_plotLayout;
|
||||
QPointer<QFrame> m_plotWidgetFrame;
|
||||
QPointer<QGridLayout> m_gridLayout;
|
||||
QPointer<QLabel> m_plotTitle;
|
||||
QList<int> m_legendColumns;
|
||||
QList<QPointer<QLabel>> m_subTitles;
|
||||
QList<QPointer<RiuQwtPlotLegend>> m_legends;
|
||||
QList<QPointer<RiuQwtPlotWidget>> m_plotWidgets;
|
||||
caf::PdmPointer<RimMultiPlot> m_plotDefinition;
|
||||
QPointer<QLabel> m_dropTargetPlaceHolder;
|
||||
|
||||
RiuWidgetStyleSheet m_dropTargetStyleSheet;
|
||||
|
||||
@@ -38,8 +38,8 @@
|
||||
|
||||
#include "RiuDockWidgetTools.h"
|
||||
#include "RiuDragDrop.h"
|
||||
#include "RiuGridPlotWindow.h"
|
||||
#include "RiuMdiSubWindow.h"
|
||||
#include "RiuMultiPlotWindow.h"
|
||||
#include "RiuToolTipMenu.h"
|
||||
#include "RiuTreeViewEventFilter.h"
|
||||
#include "RiuWellAllocationPlot.h"
|
||||
@@ -158,7 +158,7 @@ void RiuPlotMainWindow::cleanupGuiBeforeProjectClose()
|
||||
|
||||
m_wellLogPlotToolBarEditor->clear();
|
||||
m_summaryPlotToolBarEditor->clear();
|
||||
m_gridPlotWindowToolBarEditor->clear();
|
||||
m_multiPlotToolBarEditor->clear();
|
||||
|
||||
setWindowTitle( "Plots - ResInsight" );
|
||||
}
|
||||
@@ -383,8 +383,8 @@ void RiuPlotMainWindow::createToolBars()
|
||||
m_summaryPlotToolBarEditor = new caf::PdmUiToolBarEditor( "Summary Plot", this );
|
||||
m_summaryPlotToolBarEditor->hide();
|
||||
|
||||
m_gridPlotWindowToolBarEditor = new caf::PdmUiToolBarEditor( "Multi Plot", this );
|
||||
m_gridPlotWindowToolBarEditor->hide();
|
||||
m_multiPlotToolBarEditor = new caf::PdmUiToolBarEditor( "Multi Plot", this );
|
||||
m_multiPlotToolBarEditor->hide();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -569,20 +569,20 @@ void RiuPlotMainWindow::updateWellLogPlotToolBar()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotMainWindow::updateGridPlotWindowToolBar()
|
||||
void RiuPlotMainWindow::updateMultiPlotToolBar()
|
||||
{
|
||||
RimGridPlotWindow* plotWindow = dynamic_cast<RimGridPlotWindow*>( m_activePlotViewWindow.p() );
|
||||
RimMultiPlot* plotWindow = dynamic_cast<RimMultiPlot*>( m_activePlotViewWindow.p() );
|
||||
if ( plotWindow )
|
||||
{
|
||||
std::vector<caf::PdmFieldHandle*> toolBarFields = {plotWindow->columnCountField()};
|
||||
m_gridPlotWindowToolBarEditor->setFields( toolBarFields );
|
||||
m_gridPlotWindowToolBarEditor->updateUi();
|
||||
m_gridPlotWindowToolBarEditor->show();
|
||||
m_multiPlotToolBarEditor->setFields( toolBarFields );
|
||||
m_multiPlotToolBarEditor->updateUi();
|
||||
m_multiPlotToolBarEditor->show();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_gridPlotWindowToolBarEditor->clear();
|
||||
m_gridPlotWindowToolBarEditor->hide();
|
||||
m_multiPlotToolBarEditor->clear();
|
||||
m_multiPlotToolBarEditor->hide();
|
||||
}
|
||||
refreshToolbars();
|
||||
}
|
||||
@@ -592,9 +592,9 @@ void RiuPlotMainWindow::updateGridPlotWindowToolBar()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuPlotMainWindow::updateSummaryPlotToolBar( bool forceUpdateUi )
|
||||
{
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>( m_activePlotViewWindow.p() );
|
||||
RimGridPlotWindow* gridPlotWindow = dynamic_cast<RimGridPlotWindow*>( m_activePlotViewWindow.p() );
|
||||
if ( gridPlotWindow )
|
||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>( m_activePlotViewWindow.p() );
|
||||
RimMultiPlot* multiPlot = dynamic_cast<RimMultiPlot*>( m_activePlotViewWindow.p() );
|
||||
if ( multiPlot )
|
||||
{
|
||||
summaryPlot = caf::SelectionManager::instance()->selectedItemOfType<RimSummaryPlot>();
|
||||
}
|
||||
@@ -717,7 +717,7 @@ void RiuPlotMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
|
||||
|
||||
updateWellLogPlotToolBar();
|
||||
updateSummaryPlotToolBar();
|
||||
updateGridPlotWindowToolBar();
|
||||
updateMultiPlotToolBar();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
void addToTemporaryWidgets( QWidget* widget );
|
||||
|
||||
void updateWellLogPlotToolBar();
|
||||
void updateGridPlotWindowToolBar();
|
||||
void updateMultiPlotToolBar();
|
||||
void updateSummaryPlotToolBar( bool forceUpdateUi = false );
|
||||
void setFocusToLineEditInSummaryToolBar();
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
QMenu* m_windowMenu;
|
||||
|
||||
caf::PdmUiToolBarEditor* m_wellLogPlotToolBarEditor;
|
||||
caf::PdmUiToolBarEditor* m_gridPlotWindowToolBarEditor;
|
||||
caf::PdmUiToolBarEditor* m_multiPlotToolBarEditor;
|
||||
caf::PdmUiToolBarEditor* m_summaryPlotToolBarEditor;
|
||||
std::unique_ptr<caf::PdmUiDragDropInterface> m_dragDropInterface;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuWellLogPlot::RiuWellLogPlot( RimWellLogPlot* plotDefinition, QWidget* parent )
|
||||
: RiuGridPlotWindow( plotDefinition, parent )
|
||||
: RiuMultiPlotWindow( plotDefinition, parent )
|
||||
{
|
||||
m_trackScrollBar = new QScrollBar( nullptr );
|
||||
m_trackScrollBar->setOrientation( Qt::Vertical );
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
#pragma once
|
||||
|
||||
#include "RiuGridPlotWindow.h"
|
||||
#include "RiuMultiPlotWindow.h"
|
||||
|
||||
class RiuQwtPlotWidget;
|
||||
class RimWellLogPlot;
|
||||
|
||||
class RiuWellLogPlot : public RiuGridPlotWindow
|
||||
class RiuWellLogPlot : public RiuMultiPlotWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user