mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Toolbar: Added button control for toolbar labels
This commit is contained in:
parent
b12e09c86d
commit
209919c651
@ -37,6 +37,7 @@
|
|||||||
#include "RimReservoirCellResultsCacher.h"
|
#include "RimReservoirCellResultsCacher.h"
|
||||||
#include "RigCaseData.h"
|
#include "RigCaseData.h"
|
||||||
#include "RivColorTableArray.h"
|
#include "RivColorTableArray.h"
|
||||||
|
#include "RiuMainWindow.h"
|
||||||
|
|
||||||
|
|
||||||
namespace caf
|
namespace caf
|
||||||
@ -127,6 +128,13 @@ void RimFaultCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedFiel
|
|||||||
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (&showFaultLabel == changedField)
|
||||||
|
{
|
||||||
|
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -38,7 +38,8 @@
|
|||||||
<file>SnapShotSave.png</file>
|
<file>SnapShotSave.png</file>
|
||||||
<file>SnapShotSaveViews.png</file>
|
<file>SnapShotSaveViews.png</file>
|
||||||
<file>draw_style_faults_24x24.png</file>
|
<file>draw_style_faults_24x24.png</file>
|
||||||
<file>Case48x48.png</file>
|
<file>draw_style_faults_label_24x24.png</file>
|
||||||
|
<file>Case48x48.png</file>
|
||||||
<file>GridModels.png</file>
|
<file>GridModels.png</file>
|
||||||
<file>draw_style_WellCellsToRangeFilter_24x24.png</file>
|
<file>draw_style_WellCellsToRangeFilter_24x24.png</file>
|
||||||
<file>draw_style_surface_w_fault_mesh_24x24.png</file>
|
<file>draw_style_surface_w_fault_mesh_24x24.png</file>
|
||||||
|
BIN
ApplicationCode/Resources/draw_style_faults_label_24x24.png
Normal file
BIN
ApplicationCode/Resources/draw_style_faults_label_24x24.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
@ -310,6 +310,10 @@ void RiuMainWindow::createActions()
|
|||||||
m_drawStyleToggleFaultsAction->setCheckable(true);
|
m_drawStyleToggleFaultsAction->setCheckable(true);
|
||||||
connect(m_drawStyleToggleFaultsAction, SIGNAL(toggled(bool)), SLOT(slotToggleFaultsAction(bool)));
|
connect(m_drawStyleToggleFaultsAction, SIGNAL(toggled(bool)), SLOT(slotToggleFaultsAction(bool)));
|
||||||
|
|
||||||
|
m_toggleFaultsLabelAction = new QAction( QIcon(":/draw_style_faults_label_24x24.png"), "&Show Fault Labels", this);
|
||||||
|
m_toggleFaultsLabelAction->setCheckable(true);
|
||||||
|
connect(m_toggleFaultsLabelAction, SIGNAL(toggled(bool)), SLOT(slotToggleFaultLabelsAction(bool)));
|
||||||
|
|
||||||
m_addWellCellsToRangeFilterAction = new QAction(QIcon(":/draw_style_WellCellsToRangeFilter_24x24.png"), "&Add Well Cells To Range Filter", this);
|
m_addWellCellsToRangeFilterAction = new QAction(QIcon(":/draw_style_WellCellsToRangeFilter_24x24.png"), "&Add Well Cells To Range Filter", this);
|
||||||
m_addWellCellsToRangeFilterAction->setCheckable(true);
|
m_addWellCellsToRangeFilterAction->setCheckable(true);
|
||||||
m_addWellCellsToRangeFilterAction->setToolTip("Add Well Cells To Range Filter based on the individual settings");
|
m_addWellCellsToRangeFilterAction->setToolTip("Add Well Cells To Range Filter based on the individual settings");
|
||||||
@ -440,6 +444,7 @@ void RiuMainWindow::createToolBars()
|
|||||||
m_viewToolBar->addAction(m_drawStyleSurfOnlyAction);
|
m_viewToolBar->addAction(m_drawStyleSurfOnlyAction);
|
||||||
m_viewToolBar->addAction(m_drawStyleFaultLinesSolidAction);
|
m_viewToolBar->addAction(m_drawStyleFaultLinesSolidAction);
|
||||||
m_viewToolBar->addAction(m_drawStyleToggleFaultsAction);
|
m_viewToolBar->addAction(m_drawStyleToggleFaultsAction);
|
||||||
|
m_viewToolBar->addAction(m_toggleFaultsLabelAction);
|
||||||
m_viewToolBar->addAction(m_addWellCellsToRangeFilterAction);
|
m_viewToolBar->addAction(m_addWellCellsToRangeFilterAction);
|
||||||
|
|
||||||
QLabel* scaleLabel = new QLabel(m_viewToolBar);
|
QLabel* scaleLabel = new QLabel(m_viewToolBar);
|
||||||
@ -1494,6 +1499,19 @@ void RiuMainWindow::slotToggleFaultsAction(bool showFaults)
|
|||||||
RiaApplication::instance()->activeReservoirView()->setShowFaultsOnly(showFaults);
|
RiaApplication::instance()->activeReservoirView()->setShowFaultsOnly(showFaults);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuMainWindow::slotToggleFaultLabelsAction(bool showLabels)
|
||||||
|
{
|
||||||
|
if (!RiaApplication::instance()->activeReservoirView()) return;
|
||||||
|
|
||||||
|
RiaApplication::instance()->activeReservoirView()->faultCollection->showFaultLabel.setValueFromUi(showLabels);
|
||||||
|
|
||||||
|
refreshDrawStyleActions();
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -1507,6 +1525,7 @@ void RiuMainWindow::refreshDrawStyleActions()
|
|||||||
m_drawStyleFaultLinesSolidAction->setEnabled(enable);
|
m_drawStyleFaultLinesSolidAction->setEnabled(enable);
|
||||||
|
|
||||||
m_drawStyleToggleFaultsAction->setEnabled(enable);
|
m_drawStyleToggleFaultsAction->setEnabled(enable);
|
||||||
|
m_toggleFaultsLabelAction->setEnabled(enable);
|
||||||
|
|
||||||
m_addWellCellsToRangeFilterAction->setEnabled(enable);
|
m_addWellCellsToRangeFilterAction->setEnabled(enable);
|
||||||
|
|
||||||
@ -1517,6 +1536,10 @@ void RiuMainWindow::refreshDrawStyleActions()
|
|||||||
m_drawStyleToggleFaultsAction->setChecked( !riv->isGridVisualizationMode());
|
m_drawStyleToggleFaultsAction->setChecked( !riv->isGridVisualizationMode());
|
||||||
m_drawStyleToggleFaultsAction->blockSignals(false);
|
m_drawStyleToggleFaultsAction->blockSignals(false);
|
||||||
|
|
||||||
|
m_toggleFaultsLabelAction->blockSignals(true);
|
||||||
|
m_toggleFaultsLabelAction->setChecked(riv->faultCollection()->showFaultLabel());
|
||||||
|
m_toggleFaultsLabelAction->blockSignals(false);
|
||||||
|
|
||||||
m_addWellCellsToRangeFilterAction->blockSignals(true);
|
m_addWellCellsToRangeFilterAction->blockSignals(true);
|
||||||
m_addWellCellsToRangeFilterAction->setChecked( riv->wellCollection()->wellCellsToRangeFilterMode() != RimWellCollection::RANGE_ADD_NONE);
|
m_addWellCellsToRangeFilterAction->setChecked( riv->wellCollection()->wellCellsToRangeFilterMode() != RimWellCollection::RANGE_ADD_NONE);
|
||||||
m_addWellCellsToRangeFilterAction->blockSignals(false);
|
m_addWellCellsToRangeFilterAction->blockSignals(false);
|
||||||
|
@ -222,6 +222,7 @@ private slots:
|
|||||||
|
|
||||||
void slotDrawStyleChanged(QAction* activatedAction);
|
void slotDrawStyleChanged(QAction* activatedAction);
|
||||||
void slotToggleFaultsAction(bool);
|
void slotToggleFaultsAction(bool);
|
||||||
|
void slotToggleFaultLabelsAction(bool);
|
||||||
|
|
||||||
void slotAddWellCellsToRangeFilterAction(bool doAdd);
|
void slotAddWellCellsToRangeFilterAction(bool doAdd);
|
||||||
|
|
||||||
@ -273,6 +274,7 @@ private:
|
|||||||
|
|
||||||
QActionGroup* m_dsActionGroup;
|
QActionGroup* m_dsActionGroup;
|
||||||
QAction* m_drawStyleToggleFaultsAction;
|
QAction* m_drawStyleToggleFaultsAction;
|
||||||
|
QAction* m_toggleFaultsLabelAction;
|
||||||
QAction* m_drawStyleLinesAction;
|
QAction* m_drawStyleLinesAction;
|
||||||
QAction* m_drawStyleLinesSolidAction;
|
QAction* m_drawStyleLinesSolidAction;
|
||||||
QAction* m_drawStyleFaultLinesSolidAction;
|
QAction* m_drawStyleFaultLinesSolidAction;
|
||||||
|
Loading…
Reference in New Issue
Block a user