Esempio n. 1
0
//--------------------------------------------------------------------------------------------------
/// 
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RicSelectSummaryPlotUI::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly)
{
    QList<caf::PdmOptionItemInfo> options;

    if (fieldNeedingOptions == &m_selectedSummaryPlot)
    {
        RimSummaryPlotCollection* summaryPlotColl = RiaSummaryTools::summaryPlotCollection();

        summaryPlotColl->summaryPlotItemInfos(&options);
    }

    return options;
}
Esempio n. 2
0
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo> RicSummaryCurveCreator::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
                                                                            bool*                      useOptionsOnly)
{
    QList<caf::PdmOptionItemInfo> options;

    if (fieldNeedingOptions == &m_targetPlot)
    {
        RimProject* proj = RiaApplication::instance()->project();

        RimSummaryPlotCollection* summaryPlotColl = proj->mainPlotCollection()->summaryPlotCollection();

        // Create New Plot item
        QString displayName = "( New Plot )";
        options.push_back(caf::PdmOptionItemInfo(displayName, nullptr));

        if (summaryPlotColl)
        {
            summaryPlotColl->summaryPlotItemInfos(&options);
        }
    }

    return options;
}