mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6379 Dock Widgets : Hide curve selection by default to allow smaller widgets
This commit is contained in:
parent
d08444ec77
commit
41b1e1408b
@ -44,6 +44,7 @@
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMenu>
|
||||
#include <QPushButton>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include <algorithm>
|
||||
@ -97,9 +98,9 @@ RiuRelativePermeabilityPlotPanel::RiuRelativePermeabilityPlotPanel( QDockWidget*
|
||||
m_selectedCurvesButtonGroup->addButton( new QCheckBox( "PCOW" ), RigFlowDiagSolverInterface::RelPermCurve::PCOW );
|
||||
m_selectedCurvesButtonGroup->addButton( new QCheckBox( "PCOG" ), RigFlowDiagSolverInterface::RelPermCurve::PCOG );
|
||||
|
||||
QGroupBox* groupBox = new QGroupBox( "Curves" );
|
||||
m_groupBox = new QGroupBox( "Curves" );
|
||||
QGridLayout* groupBoxLayout = new QGridLayout;
|
||||
groupBox->setLayout( groupBoxLayout );
|
||||
m_groupBox->setLayout( groupBoxLayout );
|
||||
|
||||
QList<QAbstractButton*> checkButtonList = m_selectedCurvesButtonGroup->buttons();
|
||||
for ( int i = 0; i < checkButtonList.size(); i++ )
|
||||
@ -115,8 +116,12 @@ RiuRelativePermeabilityPlotPanel::RiuRelativePermeabilityPlotPanel( QDockWidget*
|
||||
m_fixedXAxisCheckBox->setChecked( true );
|
||||
m_fixedLeftYAxisCheckBox->setChecked( true );
|
||||
|
||||
QCheckBox* showCurveSelection = new QCheckBox( "Show Curve Selection", false );
|
||||
connect( showCurveSelection, SIGNAL( stateChanged( int ) ), SLOT( slotShowCurveSelectionWidgets( int ) ) );
|
||||
|
||||
QVBoxLayout* leftLayout = new QVBoxLayout;
|
||||
leftLayout->addWidget( groupBox );
|
||||
leftLayout->addWidget( showCurveSelection );
|
||||
leftLayout->addWidget( m_groupBox );
|
||||
leftLayout->addWidget( m_logarithmicScaleKrAxisCheckBox );
|
||||
leftLayout->addWidget( m_showUnscaledCheckBox );
|
||||
leftLayout->addWidget( m_fixedXAxisCheckBox );
|
||||
@ -136,6 +141,8 @@ RiuRelativePermeabilityPlotPanel::RiuRelativePermeabilityPlotPanel( QDockWidget*
|
||||
connect( m_fixedXAxisCheckBox, SIGNAL( stateChanged( int ) ), SLOT( slotSomeCheckBoxStateChanged( int ) ) );
|
||||
connect( m_fixedLeftYAxisCheckBox, SIGNAL( stateChanged( int ) ), SLOT( slotSomeCheckBoxStateChanged( int ) ) );
|
||||
|
||||
slotShowCurveSelectionWidgets( showCurveSelection->checkState() );
|
||||
|
||||
plotUiSelectedCurves();
|
||||
}
|
||||
|
||||
@ -780,6 +787,20 @@ void RiuRelativePermeabilityPlotPanel::slotCurrentPlotDataInTextDialog()
|
||||
textDialog->show();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuRelativePermeabilityPlotPanel::slotShowCurveSelectionWidgets( int state )
|
||||
{
|
||||
bool setVisible = ( state != Qt::CheckState::Unchecked );
|
||||
|
||||
m_groupBox->setVisible( setVisible );
|
||||
m_showUnscaledCheckBox->setVisible( setVisible );
|
||||
m_logarithmicScaleKrAxisCheckBox->setVisible( setVisible );
|
||||
m_fixedXAxisCheckBox->setVisible( setVisible );
|
||||
m_fixedLeftYAxisCheckBox->setVisible( setVisible );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -34,6 +34,7 @@ class QCheckBox;
|
||||
class QwtPlot;
|
||||
class QwtPlotMarker;
|
||||
class QPointF;
|
||||
class QGroupBox;
|
||||
|
||||
//==================================================================================================
|
||||
//
|
||||
@ -123,6 +124,7 @@ private slots:
|
||||
void slotButtonInButtonGroupClicked( int );
|
||||
void slotSomeCheckBoxStateChanged( int );
|
||||
void slotCurrentPlotDataInTextDialog();
|
||||
void slotShowCurveSelectionWidgets( int state );
|
||||
|
||||
private:
|
||||
RiaEclipseUnitTools::UnitSystem m_unitSystem;
|
||||
@ -134,6 +136,7 @@ private:
|
||||
QPointer<RiuDockedQwtPlot> m_qwtPlot;
|
||||
std::vector<QwtPlotMarker*> m_myPlotMarkers;
|
||||
|
||||
QGroupBox* m_groupBox;
|
||||
QButtonGroup* m_selectedCurvesButtonGroup;
|
||||
QCheckBox* m_showUnscaledCheckBox;
|
||||
QCheckBox* m_logarithmicScaleKrAxisCheckBox;
|
||||
|
Loading…
Reference in New Issue
Block a user