🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
QwtPlotVisitor.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24A_SUPPRESS_WARNINGS_BEGIN
25#include <matplot/util/visitor.h>
26A_SUPPRESS_WARNINGS_END
27#include <array>
28#include <QColor>
29
30
31class QwtPlot;
32
33AST_NAMESPACE_BEGIN
34
35class ColoredSurfacePlot;
36
37inline QColor toQColor(const std::array<float, 4>& c) {
38 return QColor::fromRgbF(
39 static_cast<double>(c[1]),
40 static_cast<double>(c[2]),
41 static_cast<double>(c[3]),
42 static_cast<double>(1.0 - c[0]));
43}
44
45class QwtPlotVisitor : public matplot::visitor {
46public:
47 explicit QwtPlotVisitor(QwtPlot* plot);
48 explicit QwtPlotVisitor(ColoredSurfacePlot* surface);
49 ~QwtPlotVisitor() override;
50 QwtPlotVisitor(const QwtPlotVisitor&) = delete;
51 QwtPlotVisitor& operator=(const QwtPlotVisitor&) = delete;
52
53 void visit(class matplot::line& l) override;
54 void visit(class matplot::histogram& h) override;
55 void visit(class matplot::function_line& fl) override;
56 void visit(class matplot::stair& s) override;
57 void visit(class matplot::surface& s) override;
58
59private:
60 QwtPlot* plot_{nullptr};
61 ColoredSurfacePlot* surface_{nullptr};
62};
63
64
65
66AST_NAMESPACE_END
定义 ColoredSurfacePlot.hpp:34
定义 QwtPlotVisitor.hpp:45
Unit s
定义 Unit.cpp:465
Unit h
小时
定义 Unit.cpp:469