///////////////////////////////////////////////////////////////////////////////// // // 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 // for more details. // ///////////////////////////////////////////////////////////////////////////////// #pragma once #include "qwt_plot_marker.h" #include #include #include class QString; class QwtPlot; class RiuPlotAnnotationTool { public: RiuPlotAnnotationTool() {}; ~RiuPlotAnnotationTool(); void attachFormationNames(QwtPlot* plot, const std::vector& names, const std::vector> yPositions, bool showNames = true); void attachWellPicks(QwtPlot* plot, const std::vector& names, const std::vector yPositions); void attachAnnotationLine(QwtPlot* plot, const QColor& color, const QString& annotationText, const double yPosition); void detachAllAnnotations(); private: static void horizontalDashedLine(QwtPlotMarker* line, const QString& name, double yValue); static void horizontalDashedLineWithColor(QwtPlotMarker* line, const QColor& color, const QString& name, double yValue); private: QPointer m_plot; std::vector m_markers; };