mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Prototyped commands for new treeview
This commit is contained in:
@@ -503,3 +503,50 @@ void RimProject::computeUtmAreaOfInterest()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#include "cafCmdFeatureManager.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "RimCellRangeFilterCollection.h"
|
||||
#include "RimCellRangeFilter.h"
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::actionsBasedOnSelection(std::vector<QAction*>& actions)
|
||||
{
|
||||
caf::CmdFeatureManager* commandManager = caf::CmdFeatureManager::instance();
|
||||
|
||||
std::vector<caf::PdmUiItem*> uiItems;
|
||||
caf::SelectionManager::instance()->selectedItems(uiItems);
|
||||
|
||||
if (uiItems.size() == 1)
|
||||
{
|
||||
if (dynamic_cast<RimCellRangeFilterCollection*>(uiItems[0]))
|
||||
{
|
||||
actions.push_back(commandManager->action("RicRangeFilterNew"));
|
||||
}
|
||||
if (dynamic_cast<RimCellRangeFilter*>(uiItems[0]))
|
||||
{
|
||||
actions.push_back(commandManager->action("RicRangeFilterNew"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
for (size_t i = 0; i < uiItems.size(); i++)
|
||||
{
|
||||
if (dynamic_cast<RimCellRangeFilter*>(uiItems[i]))
|
||||
{
|
||||
actions.push_back(commandManager->action("NewRangeFilter"));
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmDocument.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class RigCaseData;
|
||||
class RigGridManager;
|
||||
class RigMainGrid;
|
||||
@@ -35,6 +37,9 @@ class RimOilField;
|
||||
class RimScriptCollection;
|
||||
class RimWellPathImport;
|
||||
|
||||
|
||||
class QAction;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
@@ -70,6 +75,8 @@ public:
|
||||
|
||||
RimOilField* activeOilField();
|
||||
|
||||
void actionsBasedOnSelection(std::vector<QAction*>& actions);
|
||||
|
||||
protected:
|
||||
// Overridden methods
|
||||
void initScriptDirectories();
|
||||
|
||||
Reference in New Issue
Block a user