mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1842 RFT Plot. Show plot when new RFT plot command is triggered
This commit is contained in:
@@ -79,12 +79,12 @@ RiuWellRftPlot::RiuWellRftPlot(RimWellRftPlot* plotDefinition, QWidget* parent)
|
||||
//m_legendWidget = new RiuNightchartsWidget(this);
|
||||
//new RiuPlotObjectPicker(m_legendWidget, m_plotDefinition->plotLegend());
|
||||
|
||||
QStringList commandIds;
|
||||
commandIds << "RicShowTotalAllocationDataFeature";
|
||||
new RiuContextMenuLauncher(m_legendWidget, commandIds);
|
||||
//QStringList commandIds;
|
||||
//commandIds << "RicShowTotalAllocationDataFeature";
|
||||
//new RiuContextMenuLauncher(m_legendWidget, commandIds);
|
||||
|
||||
rightColumnLayout->addWidget(m_legendWidget);
|
||||
m_legendWidget->showPie(false);
|
||||
//rightColumnLayout->addWidget(m_legendWidget);
|
||||
//m_legendWidget->showPie(false);
|
||||
|
||||
//QWidget* totalFlowAllocationWidget = m_plotDefinition->totalWellFlowPlot()->createViewWidget(this);
|
||||
//new RiuPlotObjectPicker(totalFlowAllocationWidget, m_plotDefinition->totalWellFlowPlot());
|
||||
@@ -148,35 +148,35 @@ void RiuWellRftPlot::hideTitle()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellRftPlot::showLegend(bool doShow)
|
||||
{
|
||||
if (doShow)
|
||||
m_legendWidget->show();
|
||||
else
|
||||
m_legendWidget->hide();
|
||||
}
|
||||
//void RiuWellRftPlot::showLegend(bool doShow)
|
||||
//{
|
||||
// if (doShow)
|
||||
// m_legendWidget->show();
|
||||
// else
|
||||
// m_legendWidget->hide();
|
||||
//}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellRftPlot::addLegendItem(const QString& name, const cvf::Color3f& color, float value)
|
||||
{
|
||||
QColor sliceColor(color.rByte(), color.gByte(), color.bByte());
|
||||
|
||||
m_legendWidget->addItem(name, sliceColor, value);
|
||||
m_legendWidget->updateGeometry();
|
||||
m_legendWidget->update();
|
||||
}
|
||||
//void RiuWellRftPlot::addLegendItem(const QString& name, const cvf::Color3f& color, float value)
|
||||
//{
|
||||
// QColor sliceColor(color.rByte(), color.gByte(), color.bByte());
|
||||
//
|
||||
// m_legendWidget->addItem(name, sliceColor, value);
|
||||
// m_legendWidget->updateGeometry();
|
||||
// m_legendWidget->update();
|
||||
//}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellRftPlot::clearLegend()
|
||||
{
|
||||
m_legendWidget->clear();
|
||||
}
|
||||
//void RiuWellRftPlot::clearLegend()
|
||||
//{
|
||||
// m_legendWidget->clear();
|
||||
//}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -192,17 +192,17 @@ QSize RiuWellRftPlot::minimumSizeHint() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellRftPlot::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
QMenu menu;
|
||||
QStringList commandIds;
|
||||
//QMenu menu;
|
||||
//QStringList commandIds;
|
||||
|
||||
commandIds << "RicShowContributingWellsFromPlotFeature";
|
||||
//commandIds << "RicShowContributingWellsFromPlotFeature";
|
||||
|
||||
RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu);
|
||||
//RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu);
|
||||
|
||||
if (menu.actions().size() > 0)
|
||||
{
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
//if (menu.actions().size() > 0)
|
||||
//{
|
||||
// menu.exec(event->globalPos());
|
||||
//}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -48,14 +48,14 @@ public:
|
||||
RiuWellRftPlot(RimWellRftPlot* plotDefinition, QWidget* parent = NULL);
|
||||
virtual ~RiuWellRftPlot();
|
||||
|
||||
RimWellRftPlot* ownerPlotDefinition();
|
||||
RimWellRftPlot* ownerPlotDefinition();
|
||||
virtual RimViewWindow* ownerViewWindow() const override;
|
||||
|
||||
void showTitle(const QString& title);
|
||||
void hideTitle();
|
||||
void showLegend(bool doShow);
|
||||
void addLegendItem(const QString& name, const cvf::Color3f& color, float value);
|
||||
void clearLegend();
|
||||
// void showLegend(bool doShow);
|
||||
// void addLegendItem(const QString& name, const cvf::Color3f& color, float value);
|
||||
// void clearLegend();
|
||||
|
||||
|
||||
protected:
|
||||
@@ -69,6 +69,5 @@ private:
|
||||
|
||||
private:
|
||||
caf::PdmPointer<RimWellRftPlot> m_plotDefinition;
|
||||
QPointer<RiuNightchartsWidget> m_legendWidget;
|
||||
QPointer<QLabel> m_titleLabel;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user