mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1469 Reorder includes and fix comments and whitespace
This commit is contained in:
parent
84b922ba82
commit
0c0c21e495
@ -17,27 +17,30 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "RiuFlowCharacteristicsPlot.h"
|
#include "RiuFlowCharacteristicsPlot.h"
|
||||||
#include "RimFlowCharacteristicsPlot.h"
|
|
||||||
#include "RiuResultQwtPlot.h"
|
|
||||||
|
|
||||||
#include "qwt_plot.h"
|
#include "RiaColorTables.h"
|
||||||
|
|
||||||
|
#include "RimFlowCharacteristicsPlot.h"
|
||||||
|
|
||||||
|
#include "RiuLineSegmentQwtPlotCurve.h"
|
||||||
|
#include "RiuQwtPlotWheelZoomer.h"
|
||||||
|
#include "RiuQwtPlotZoomer.h"
|
||||||
|
#include "RiuResultQwtPlot.h"
|
||||||
|
#include "RiuSummaryQwtPlot.h"
|
||||||
|
|
||||||
#include "cvfBase.h"
|
#include "cvfBase.h"
|
||||||
#include "cvfColor3.h"
|
#include "cvfColor3.h"
|
||||||
|
|
||||||
|
#include "qwt_date.h"
|
||||||
|
#include "qwt_plot.h"
|
||||||
|
#include "qwt_plot_zoneitem.h"
|
||||||
|
#include "qwt_plot_zoomer.h"
|
||||||
|
|
||||||
#include <QBoxLayout>
|
#include <QBoxLayout>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
|
#include <QDateTime>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include "RiuLineSegmentQwtPlotCurve.h"
|
|
||||||
#include <QDateTime>
|
|
||||||
#include "RiuSummaryQwtPlot.h"
|
|
||||||
#include "RiuQwtPlotWheelZoomer.h"
|
|
||||||
#include "qwt_plot_zoomer.h"
|
|
||||||
#include "RiaColorTables.h"
|
|
||||||
#include "qwt_plot_zoneitem.h"
|
|
||||||
#include "qwt_date.h"
|
|
||||||
#include "RiuQwtPlotZoomer.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -85,6 +88,9 @@ RiuFlowCharacteristicsPlot::RiuFlowCharacteristicsPlot(RimFlowCharacteristicsPlo
|
|||||||
m_flowCapVsStorageCapPlot->setTitle("Flow Capacity vs Storage Capacity");
|
m_flowCapVsStorageCapPlot->setTitle("Flow Capacity vs Storage Capacity");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuFlowCharacteristicsPlot::addWindowZoom(QwtPlot* plot)
|
void RiuFlowCharacteristicsPlot::addWindowZoom(QwtPlot* plot)
|
||||||
{
|
{
|
||||||
auto zoomer = new RiuQwtPlotZoomer(plot->canvas());
|
auto zoomer = new RiuQwtPlotZoomer(plot->canvas());
|
||||||
@ -114,22 +120,6 @@ void RiuFlowCharacteristicsPlot::setLorenzCurve(const std::vector<QDateTime>& da
|
|||||||
m_lorenzPlot->detachItems(QwtPlotItem::Rtti_PlotCurve, true);
|
m_lorenzPlot->detachItems(QwtPlotItem::Rtti_PlotCurve, true);
|
||||||
auto curve = createEmptyCurve(m_lorenzPlot, "Lorenz Coefficient", QColor(0, 0, 0));
|
auto curve = createEmptyCurve(m_lorenzPlot, "Lorenz Coefficient", QColor(0, 0, 0));
|
||||||
curve->setSamplesFromDateAndValues(dateTimes, timeHistoryValues, false);
|
curve->setSamplesFromDateAndValues(dateTimes, timeHistoryValues, false);
|
||||||
//curve->setSymbol(QwtSymbol )
|
|
||||||
|
|
||||||
//size_t tsIdx = 0;
|
|
||||||
//for ( const QDateTime& dateTime: dateTimes )
|
|
||||||
//{
|
|
||||||
// auto curve = createEmptyCurve(m_lorenzPlot, dateTime.toString(), m_dateToColorMap[dateTime]);
|
|
||||||
// std::vector<QDateTime> timeStep;
|
|
||||||
// timeStep.push_back(dateTime);
|
|
||||||
// std::vector<double> lorCoeff;
|
|
||||||
// lorCoeff.push_back(timeHistoryValues[tsIdx]);
|
|
||||||
//
|
|
||||||
// curve->setSamplesFromDateAndValues(timeStep, lorCoeff, false);
|
|
||||||
//
|
|
||||||
// ++tsIdx;
|
|
||||||
//}
|
|
||||||
//double milliSecSinceEpoch = QwtDate::toDouble(filteredDateTimes[i]);
|
|
||||||
|
|
||||||
for ( size_t tsIdx = 0; tsIdx < dateTimes.size(); ++tsIdx )
|
for ( size_t tsIdx = 0; tsIdx < dateTimes.size(); ++tsIdx )
|
||||||
{
|
{
|
||||||
@ -151,6 +141,9 @@ void RiuFlowCharacteristicsPlot::setLorenzCurve(const std::vector<QDateTime>& da
|
|||||||
m_lorenzPlot->replot();
|
m_lorenzPlot->replot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
RiuLineSegmentQwtPlotCurve* RiuFlowCharacteristicsPlot::createEmptyCurve(QwtPlot* plot, const QString& curveName, const QColor& curveColor )
|
RiuLineSegmentQwtPlotCurve* RiuFlowCharacteristicsPlot::createEmptyCurve(QwtPlot* plot, const QString& curveName, const QColor& curveColor )
|
||||||
{
|
{
|
||||||
RiuLineSegmentQwtPlotCurve* plotCurve = new RiuLineSegmentQwtPlotCurve(curveName);
|
RiuLineSegmentQwtPlotCurve* plotCurve = new RiuLineSegmentQwtPlotCurve(curveName);
|
||||||
@ -200,6 +193,9 @@ void RiuFlowCharacteristicsPlot::removeAllCurves()
|
|||||||
m_dateToColorMap.clear();
|
m_dateToColorMap.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
void zoomAllInPlot(QwtPlot * plot)
|
void zoomAllInPlot(QwtPlot * plot)
|
||||||
{
|
{
|
||||||
plot->setAxisAutoScale(QwtPlot::xBottom, true);
|
plot->setAxisAutoScale(QwtPlot::xBottom, true);
|
||||||
@ -225,7 +221,6 @@ RimFlowCharacteristicsPlot* RiuFlowCharacteristicsPlot::ownerPlotDefinition()
|
|||||||
return m_plotDefinition;
|
return m_plotDefinition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -242,7 +237,6 @@ QSize RiuFlowCharacteristicsPlot::minimumSizeHint() const
|
|||||||
return QSize(0, 100);
|
return QSize(0, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -18,13 +18,14 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "qwt_plot.h"
|
#include "RiuInterfaceToViewWindow.h"
|
||||||
|
|
||||||
#include "cafPdmPointer.h"
|
#include "cafPdmPointer.h"
|
||||||
|
|
||||||
#include <QPointer>
|
#include "qwt_plot.h"
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
#include "RiuInterfaceToViewWindow.h"
|
#include <QPointer>
|
||||||
|
|
||||||
class RimFlowCharacteristicsPlot;
|
class RimFlowCharacteristicsPlot;
|
||||||
class RiuNightchartsWidget;
|
class RiuNightchartsWidget;
|
||||||
@ -68,9 +69,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void setDefaults();
|
void setDefaults();
|
||||||
|
void initializeColors(const std::vector<QDateTime>& dateTimes);
|
||||||
|
|
||||||
void initializeColors(const std::vector<QDateTime>& dateTimes);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmPointer<RimFlowCharacteristicsPlot> m_plotDefinition;
|
caf::PdmPointer<RimFlowCharacteristicsPlot> m_plotDefinition;
|
||||||
@ -78,7 +77,6 @@ private:
|
|||||||
QPointer<QwtPlot> m_flowCapVsStorageCapPlot;
|
QPointer<QwtPlot> m_flowCapVsStorageCapPlot;
|
||||||
QPointer<QwtPlot> m_sweepEffPlot;
|
QPointer<QwtPlot> m_sweepEffPlot;
|
||||||
|
|
||||||
|
|
||||||
std::map<QDateTime, QColor> m_dateToColorMap;
|
std::map<QDateTime, QColor> m_dateToColorMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user