mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3087 Show plot data. Display tabbed dialog for summary data
This commit is contained in:
@@ -90,7 +90,7 @@ void RicShowPlotDataFeature::onActionTriggered(bool isChecked)
|
||||
QString title = summaryPlot->description();
|
||||
QString text = summaryPlot->asciiDataForPlotExport();
|
||||
|
||||
RicShowPlotDataFeature::showTextWindow(title, text);
|
||||
RicShowPlotDataFeature::showTabbedTextWindow(title, [summaryPlot](DateTimePeriod period) { return summaryPlot->asciiDataForPlotExport(period); });
|
||||
}
|
||||
|
||||
for (RimWellLogPlot* wellLogPlot : wellLogPlots)
|
||||
@@ -115,6 +115,25 @@ void RicShowPlotDataFeature::setupActionLook(QAction* actionToSetup)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowPlotDataFeature::showTabbedTextWindow(const QString& title, std::function<QString(DateTimePeriod)> textProvider)
|
||||
{
|
||||
RiuPlotMainWindow* plotwindow = RiaApplication::instance()->mainPlotWindow();
|
||||
CVF_ASSERT(plotwindow);
|
||||
|
||||
RiuShowTabbedPlotDataDialog* textWiget = new RiuShowTabbedPlotDataDialog();
|
||||
textWiget->setMinimumSize(800, 600);
|
||||
|
||||
textWiget->setWindowTitle(title);
|
||||
textWiget->setTextProvider(textProvider);
|
||||
|
||||
textWiget->show();
|
||||
|
||||
plotwindow->addToTemporaryWidgets(textWiget);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicShowPlotDataFeature::showTextWindow(const QString& title, const QString& text)
|
||||
{
|
||||
RiuPlotMainWindow* plotwindow = RiaApplication::instance()->mainPlotWindow();
|
||||
|
||||
@@ -18,9 +18,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaQDateTimeTools.h"
|
||||
|
||||
#include "cafCmdFeature.h"
|
||||
|
||||
|
||||
#include <functional>
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
@@ -36,7 +38,8 @@ protected:
|
||||
virtual void setupActionLook( QAction* actionToSetup );
|
||||
|
||||
public:
|
||||
static void showTextWindow(const QString& title, const QString& text);
|
||||
static void showTabbedTextWindow(const QString& title, std::function<QString(DateTimePeriod)> textProvider);
|
||||
static void RicShowPlotDataFeature::showTextWindow(const QString& title, const QString& text);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user