2017-02-17 02:28:46 -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.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "RimStimPlanLegendConfig.h"
|
|
|
|
|
|
|
|
#include "RimLegendConfig.h"
|
|
|
|
|
|
|
|
#include "cafPdmUiOrdering.h"
|
|
|
|
#include "cafPdmUiTreeOrdering.h"
|
|
|
|
|
|
|
|
|
|
|
|
CAF_PDM_SOURCE_INIT(RimStimPlanLegendConfig, "RimStimPlanLegendConfig");
|
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimStimPlanLegendConfig::RimStimPlanLegendConfig()
|
|
|
|
{
|
|
|
|
CAF_PDM_InitObject("StimPlan Legend Definition", ":/Legend.png", "", "");
|
|
|
|
|
|
|
|
CAF_PDM_InitField(&m_name, "Name", QString("StimPlan Legend"), "Name", "", "", "");
|
|
|
|
m_name.uiCapability()->setUiReadOnly(true);
|
|
|
|
|
|
|
|
CAF_PDM_InitFieldNoDefault(&m_legend, "Legend", "Legend", "", "", "");
|
|
|
|
m_legend = new RimLegendConfig;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
RimStimPlanLegendConfig::~RimStimPlanLegendConfig()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
QString RimStimPlanLegendConfig::name() const
|
|
|
|
{
|
|
|
|
return m_name;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimStimPlanLegendConfig::setName(const QString& name)
|
|
|
|
{
|
|
|
|
m_name = name;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
caf::PdmFieldHandle* RimStimPlanLegendConfig::userDescriptionField()
|
|
|
|
{
|
|
|
|
return &m_name;
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimStimPlanLegendConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
|
|
|
|
{
|
|
|
|
uiOrdering.add(&m_name);
|
|
|
|
|
|
|
|
m_legend->defineUiOrdering(uiConfigName, uiOrdering);
|
|
|
|
}
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
///
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
|
|
void RimStimPlanLegendConfig::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
|
|
|
{
|
2017-04-03 00:34:56 -05:00
|
|
|
uiTreeOrdering.skipRemainingChildren(true);
|
2017-02-17 02:28:46 -06:00
|
|
|
}
|
|
|
|
|