mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-09 15:43:07 -06:00
#1240 Adjustments to icons and command texts
This commit is contained in:
parent
c8cc667fa1
commit
47f207998a
@ -79,7 +79,7 @@ void RicConvertAllFractureTemplatesToFieldFeature::onActionTriggered(bool isChec
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicConvertAllFractureTemplatesToFieldFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Change unit system for all ellipse fracture templates to Field");
|
||||
actionToSetup->setText("Convert All Ellipse Fracture Templates to Field");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -81,7 +81,7 @@ void RicConvertAllFractureTemplatesToMetricFeature::onActionTriggered(bool isChe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicConvertAllFractureTemplatesToMetricFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setText("Change unit system for all ellipse fracture templates to Metric");
|
||||
actionToSetup->setText("Convert All Ellipse Fracture Templates to Metric");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -83,15 +83,17 @@ void RicConvertFractureTemplateUnitFeature::setupActionLook(QAction* actionToSet
|
||||
RimEllipseFractureTemplate* ellipseFractureTemplate = nullptr;
|
||||
objHandle->firstAncestorOrThisOfType(ellipseFractureTemplate);
|
||||
|
||||
QString text = "Convert Values to ";
|
||||
if (ellipseFractureTemplate->fractureTemplateUnit == RimDefines::UNITS_METRIC)
|
||||
{
|
||||
actionToSetup->setText("Change to Field units in fracture template");
|
||||
text += "Field";
|
||||
}
|
||||
else if (ellipseFractureTemplate->fractureTemplateUnit == RimDefines::UNITS_FIELD)
|
||||
{
|
||||
actionToSetup->setText("Change to metric units in fracture template");
|
||||
text += "Metric";
|
||||
}
|
||||
|
||||
|
||||
actionToSetup->setText(text);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "RimEclipsePropertyFilterCollection.h"
|
||||
#include "RimEclipseWell.h"
|
||||
#include "RimFormationNamesCollection.h"
|
||||
#include "RimFractureTemplateCollection.h"
|
||||
#include "RimGeoMechPropertyFilterCollection.h"
|
||||
#include "RimIntersectionCollection.h"
|
||||
#include "RimProject.h"
|
||||
@ -132,6 +133,17 @@ void RicDeleteItemExec::redo()
|
||||
view->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
RimFractureTemplateCollection* fracTemplateColl;
|
||||
parentObj->firstAncestorOrThisOfType(fracTemplateColl);
|
||||
if (fracTemplateColl)
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Well paths
|
||||
|
@ -111,7 +111,7 @@ void RicExportSelectedSimWellFractureWellCompletionFeature::onActionTriggered(bo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportSelectedSimWellFractureWellCompletionFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setIcon(QIcon(":/FractureTemplate16x16.png"));
|
||||
actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
||||
actionToSetup->setText("Export Fracture Well Completion Data for Selected wells");
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ void RicExportSelectedWellPathFractureWellCompletionFeature::onActionTriggered(b
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportSelectedWellPathFractureWellCompletionFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setIcon(QIcon(":/FractureTemplate16x16.png"));
|
||||
actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
||||
actionToSetup->setText("Export Fracture Well Completion Data for Selected wells");
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ void RicExportSimWellFractureWellCompletionFeature::onActionTriggered(bool isChe
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportSimWellFractureWellCompletionFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setIcon(QIcon(":/FractureTemplate16x16.png"));
|
||||
actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
||||
actionToSetup->setText("Export Fracture Well Completion Data");
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ void RicExportWellPathFractureWellCompletionFeature::onActionTriggered(bool isCh
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicExportWellPathFractureWellCompletionFeature::setupActionLook(QAction* actionToSetup)
|
||||
{
|
||||
actionToSetup->setIcon(QIcon(":/FractureTemplate16x16.png"));
|
||||
actionToSetup->setIcon(QIcon(":/FractureSymbol16x16.png"));
|
||||
actionToSetup->setText("Export Fracture Well Completion Data");
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include <QAction>
|
||||
#include <QFileDialog>
|
||||
|
||||
|
||||
CAF_CMD_SOURCE_INIT(RicNewStimPlanFractureTemplateFeature, "RicNewStimPlanFractureTemplateFeature");
|
||||
@ -41,6 +42,12 @@ CAF_CMD_SOURCE_INIT(RicNewStimPlanFractureTemplateFeature, "RicNewStimPlanFractu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewStimPlanFractureTemplateFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
|
||||
QString fileName = QFileDialog::getOpenFileName(NULL, "Open StimPlan XML File", defaultDir, "StimPlan XML File (*.xml);;All files(*.*)");
|
||||
|
||||
if (fileName.isEmpty()) return;
|
||||
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
CVF_ASSERT(project);
|
||||
|
||||
@ -54,6 +61,7 @@ void RicNewStimPlanFractureTemplateFeature::onActionTriggered(bool isChecked)
|
||||
RimStimPlanFractureTemplate* fractureDef = new RimStimPlanFractureTemplate();
|
||||
fracDefColl->fractureDefinitions.push_back(fractureDef);
|
||||
fractureDef->name = "StimPlan Fracture Template";
|
||||
fractureDef->setFileName(fileName);
|
||||
|
||||
fracDefColl->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(fractureDef);
|
||||
|
@ -376,30 +376,26 @@ QStringList RimContextCommandBuilder::commandsFromSelection()
|
||||
else if (dynamic_cast<RimWellPathFracture*>(uiItem))
|
||||
{
|
||||
commandIds << "RicNewWellPathFractureFeature";
|
||||
//commandIds << "RicWellPathFracturesDeleteAllFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimSimWellFracture*>(uiItem))
|
||||
{
|
||||
commandIds << "RicNewSimWellFractureFeature";
|
||||
//commandIds << "RicSimWellFracturesDeleteAllFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimFractureTemplateCollection*>(uiItem) ||
|
||||
dynamic_cast<RimStimPlanFractureTemplate*>(uiItem))
|
||||
{
|
||||
commandIds << "RicConvertAllFractureTemplatesToMetricFeature";
|
||||
commandIds << "RicConvertAllFractureTemplatesToFieldFeature";
|
||||
commandIds << "Separator";
|
||||
commandIds << "RicNewEllipseFractureTemplateFeature";
|
||||
commandIds << "RicNewStimPlanFractureTemplateFeature";
|
||||
commandIds << "RicFractureDefinitionsDeleteAllFeature";
|
||||
commandIds << "Separator";
|
||||
commandIds << "RicConvertAllFractureTemplatesToMetricFeature";
|
||||
commandIds << "RicConvertAllFractureTemplatesToFieldFeature";
|
||||
}
|
||||
else if (dynamic_cast<RimEllipseFractureTemplate*>(uiItem))
|
||||
{
|
||||
commandIds << "RicConvertFractureTemplateUnitFeature";
|
||||
commandIds << "Separator";
|
||||
commandIds << "RicNewEllipseFractureTemplateFeature";
|
||||
commandIds << "RicNewStimPlanFractureTemplateFeature";
|
||||
commandIds << "RicFractureDefinitionsDeleteAllFeature";
|
||||
commandIds << "Separator";
|
||||
commandIds << "RicConvertFractureTemplateUnitFeature";
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user