mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Mainwindow datasources (#8883)
* Main Window: add three dock widgets for splitting project tree * Main Window: move scripts to separate tree widget * Add eclipse result addresses to data source project tree. * Grid Calculator: drag-and-drop for calculation variables. * Grid Calculator: rename to 'Grid Property Calculator'.
This commit is contained in:
committed by
GitHub
parent
65827f9c1c
commit
daf02571c2
@@ -0,0 +1,87 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2022 Equinor 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 "RimEclipseResultAddressCollection.h"
|
||||
|
||||
#include "RimEclipseResultAddress.h"
|
||||
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimEclipseResultAddressCollection, "RimEclipseResultAddressCollection" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseResultAddressCollection::RimEclipseResultAddressCollection()
|
||||
{
|
||||
CAF_PDM_InitObject( "Folder", ":/Folder.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_adresses, "Addresses", "Addresses" );
|
||||
m_adresses.uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_resultType, "ResultType", "Type" );
|
||||
m_resultType.uiCapability()->setUiHidden( true );
|
||||
|
||||
nameField()->uiCapability()->setUiHidden( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseResultAddressCollection::~RimEclipseResultAddressCollection()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultAddressCollection::setResultType( RiaDefines::ResultCatType val )
|
||||
{
|
||||
m_resultType = val;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultAddressCollection::addAddress( const QString& resultName,
|
||||
RiaDefines::ResultCatType resultType,
|
||||
RimEclipseCase* eclipseCase )
|
||||
{
|
||||
auto addr = new RimEclipseResultAddress;
|
||||
addr->setUiName( resultName );
|
||||
addr->setResultName( resultName );
|
||||
addr->setResultType( resultType );
|
||||
addr->setEclipseCase( eclipseCase );
|
||||
m_adresses.push_back( addr );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultAddressCollection::clear()
|
||||
{
|
||||
m_adresses.clear();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimEclipseResultAddressCollection::isEmpty() const
|
||||
{
|
||||
return m_adresses.empty();
|
||||
}
|
||||
Reference in New Issue
Block a user