(#339) Removed unused feature files

This commit is contained in:
Pål Hagen 2015-08-18 10:41:50 +02:00
parent 67fedfd699
commit f8c5bbc481
5 changed files with 0 additions and 317 deletions

View File

@ -9,7 +9,6 @@ ${CEE_CURRENT_LIST_DIR}RicEclipseCaseCloseFeature.h
${CEE_CURRENT_LIST_DIR}RicEclipseCaseExecuteScriptFeature.h
${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewGroupFeature.h
${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewGroupExec.h
${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewViewFeature.h
${CEE_CURRENT_LIST_DIR}RicEclipseCasePasteFeature.h
${CEE_CURRENT_LIST_DIR}RicGeoMechPropertyFilterFeatureImpl.h
${CEE_CURRENT_LIST_DIR}RicGeoMechPropertyFilterInsertFeature.h
@ -52,7 +51,6 @@ ${CEE_CURRENT_LIST_DIR}RicEclipseCaseCloseFeature.cpp
${CEE_CURRENT_LIST_DIR}RicEclipseCaseExecuteScriptFeature.cpp
${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewGroupFeature.cpp
${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewGroupExec.cpp
${CEE_CURRENT_LIST_DIR}RicEclipseCaseNewViewFeature.cpp
${CEE_CURRENT_LIST_DIR}RicEclipseCasePasteFeature.cpp
${CEE_CURRENT_LIST_DIR}RicGeoMechPropertyFilterFeatureImpl.cpp
${CEE_CURRENT_LIST_DIR}RicGeoMechPropertyFilterInsertFeature.cpp

View File

@ -1,61 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "RicEclipseCaseNewViewFeature.h"
#include "RimCase.h"
#include "cafSelectionManager.h"
#include <QAction>
CAF_CMD_SOURCE_INIT(RicEclipseCaseNewViewFeature, "RicEclipseCaseNewViewFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicEclipseCaseNewViewFeature::isCommandEnabled()
{
std::vector<RimCase*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
if (selection.size() > 0)
{
return true;
}
else
{
return false;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicEclipseCaseNewViewFeature::onActionTriggered(bool isChecked)
{
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicEclipseCaseNewViewFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("New View");
}

View File

@ -1,39 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 RicEclipseCaseNewViewFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
// Overrides
virtual bool isCommandEnabled();
virtual void onActionTriggered( bool isChecked );
virtual void setupActionLook( QAction* actionToSetup );
};

View File

@ -1,165 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 "RicEclipseViewNewFeature.h"
#include "RimView.h"
#include "RimEclipseView.h"
#include "RimGeoMechView.h"
#include "RimEclipseCase.h"
#include "RimGeoMechCase.h"
#include "cafSelectionManager.h"
#include <QAction>
CAF_CMD_SOURCE_INIT(RicEclipseViewNewFeature, "RicEclipseViewNewFeature");
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicEclipseViewNewFeature::isCommandEnabled()
{
return selectedEclipseCase() != NULL
|| selectedEclipseView() != NULL
|| selectedGeoMechCase() != NULL
|| selectedGeoMechView() != NULL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicEclipseViewNewFeature::onActionTriggered(bool isChecked)
{
addReservoirView();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicEclipseViewNewFeature::setupActionLook(QAction* actionToSetup)
{
actionToSetup->setText("New View");
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimView* RicEclipseViewNewFeature::addReservoirView()
{
// Establish type of selected object
RimEclipseCase* eclipseCase = selectedEclipseCase();
RimGeoMechCase* geomCase = selectedGeoMechCase();
RimGeoMechView* geoMechView = selectedGeoMechView();
RimEclipseView* reservoirView = selectedEclipseView();
// Find case to insert into
if (geoMechView) geomCase = geoMechView->geoMechCase();
if (reservoirView) eclipseCase = reservoirView->eclipseCase();
RimView* insertedView = NULL;
if (eclipseCase)
{
insertedView = eclipseCase->createAndAddReservoirView();
}
else if (geomCase)
{
insertedView = geomCase->createAndAddReservoirView();
}
// Must be run before buildViewItems, as wells are created in this function
insertedView->loadDataAndUpdate();
if (eclipseCase)
{
eclipseCase->updateConnectedEditors();
}
if (geomCase)
{
geomCase->updateConnectedEditors();
}
return insertedView;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimEclipseCase* RicEclipseViewNewFeature::selectedEclipseCase() const
{
std::vector<RimEclipseCase*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
if (selection.size() > 0)
{
return selection[0];
}
return NULL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGeoMechCase* RicEclipseViewNewFeature::selectedGeoMechCase() const
{
std::vector<RimGeoMechCase*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
if (selection.size() > 0)
{
return selection[0];
}
return NULL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimEclipseView* RicEclipseViewNewFeature::selectedEclipseView() const
{
std::vector<RimEclipseView*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
if (selection.size() > 0)
{
return selection[0];
}
return NULL;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimGeoMechView* RicEclipseViewNewFeature::selectedGeoMechView() const
{
std::vector<RimGeoMechView*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
if (selection.size() > 0)
{
return selection[0];
}
return NULL;
}

View File

@ -1,50 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// 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 RimView;
class RimEclipseCase;
class RimEclipseView;
class RimGeoMechCase;
class RimGeoMechView;
//==================================================================================================
///
//==================================================================================================
class RicEclipseViewNewFeature : public caf::CmdFeature
{
CAF_CMD_HEADER_INIT;
protected:
// Overrides
virtual bool isCommandEnabled();
virtual void onActionTriggered( bool isChecked );
virtual void setupActionLook( QAction* actionToSetup );
private:
RimView* addReservoirView();
RimEclipseCase* selectedEclipseCase() const;
RimGeoMechCase* selectedGeoMechCase() const;
RimEclipseView* selectedEclipseView() const;
RimGeoMechView* selectedGeoMechView() const;
};