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