2012-05-18 09:45:23 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-23 15:04:57 +02:00
|
|
|
// Copyright (C) 2011- Statoil ASA
|
|
|
|
|
// Copyright (C) 2013- Ceetron Solutions AS
|
|
|
|
|
// Copyright (C) 2011-2012 Ceetron AS
|
2012-05-18 09:45:23 +02:00
|
|
|
//
|
|
|
|
|
// 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 "cafViewer.h"
|
|
|
|
|
|
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
|
#include "cafPdmPointer.h"
|
|
|
|
|
|
|
|
|
|
#include "cafMouseState.h"
|
2014-07-25 14:48:37 +02:00
|
|
|
#include "cvfStructGrid.h"
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-04-30 10:34:15 +02:00
|
|
|
class RimView;
|
2012-09-11 09:22:36 +02:00
|
|
|
class QLabel;
|
|
|
|
|
class QProgressBar;
|
|
|
|
|
class RiuSimpleHistogramWidget;
|
2012-10-24 11:01:41 +02:00
|
|
|
class QCDEStyle;
|
2015-06-11 11:38:51 +02:00
|
|
|
class RiuViewerCommands;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
namespace cvf
|
|
|
|
|
{
|
|
|
|
|
class Part;
|
2014-04-07 13:18:39 +02:00
|
|
|
class OverlayItem;
|
2012-05-18 09:45:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
2013-03-22 17:30:50 +01:00
|
|
|
// RiuViewer
|
2012-05-18 09:45:23 +02:00
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
2013-03-22 17:17:56 +01:00
|
|
|
class RiuViewer : public caf::Viewer
|
2012-05-18 09:45:23 +02:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2013-03-22 17:17:56 +01:00
|
|
|
RiuViewer(const QGLFormat& format, QWidget* parent);
|
|
|
|
|
~RiuViewer();
|
2012-05-18 09:45:23 +02:00
|
|
|
|
|
|
|
|
void setDefaultView();
|
|
|
|
|
cvf::Vec3d pointOfInterest();
|
|
|
|
|
void setPointOfInterest(cvf::Vec3d poi);
|
2015-04-30 10:34:15 +02:00
|
|
|
void setOwnerReservoirView(RimView * owner);
|
2012-05-18 09:45:23 +02:00
|
|
|
void setEnableMask(unsigned int mask);
|
2012-09-11 09:22:36 +02:00
|
|
|
|
|
|
|
|
void showInfoText(bool enable);
|
|
|
|
|
void setInfoText(QString text);
|
|
|
|
|
void showHistogram(bool enable);
|
|
|
|
|
void setHistogram(double min, double max, const std::vector<size_t>& histogram);
|
2012-10-23 12:08:46 +02:00
|
|
|
void setHistogramPercentiles(double pmin, double pmax, double mean);
|
2012-09-11 09:22:36 +02:00
|
|
|
|
|
|
|
|
void showAnimationProgress(bool enable);
|
2014-04-07 13:18:39 +02:00
|
|
|
|
2014-07-30 10:54:46 +02:00
|
|
|
void removeAllColorLegends();
|
|
|
|
|
void addColorLegendToBottomLeftCorner(cvf::OverlayItem* legend);
|
2014-04-07 13:18:39 +02:00
|
|
|
|
2015-07-02 12:44:57 +02:00
|
|
|
void updateNavigationPolicy();
|
2015-08-28 21:32:51 +02:00
|
|
|
|
2015-09-01 18:04:35 +02:00
|
|
|
virtual void navigationPolicyUpdate(); // Override of caf::Viewer::navigationPolicyUpdate()
|
2015-08-28 21:32:51 +02:00
|
|
|
|
2015-09-01 17:14:22 +02:00
|
|
|
void setCurrentFrame(int frameIndex);
|
|
|
|
|
|
2012-05-18 09:45:23 +02:00
|
|
|
public slots:
|
|
|
|
|
virtual void slotSetCurrentFrame(int frameIndex);
|
|
|
|
|
virtual void slotEndAnimation();
|
|
|
|
|
|
2015-06-11 11:38:51 +02:00
|
|
|
private:
|
2012-09-11 09:22:36 +02:00
|
|
|
void paintOverlayItems(QPainter* painter);
|
2015-06-05 15:17:02 +02:00
|
|
|
|
2015-06-11 11:38:51 +02:00
|
|
|
void mouseReleaseEvent(QMouseEvent* event);
|
2013-04-23 07:29:37 +02:00
|
|
|
void mousePressEvent(QMouseEvent* event);
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-08-25 12:40:55 +02:00
|
|
|
|
2012-09-11 09:22:36 +02:00
|
|
|
QLabel* m_InfoLabel;
|
2015-06-24 13:44:42 +02:00
|
|
|
QLabel* m_versionInfoLabel;
|
2012-09-11 09:22:36 +02:00
|
|
|
bool m_showInfoText;;
|
|
|
|
|
|
|
|
|
|
QProgressBar* m_animationProgress;
|
|
|
|
|
bool m_showAnimProgress;
|
|
|
|
|
RiuSimpleHistogramWidget* m_histogramWidget;
|
|
|
|
|
bool m_showHistogram;
|
|
|
|
|
|
2012-10-24 11:01:41 +02:00
|
|
|
QCDEStyle* m_progressBarStyle;
|
2012-09-11 09:22:36 +02:00
|
|
|
|
|
|
|
|
|
2014-07-30 10:54:46 +02:00
|
|
|
cvf::Collection<cvf::OverlayItem> m_visibleLegends;
|
2013-02-28 11:58:31 +01:00
|
|
|
|
2015-04-30 10:34:15 +02:00
|
|
|
caf::PdmPointer<RimView> m_reservoirView;
|
2015-06-11 11:38:51 +02:00
|
|
|
QPoint m_lastMousePressPosition;
|
2012-05-18 09:45:23 +02:00
|
|
|
|
2015-06-11 11:38:51 +02:00
|
|
|
RiuViewerCommands * m_viewerCommands;
|
2012-05-18 09:45:23 +02:00
|
|
|
};
|
2015-06-11 11:38:51 +02:00
|
|
|
|