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