2015-08-25 05:40:55 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2015-09-23 05:23:21 -05:00
|
|
|
#include "RivCellSetEnum.h"
|
|
|
|
|
2015-08-25 05:40:55 -05:00
|
|
|
#include "cafPdmChildArrayField.h"
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
2015-09-01 10:14:22 -05:00
|
|
|
#include "cafPdmPtrField.h"
|
2015-09-23 05:23:21 -05:00
|
|
|
|
2016-12-15 11:20:43 -06:00
|
|
|
#include "cvfBase.h"
|
|
|
|
#include "cvfVector3.h"
|
|
|
|
|
2015-09-23 05:23:21 -05:00
|
|
|
namespace cvf
|
|
|
|
{
|
|
|
|
class BoundingBox;
|
|
|
|
}
|
2015-08-25 05:40:55 -05:00
|
|
|
|
2015-09-24 04:29:01 -05:00
|
|
|
class RimViewController;
|
2015-08-25 05:40:55 -05:00
|
|
|
class RiuViewer;
|
2015-08-28 14:05:56 -05:00
|
|
|
class RimView;
|
2015-10-19 05:10:18 -05:00
|
|
|
class RimCellRangeFilter;
|
2015-08-25 05:40:55 -05:00
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2015-09-07 07:29:46 -05:00
|
|
|
class RimViewLinker : public caf::PdmObject
|
2015-08-25 05:40:55 -05:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
|
|
|
public:
|
2015-09-07 07:29:46 -05:00
|
|
|
RimViewLinker(void);
|
|
|
|
virtual ~RimViewLinker(void);
|
2015-09-24 10:40:45 -05:00
|
|
|
|
2016-12-15 11:34:42 -06:00
|
|
|
bool isActive() const;
|
2015-09-01 10:14:22 -05:00
|
|
|
|
2015-09-24 04:29:01 -05:00
|
|
|
void setMasterView(RimView* view);
|
2016-12-15 11:34:42 -06:00
|
|
|
RimView* masterView() const;
|
2015-08-25 05:40:55 -05:00
|
|
|
|
2015-09-24 07:29:13 -05:00
|
|
|
void addDependentView(RimView* view);
|
|
|
|
void updateDependentViews();
|
2015-10-21 05:45:35 -05:00
|
|
|
void removeViewController(RimViewController* viewController);
|
2015-08-25 05:40:55 -05:00
|
|
|
|
2015-10-22 09:02:28 -05:00
|
|
|
void updateOverrides();
|
|
|
|
|
2015-09-23 05:23:21 -05:00
|
|
|
void updateCamera(RimView* sourceView);
|
2015-09-13 01:54:32 -05:00
|
|
|
void updateTimeStep(RimView* sourceView, int timeStep);
|
2015-09-23 05:23:21 -05:00
|
|
|
void updateScaleZ(RimView* sourceView, double scaleZ);
|
2015-08-27 06:44:27 -05:00
|
|
|
|
2015-09-13 01:54:32 -05:00
|
|
|
void updateCellResult();
|
2016-12-09 13:36:31 -06:00
|
|
|
|
2015-10-19 05:10:18 -05:00
|
|
|
void updateRangeFilters(RimCellRangeFilter* changedRangeFilter);
|
2015-10-21 05:45:35 -05:00
|
|
|
void applyRangeFilterCollectionByUserChoice();
|
2015-08-28 01:01:40 -05:00
|
|
|
|
2015-09-13 01:54:32 -05:00
|
|
|
void scheduleGeometryRegenForDepViews(RivCellSetEnum geometryType);
|
|
|
|
void scheduleCreateDisplayModelAndRedrawForDependentViews();
|
2015-08-28 14:05:56 -05:00
|
|
|
|
2016-12-15 11:20:43 -06:00
|
|
|
void allViews(std::vector<RimView*>& views) const;
|
2015-09-13 01:54:32 -05:00
|
|
|
|
2015-09-24 07:29:13 -05:00
|
|
|
void updateUiNameAndIcon();
|
|
|
|
|
2016-12-15 11:34:42 -06:00
|
|
|
void addViewControllers(caf::PdmUiTreeOrdering& uiTreeOrdering) const;
|
2015-09-15 02:47:59 -05:00
|
|
|
|
|
|
|
static void applyIconEnabledState(caf::PdmObject* obj, const QIcon& icon, bool disable);
|
|
|
|
static void findNameAndIconFromView(QString* name, QIcon* icon, RimView* view);
|
2015-09-08 03:17:35 -05:00
|
|
|
|
2016-12-15 11:20:43 -06:00
|
|
|
void updateCursorPosition(const RimView* sourceView, const cvf::Vec3d& domainCoord);
|
|
|
|
|
2015-09-01 10:14:22 -05:00
|
|
|
public:
|
2015-09-13 01:54:32 -05:00
|
|
|
static QString displayNameForView(RimView* view);
|
2015-09-24 04:29:01 -05:00
|
|
|
|
2015-09-01 10:14:22 -05:00
|
|
|
protected:
|
2015-09-02 06:44:56 -05:00
|
|
|
virtual caf::PdmFieldHandle* userDescriptionField() { return &m_name; }
|
2015-09-02 10:18:02 -05:00
|
|
|
virtual void initAfterRead();
|
2015-09-02 06:44:56 -05:00
|
|
|
|
|
|
|
private:
|
2016-12-15 11:34:42 -06:00
|
|
|
void allViewsForCameraSync(const RimView* source, std::vector<RimView*>& views) const;
|
2015-09-24 07:29:13 -05:00
|
|
|
|
|
|
|
void removeOverrides();
|
2015-09-24 04:29:01 -05:00
|
|
|
|
2015-09-07 07:54:54 -05:00
|
|
|
private:
|
2015-10-20 04:13:31 -05:00
|
|
|
caf::PdmChildArrayField<RimViewController*> m_viewControllers;
|
2015-09-24 07:29:13 -05:00
|
|
|
caf::PdmPtrField<RimView*> m_masterView;
|
|
|
|
caf::PdmField<QString> m_name;
|
|
|
|
QIcon m_originalIcon;
|
2015-08-25 05:40:55 -05:00
|
|
|
};
|