2017-09-15 03:48:38 -05: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
|
|
|
|
|
|
|
|
#include "cafPdmUiWidgetBasedObjectEditor.h"
|
2017-10-27 01:26:20 -05:00
|
|
|
|
2017-09-15 03:48:38 -05:00
|
|
|
#include <vector>
|
2017-10-23 04:41:16 -05:00
|
|
|
#include <memory>
|
2017-09-15 03:48:38 -05:00
|
|
|
|
2017-10-27 01:26:20 -05:00
|
|
|
class RimSummaryPlot;
|
2017-09-15 03:48:38 -05:00
|
|
|
class RicSummaryCurveCreator;
|
|
|
|
|
|
|
|
class QMinimizePanel;
|
|
|
|
class QSplitter;
|
|
|
|
class QString;
|
|
|
|
class QVBoxLayout;
|
2017-09-15 05:52:26 -05:00
|
|
|
class QHBoxLayout;
|
|
|
|
class QBoxLayout;
|
2017-09-15 03:48:38 -05:00
|
|
|
|
|
|
|
namespace caf {
|
|
|
|
class PdmUiItem;
|
2017-10-02 07:49:24 -05:00
|
|
|
class PdmUiTreeView;
|
2017-09-15 03:48:38 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-09-15 05:52:26 -05:00
|
|
|
//==================================================================================================
|
|
|
|
///
|
|
|
|
///
|
|
|
|
//==================================================================================================
|
2017-09-15 03:48:38 -05:00
|
|
|
class RicSummaryCurveCreatorSplitterUi : public caf::PdmUiWidgetBasedObjectEditor
|
|
|
|
{
|
2017-09-15 07:40:25 -05:00
|
|
|
Q_OBJECT
|
2017-09-25 08:38:57 -05:00
|
|
|
|
2017-09-15 03:48:38 -05:00
|
|
|
public:
|
|
|
|
RicSummaryCurveCreatorSplitterUi(QWidget* parent);
|
|
|
|
~RicSummaryCurveCreatorSplitterUi();
|
|
|
|
|
2017-10-27 01:26:20 -05:00
|
|
|
void updateFromSummaryPlot(RimSummaryPlot* summaryPlot);
|
|
|
|
|
2017-09-15 03:48:38 -05:00
|
|
|
private:
|
|
|
|
virtual void recursivelyConfigureAndUpdateTopLevelUiItems(const std::vector<caf::PdmUiItem *>& topLevelUiItems,
|
|
|
|
const QString& uiConfigName) override;
|
|
|
|
|
|
|
|
virtual QWidget* createWidget(QWidget* parent) override;
|
|
|
|
|
|
|
|
QWidget* getOrCreateCurveTreeWidget();
|
|
|
|
QWidget* getOrCreatePlotWidget();
|
|
|
|
|
|
|
|
static caf::PdmUiGroup* findGroupByKeyword(const std::vector<caf::PdmUiItem *>& topLevelUiItems,
|
|
|
|
const QString& keyword,
|
|
|
|
const QString& uiConfigName);
|
|
|
|
|
2017-09-15 05:52:26 -05:00
|
|
|
void configureAndUpdateFields(int widgetStartIndex,
|
|
|
|
QBoxLayout* layout,
|
|
|
|
const std::vector<caf::PdmUiItem *>& topLevelUiItems,
|
|
|
|
const QString& uiConfigName);
|
|
|
|
|
2017-09-22 02:54:40 -05:00
|
|
|
QMinimizePanel* createGroupBoxWithContent(caf::PdmUiGroup* group,
|
|
|
|
const QString& uiConfigName);
|
2017-09-15 07:40:25 -05:00
|
|
|
signals:
|
|
|
|
void signalCloseButtonPressed();
|
|
|
|
|
|
|
|
|
2017-09-15 03:48:38 -05:00
|
|
|
private:
|
|
|
|
QPointer<QVBoxLayout> m_layout;
|
|
|
|
QPointer<QSplitter> m_firstColumnSplitter;
|
|
|
|
|
|
|
|
QPointer<QMinimizePanel> m_curvesPanel;
|
|
|
|
|
|
|
|
QPointer<QHBoxLayout> m_firstRowLayout;
|
|
|
|
QPointer<QHBoxLayout> m_secondRowLayout;
|
|
|
|
QPointer<QVBoxLayout> m_lowerLeftLayout;
|
2017-09-15 05:52:26 -05:00
|
|
|
|
|
|
|
QPointer<QHBoxLayout> m_bottomFieldLayout;
|
2017-10-02 07:49:24 -05:00
|
|
|
|
|
|
|
QPointer<caf::PdmUiTreeView> m_curveTreeView;
|
2017-10-23 04:41:16 -05:00
|
|
|
|
|
|
|
QWidget* m_parentWidget;
|
2017-10-27 01:26:20 -05:00
|
|
|
|
|
|
|
std::unique_ptr<RicSummaryCurveCreator> m_summaryCurveCreator;
|
2017-09-15 03:48:38 -05:00
|
|
|
};
|