2017-11-23 02:15:29 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2017- Statoil ASA
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
#include "RifEclipseSummaryAddress.h"
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmProxyValueField.h"
|
|
|
|
#include "cafPdmPtrField.h"
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
#include <set>
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
class RimSummaryCase;
|
|
|
|
class RifSummaryReaderInterface;
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2017-11-29 03:35:52 -06:00
|
|
|
class RimSummaryPlotSourceStepping : public caf::PdmObject
|
2017-11-23 02:15:29 -06:00
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
public:
|
|
|
|
enum SourceSteppingType
|
|
|
|
{
|
|
|
|
Y_AXIS,
|
|
|
|
X_AXIS,
|
|
|
|
UNION_X_Y_AXIS
|
|
|
|
};
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
public:
|
2017-11-29 03:35:52 -06:00
|
|
|
RimSummaryPlotSourceStepping();
|
2017-11-23 02:15:29 -06:00
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
void setSourceSteppingType(SourceSteppingType sourceSteppingType);
|
|
|
|
|
2017-11-24 11:13:43 -06:00
|
|
|
void applyNextIdentifier();
|
|
|
|
void applyPreviousIdentifier();
|
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
2017-11-29 05:55:42 -06:00
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
private:
|
|
|
|
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
|
|
|
|
|
|
|
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
|
|
|
bool* useOptionsOnly) override;
|
|
|
|
|
2017-11-24 08:17:20 -06:00
|
|
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue,
|
|
|
|
const QVariant& newValue) override;
|
|
|
|
|
2017-12-01 04:15:19 -06:00
|
|
|
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName,
|
|
|
|
caf::PdmUiEditorAttribute* attribute) override;
|
2017-11-29 09:23:57 -06:00
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
private:
|
|
|
|
RifSummaryReaderInterface* summaryReader() const;
|
|
|
|
RimSummaryCase* singleSummaryCase() const;
|
2017-11-24 11:13:43 -06:00
|
|
|
void updateUiFromCurves();
|
|
|
|
caf::PdmFieldHandle* fieldToModify();
|
2017-11-24 11:23:41 -06:00
|
|
|
caf::PdmValueField* valueFieldToModify();
|
2017-11-23 02:15:29 -06:00
|
|
|
|
2017-12-01 04:46:29 -06:00
|
|
|
std::set<RifEclipseSummaryAddress> allAddressesUsedInCurveCollection() const;
|
2017-12-01 04:15:19 -06:00
|
|
|
|
|
|
|
bool isXAxisStepping() const;
|
|
|
|
bool isYAxisStepping() const;
|
|
|
|
|
2017-11-23 02:15:29 -06:00
|
|
|
private:
|
|
|
|
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
|
|
|
caf::PdmField<QString> m_wellName;
|
2017-11-24 08:17:20 -06:00
|
|
|
caf::PdmField<QString> m_wellGroupName;
|
2017-11-23 02:15:29 -06:00
|
|
|
caf::PdmField<int> m_region;
|
2017-11-24 08:17:20 -06:00
|
|
|
caf::PdmField<QString> m_quantity;
|
2017-12-01 04:15:19 -06:00
|
|
|
SourceSteppingType m_sourceSteppingType;
|
2017-11-23 02:15:29 -06:00
|
|
|
};
|