Merge remote-tracking branch 'origin/2018.11.01-patch' into dev

This commit is contained in:
Magne Sjaastad committed 2018-12-21 08:46:27 +01:00
commit 6f3097dd5f
38 files changed
+1676 -181

No files matched your search

@@ -116,9 +116,12 @@ RicFileHierarchyDialog::RicFileHierarchyDialog(QWidget* parent)
m_effectiveFilter->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
m_fileListLabel->setText("Files found");
m_fileListLabel->setVisible(false);
m_fileList->setSelectionMode(QAbstractItemView::ExtendedSelection);
m_fileList->setVisible(false);
m_fileList->setContextMenuPolicy(Qt::CustomContextMenu);
m_fileList->setSortingEnabled(true);
m_browseButton->setText("...");
m_browseButton->setFixedWidth(25);
m_findOrCancelButton->setText(FIND_BUTTON_FIND_TEXT);
@@ -63,7 +63,8 @@ bool RicImportEnsembleFeature::isCommandEnabled()
void RicImportEnsembleFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
QStringList fileNames = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog("Import Ensemble");
QString pathCacheName = "ENSEMBLE_FILES";
QStringList fileNames = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog("Import Ensemble", pathCacheName);
if (fileNames.isEmpty()) return;
@@ -70,7 +70,8 @@ bool RicImportSummaryCasesFeature::isCommandEnabled()
void RicImportSummaryCasesFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
QStringList fileNames = runRecursiveSummaryCaseFileSearchDialog("Import Summary Cases");
QString pathCacheName = "INPUT_FILES";
QStringList fileNames = runRecursiveSummaryCaseFileSearchDialog("Import Summary Cases", pathCacheName);
std::vector<RimSummaryCase*> cases;
if (!fileNames.isEmpty()) createSummaryCasesFromFiles(fileNames, &cases);
@@ -217,10 +218,11 @@ void RicImportSummaryCasesFeature::addCasesToGroupIfRelevant(const std::vector<R
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QStringList RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog(const QString& dialogTitle)
QStringList RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog(const QString& dialogTitle,
const QString& pathCacheName)
{
RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
QString defaultDir = app->lastUsedDialogDirectory(pathCacheName);
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::runRecursiveSearchDialog(nullptr,
dialogTitle,
@@ -236,7 +238,7 @@ QStringList RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialo
if (!result.ok) return QStringList();
// Remember the path to next time
app->setLastUsedDialogDirectory("INPUT_FILES", QFileInfo(result.rootDir).absoluteFilePath());
app->setLastUsedDialogDirectory(pathCacheName, QFileInfo(result.rootDir).absoluteFilePath());
return result.files;
}
@@ -43,7 +43,7 @@ public:
static void addSummaryCases(const std::vector<RimSummaryCase*> cases);
static void addCasesToGroupIfRelevant(const std::vector<RimSummaryCase*> cases);
static QStringList runRecursiveSummaryCaseFileSearchDialog(const QString& dialogTitle);
static QStringList runRecursiveSummaryCaseFileSearchDialog(const QString& dialogTitle, const QString& pathCacheName);
protected:
// Overrides
@@ -61,7 +61,8 @@ bool RicImportSummaryGroupFeature::isCommandEnabled()
void RicImportSummaryGroupFeature::onActionTriggered(bool isChecked)
{
RiaApplication* app = RiaApplication::instance();
QStringList fileNames = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog("Import Summary Case Group");
QString pathCacheName = "INPUT_FILES";
QStringList fileNames = RicImportSummaryCasesFeature::runRecursiveSummaryCaseFileSearchDialog("Import Summary Case Group", pathCacheName);
if (fileNames.isEmpty()) return;
@@ -36,6 +36,10 @@ ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryEnsembleCurveSetFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicPasteEnsembleCurveSetFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleCurveFilterFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedEnsembleFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingSummaryCurveFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.h
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.h
)
set (SOURCE_GROUP_SOURCE_FILES
@@ -75,6 +79,10 @@ ${CMAKE_CURRENT_LIST_DIR}/RicNewSummaryEnsembleCurveSetFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicPasteEnsembleCurveSetFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleCurveFilterFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedEnsembleFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingSummaryCurveFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.cpp
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.cpp
)
list(APPEND CODE_HEADER_FILES
@@ -0,0 +1,114 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicClearSourceSteppingEnsembleCurveSetFeature.h"
#include "RimEnsembleCurveSet.h"
#include "RimEnsembleCurveSetCollection.h"
#include "RimSummaryCurve.h"
#include "RimSummaryCurveCollection.h"
#include "RimSummaryPlot.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
#include <QAction>
CAF_CMD_SOURCE_INIT(RicClearSourceSteppingEnsembleCurveSetFeature, "RicClearSourceSteppingEnsembleCurveSetFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicClearSourceSteppingEnsembleCurveSetFeature::isCommandEnabled()
{
std::vector<caf::PdmObject*> objects;
caf::SelectionManager::instance()->objectsByType(&objects);
if (objects.size() == 1)
{
auto c = objects[0];
RimSummaryPlot* summaryPlot = nullptr;
c->firstAncestorOrThisOfTypeAsserted(summaryPlot);
if (summaryPlot)
{
if (summaryPlot->ensembleCurveSetCollection()->curveSetForSourceStepping()
|| summaryPlot->summaryCurveCollection()->curveForSourceStepping())
{
return true;
}
}
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicClearSourceSteppingEnsembleCurveSetFeature::onActionTriggered(bool isChecked)
{
std::vector<caf::PdmObject*> objects;
caf::SelectionManager::instance()->objectsByType(&objects);
if (objects.size() == 1)
{
auto c = objects[0];
RimSummaryPlot* summaryPlot = nullptr;
c->firstAncestorOrThisOfType(summaryPlot);
if (summaryPlot)
{
clearAllSourceSteppingInSummaryPlot(summaryPlot);
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicClearSourceSteppingEnsembleCurveSetFeature::clearAllSourceSteppingInSummaryPlot(const RimSummaryPlot* summaryPlot)
{
RimEnsembleCurveSet* previousCurveSet = summaryPlot->ensembleCurveSetCollection()->curveSetForSourceStepping();
summaryPlot->ensembleCurveSetCollection()->setCurveSetForSourceStepping(nullptr);
RimSummaryCurve* previousCurve = summaryPlot->summaryCurveCollection()->curveForSourceStepping();
summaryPlot->summaryCurveCollection()->setCurveForSourceStepping(nullptr);
if (previousCurveSet)
{
previousCurveSet->updateConnectedEditors();
}
if (previousCurve)
{
previousCurve->updateConnectedEditors();
}
RiuPlotMainWindowTools::refreshToolbars();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicClearSourceSteppingEnsembleCurveSetFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Clear Source Stepping Curve Set");
actionToSetup->setIcon(QIcon(":/StepUpDown16x16.png"));
}
@@ -0,0 +1,41 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
class RimSummaryPlot;
//==================================================================================================
///
//==================================================================================================
class RicClearSourceSteppingEnsembleCurveSetFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
public:
static void clearAllSourceSteppingInSummaryPlot(const RimSummaryPlot* summaryPlot);
protected:
bool isCommandEnabled() override;
void onActionTriggered(bool isChecked) override;
void setupActionLook(QAction* actionToSetup) override;
};
@@ -0,0 +1,90 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicClearSourceSteppingSummaryCurveFeature.h"
#include "RicClearSourceSteppingEnsembleCurveSetFeature.h"
#include "RimSummaryCurve.h"
#include "RimSummaryCurveCollection.h"
#include "RimSummaryPlot.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
#include <QAction>
#include "RimEnsembleCurveSetCollection.h"
CAF_CMD_SOURCE_INIT(RicClearSourceSteppingSummaryCurveFeature, "RicClearSourceSteppingSummaryCurveFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicClearSourceSteppingSummaryCurveFeature::isCommandEnabled()
{
std::vector<caf::PdmObject*> objects;
caf::SelectionManager::instance()->objectsByType(&objects);
if (objects.size() == 1)
{
auto c = objects[0];
RimSummaryPlot* summaryPlot = nullptr;
c->firstAncestorOrThisOfTypeAsserted(summaryPlot);
if (summaryPlot)
{
if (summaryPlot->ensembleCurveSetCollection()->curveSetForSourceStepping()
|| summaryPlot->summaryCurveCollection()->curveForSourceStepping())
{
return true;
}
}
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicClearSourceSteppingSummaryCurveFeature::onActionTriggered(bool isChecked)
{
std::vector<RimSummaryCurve*> summaryCurves;
caf::SelectionManager::instance()->objectsByType(&summaryCurves);
if (summaryCurves.size() == 1)
{
auto c = summaryCurves[0];
RimSummaryPlot* summaryPlot = nullptr;
c->firstAncestorOrThisOfType(summaryPlot);
if (summaryPlot)
{
RicClearSourceSteppingEnsembleCurveSetFeature::clearAllSourceSteppingInSummaryPlot(summaryPlot);
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicClearSourceSteppingSummaryCurveFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Clear Source Stepping Curve");
actionToSetup->setIcon(QIcon(":/StepUpDown16x16.png"));
}
@@ -0,0 +1,34 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
//==================================================================================================
///
//==================================================================================================
class RicClearSourceSteppingSummaryCurveFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
bool isCommandEnabled() override;
void onActionTriggered(bool isChecked) override;
void setupActionLook(QAction* actionToSetup) override;
};
@@ -19,6 +19,7 @@
#include "RicNewSummaryCurveFeature.h"
#include "RiaApplication.h"
#include "RiaColorTables.h"
#include "RimMainPlotCollection.h"
#include "RimOilField.h"
@@ -31,8 +32,6 @@
#include "RiuPlotMainWindow.h"
#include "WellLogCommands/RicWellLogPlotCurveFeatureImpl.h"
#include "cafSelectionManager.h"
#include "cvfAssert.h"
@@ -62,7 +61,9 @@ void RicNewSummaryCurveFeature::onActionTriggered(bool isChecked)
if (plot)
{
RimSummaryCurve* newCurve = new RimSummaryCurve();
cvf::Color3f curveColor = RicWellLogPlotCurveFeatureImpl::curveColorFromTable(plot->curveCount());
// Use same counting as RicNewSummaryEnsembleCurveSetFeature::onActionTriggered
cvf::Color3f curveColor = RiaColorTables::summaryCurveDefaultPaletteColors().cycledColor3f(plot->singleColorCurveCount());
newCurve->setColor(curveColor);
plot->addCurveAndUpdate(newCurve);
@@ -67,12 +67,8 @@ void RicNewSummaryEnsembleCurveSetFeature::onActionTriggered(bool isChecked)
{
RimEnsembleCurveSet* curveSet = new RimEnsembleCurveSet();
// Set single curve set color
auto allCurveSets = plot->ensembleCurveSetCollection()->curveSets();
size_t colorIndex = std::count_if(allCurveSets.begin(), allCurveSets.end(), [](RimEnsembleCurveSet* curveSet)
{
return curveSet->colorMode() == RimEnsembleCurveSet::SINGLE_COLOR;
});
// Use same counting as RicNewSummaryCurveFeature::onActionTriggered
auto colorIndex = plot->singleColorCurveCount();
curveSet->setColor(RiaColorTables::summaryCurveDefaultPaletteColors().cycledColor3f(colorIndex));
curveSet->legendConfig()->setColorRange(RimEnsembleCurveSetColorManager::cycledEnsembleColorRange(static_cast<int>(colorIndex)));
@@ -0,0 +1,98 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicSetSourceSteppingEnsembleCurveSetFeature.h"
#include "RimEnsembleCurveSet.h"
#include "RimEnsembleCurveSetCollection.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
#include <QAction>
#include "RicClearSourceSteppingEnsembleCurveSetFeature.h"
#include "RimSummaryPlot.h"
CAF_CMD_SOURCE_INIT(RicSetSourceSteppingEnsembleCurveSetFeature, "RicSetSourceSteppingEnsembleCurveSetFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicSetSourceSteppingEnsembleCurveSetFeature::isCommandEnabled()
{
std::vector<RimEnsembleCurveSet*> ensembleCurveSets;
caf::SelectionManager::instance()->objectsByType(&ensembleCurveSets);
if (ensembleCurveSets.size() == 1)
{
auto c = ensembleCurveSets[0];
RimEnsembleCurveSetCollection* coll = nullptr;
c->firstAncestorOrThisOfType(coll);
if (coll)
{
if (coll->curveSetForSourceStepping() != c)
{
return true;
}
}
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicSetSourceSteppingEnsembleCurveSetFeature::onActionTriggered(bool isChecked)
{
std::vector<RimEnsembleCurveSet*> objects;
caf::SelectionManager::instance()->objectsByType(&objects);
if (objects.size() == 1)
{
auto c = objects[0];
RimSummaryPlot* summaryPlot = nullptr;
c->firstAncestorOrThisOfType(summaryPlot);
if (summaryPlot)
{
RicClearSourceSteppingEnsembleCurveSetFeature::clearAllSourceSteppingInSummaryPlot(summaryPlot);
}
RimEnsembleCurveSetCollection* coll = nullptr;
c->firstAncestorOrThisOfType(coll);
if (coll)
{
coll->setCurveSetForSourceStepping(c);
c->updateConnectedEditors();
RiuPlotMainWindowTools::refreshToolbars();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicSetSourceSteppingEnsembleCurveSetFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Set as Source Stepping Curve Set");
actionToSetup->setIcon(QIcon(":/StepUpDown16x16.png"));
}
@@ -0,0 +1,34 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
//==================================================================================================
///
//==================================================================================================
class RicSetSourceSteppingEnsembleCurveSetFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
bool isCommandEnabled() override;
void onActionTriggered(bool isChecked) override;
void setupActionLook(QAction* actionToSetup) override;
};
@@ -0,0 +1,98 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RicSetSourceSteppingSummaryCurveFeature.h"
#include "RicClearSourceSteppingEnsembleCurveSetFeature.h"
#include "RimSummaryCurve.h"
#include "RimSummaryCurveCollection.h"
#include "RimSummaryPlot.h"
#include "RiuPlotMainWindowTools.h"
#include "cafSelectionManager.h"
#include <QAction>
CAF_CMD_SOURCE_INIT(RicSetSourceSteppingSummaryCurveFeature, "RicSetSourceSteppingSummaryCurveFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicSetSourceSteppingSummaryCurveFeature::isCommandEnabled()
{
std::vector<RimSummaryCurve*> summaryCurves;
caf::SelectionManager::instance()->objectsByType(&summaryCurves);
if (summaryCurves.size() == 1)
{
auto c = summaryCurves[0];
RimSummaryCurveCollection* coll = nullptr;
c->firstAncestorOrThisOfTypeAsserted(coll);
if (coll)
{
if (coll->curveForSourceStepping() != c)
{
return true;
}
}
}
return false;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicSetSourceSteppingSummaryCurveFeature::onActionTriggered(bool isChecked)
{
std::vector<RimSummaryCurve*> summaryCurves;
caf::SelectionManager::instance()->objectsByType(&summaryCurves);
if (summaryCurves.size() == 1)
{
auto c = summaryCurves[0];
RimSummaryPlot* summaryPlot = nullptr;
c->firstAncestorOrThisOfType(summaryPlot);
if (summaryPlot)
{
RicClearSourceSteppingEnsembleCurveSetFeature::clearAllSourceSteppingInSummaryPlot(summaryPlot);
}
RimSummaryCurveCollection* coll = nullptr;
c->firstAncestorOrThisOfTypeAsserted(coll);
if (coll)
{
coll->setCurveForSourceStepping(c);
c->updateConnectedEditors();
RiuPlotMainWindowTools::refreshToolbars();
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicSetSourceSteppingSummaryCurveFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("Set as Source Stepping Curve");
actionToSetup->setIcon(QIcon(":/StepUpDown16x16.png"));
}
@@ -0,0 +1,34 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2018- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafCmdFeature.h"
//==================================================================================================
///
//==================================================================================================
class RicSetSourceSteppingSummaryCurveFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
bool isCommandEnabled() override;
void onActionTriggered(bool isChecked) override;
void setupActionLook(QAction* actionToSetup) override;
};