|
|
|
@ -56,7 +56,6 @@ nmWxPebiResultViewWidget::nmWxPebiResultViewWidget(
|
|
|
|
m_pControlBar(nullptr),
|
|
|
|
m_pControlBar(nullptr),
|
|
|
|
m_pToolBar(nullptr),
|
|
|
|
m_pToolBar(nullptr),
|
|
|
|
m_pStatusLabel(nullptr),
|
|
|
|
m_pStatusLabel(nullptr),
|
|
|
|
m_pMeshAction(nullptr),
|
|
|
|
|
|
|
|
m_pScalarBarAction(nullptr),
|
|
|
|
m_pScalarBarAction(nullptr),
|
|
|
|
m_pScaleGridAction(nullptr),
|
|
|
|
m_pScaleGridAction(nullptr),
|
|
|
|
m_pCellEdgesAction(nullptr),
|
|
|
|
m_pCellEdgesAction(nullptr),
|
|
|
|
@ -173,7 +172,6 @@ void nmWxPebiResultViewWidget::appendContextMenuActions(QMenu* pMenu)
|
|
|
|
if(pMenu == nullptr) {
|
|
|
|
if(pMenu == nullptr) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pMenu->addAction(m_pMeshAction);
|
|
|
|
|
|
|
|
pMenu->addAction(m_pScalarBarAction);
|
|
|
|
pMenu->addAction(m_pScalarBarAction);
|
|
|
|
pMenu->addAction(m_pScaleGridAction);
|
|
|
|
pMenu->addAction(m_pScaleGridAction);
|
|
|
|
pMenu->addAction(m_pCellEdgesAction);
|
|
|
|
pMenu->addAction(m_pCellEdgesAction);
|
|
|
|
@ -203,13 +201,6 @@ void nmWxPebiResultViewWidget::onControlOperationSucceeded()
|
|
|
|
refreshStatusBar();
|
|
|
|
refreshStatusBar();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmWxPebiResultViewWidget::onMeshToggled(bool bVisible)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(m_pSceneController != nullptr && m_pSceneController->hasSnapshot()) {
|
|
|
|
|
|
|
|
m_pSceneController->setMeshVisible(bVisible);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void nmWxPebiResultViewWidget::onScalarBarToggled(bool bVisible)
|
|
|
|
void nmWxPebiResultViewWidget::onScalarBarToggled(bool bVisible)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(m_pSceneController != nullptr && m_pSceneController->hasSnapshot()) {
|
|
|
|
if(m_pSceneController != nullptr && m_pSceneController->hasSnapshot()) {
|
|
|
|
@ -281,8 +272,6 @@ void nmWxPebiResultViewWidget::createUi()
|
|
|
|
m_pToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
|
|
|
m_pToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
|
|
|
m_pToolBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
|
|
|
m_pToolBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
|
|
|
|
|
|
|
|
|
|
|
|
m_pMeshAction = new QAction(QIcon(resultViewIconPath("NmGrid.png")),
|
|
|
|
|
|
|
|
tr("Result Grid"), this);
|
|
|
|
|
|
|
|
m_pScalarBarAction = new QAction(
|
|
|
|
m_pScalarBarAction = new QAction(
|
|
|
|
QIcon(resultViewIconPath("NmColorScale.png")),
|
|
|
|
QIcon(resultViewIconPath("NmColorScale.png")),
|
|
|
|
tr("Color Scale"), this);
|
|
|
|
tr("Color Scale"), this);
|
|
|
|
@ -300,10 +289,10 @@ void nmWxPebiResultViewWidget::createUi()
|
|
|
|
tr("Well Names"), this);
|
|
|
|
tr("Well Names"), this);
|
|
|
|
|
|
|
|
|
|
|
|
QAction* const pBusinessActions[] = {
|
|
|
|
QAction* const pBusinessActions[] = {
|
|
|
|
m_pMeshAction, m_pScalarBarAction, m_pScaleGridAction,
|
|
|
|
m_pScalarBarAction, m_pScaleGridAction, m_pCellEdgesAction,
|
|
|
|
m_pCellEdgesAction, m_pWellMarkersAction, m_pWellNamesAction
|
|
|
|
m_pWellMarkersAction, m_pWellNamesAction
|
|
|
|
};
|
|
|
|
};
|
|
|
|
for(int nIndex = 0; nIndex < 6; ++nIndex) {
|
|
|
|
for(int nIndex = 0; nIndex < 5; ++nIndex) {
|
|
|
|
pBusinessActions[nIndex]->setCheckable(true);
|
|
|
|
pBusinessActions[nIndex]->setCheckable(true);
|
|
|
|
pBusinessActions[nIndex]->setToolTip(
|
|
|
|
pBusinessActions[nIndex]->setToolTip(
|
|
|
|
pBusinessActions[nIndex]->text());
|
|
|
|
pBusinessActions[nIndex]->text());
|
|
|
|
@ -335,15 +324,13 @@ void nmWxPebiResultViewWidget::createUi()
|
|
|
|
if(pFrontAction != nullptr) m_pToolBar->addAction(pFrontAction);
|
|
|
|
if(pFrontAction != nullptr) m_pToolBar->addAction(pFrontAction);
|
|
|
|
if(pPickCenterAction != nullptr) m_pToolBar->addAction(pPickCenterAction);
|
|
|
|
if(pPickCenterAction != nullptr) m_pToolBar->addAction(pPickCenterAction);
|
|
|
|
m_pToolBar->addSeparator();
|
|
|
|
m_pToolBar->addSeparator();
|
|
|
|
for(int nIndex = 0; nIndex < 6; ++nIndex) {
|
|
|
|
for(int nIndex = 0; nIndex < 5; ++nIndex) {
|
|
|
|
m_pToolBar->addAction(pBusinessActions[nIndex]);
|
|
|
|
m_pToolBar->addAction(pBusinessActions[nIndex]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
m_pToolBar->addSeparator();
|
|
|
|
m_pToolBar->addSeparator();
|
|
|
|
if(pCopyAction != nullptr) m_pToolBar->addAction(pCopyAction);
|
|
|
|
if(pCopyAction != nullptr) m_pToolBar->addAction(pCopyAction);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
connect(m_pMeshAction, SIGNAL(toggled(bool)),
|
|
|
|
|
|
|
|
this, SLOT(onMeshToggled(bool)));
|
|
|
|
|
|
|
|
connect(m_pScalarBarAction, SIGNAL(toggled(bool)),
|
|
|
|
connect(m_pScalarBarAction, SIGNAL(toggled(bool)),
|
|
|
|
this, SLOT(onScalarBarToggled(bool)));
|
|
|
|
this, SLOT(onScalarBarToggled(bool)));
|
|
|
|
connect(m_pScaleGridAction, SIGNAL(toggled(bool)),
|
|
|
|
connect(m_pScaleGridAction, SIGNAL(toggled(bool)),
|
|
|
|
@ -507,8 +494,6 @@ void nmWxPebiResultViewWidget::synchronizeBusinessActions()
|
|
|
|
if(m_pSceneController == nullptr) {
|
|
|
|
if(m_pSceneController == nullptr) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setActionCheckedWithoutSignal(
|
|
|
|
|
|
|
|
m_pMeshAction, m_pSceneController->isMeshVisible());
|
|
|
|
|
|
|
|
setActionCheckedWithoutSignal(
|
|
|
|
setActionCheckedWithoutSignal(
|
|
|
|
m_pScalarBarAction, m_pSceneController->isScalarBarVisible());
|
|
|
|
m_pScalarBarAction, m_pSceneController->isScalarBarVisible());
|
|
|
|
setActionCheckedWithoutSignal(
|
|
|
|
setActionCheckedWithoutSignal(
|
|
|
|
@ -521,7 +506,6 @@ void nmWxPebiResultViewWidget::synchronizeBusinessActions()
|
|
|
|
m_pWellNamesAction, m_pSceneController->areWellNamesVisible());
|
|
|
|
m_pWellNamesAction, m_pSceneController->areWellNamesVisible());
|
|
|
|
|
|
|
|
|
|
|
|
const bool bEnabled = m_pSceneController->hasSnapshot();
|
|
|
|
const bool bEnabled = m_pSceneController->hasSnapshot();
|
|
|
|
m_pMeshAction->setEnabled(bEnabled);
|
|
|
|
|
|
|
|
m_pScalarBarAction->setEnabled(bEnabled);
|
|
|
|
m_pScalarBarAction->setEnabled(bEnabled);
|
|
|
|
m_pScaleGridAction->setEnabled(bEnabled);
|
|
|
|
m_pScaleGridAction->setEnabled(bEnabled);
|
|
|
|
m_pCellEdgesAction->setEnabled(bEnabled);
|
|
|
|
m_pCellEdgesAction->setEnabled(bEnabled);
|
|
|
|
|