🛰️航天仿真算法库 SpaceAST
0.0.1
载入中...
搜索中...
未找到
QwtPlotVisitor.hpp
浏览该文件的文档.
1
20
21
#pragma once
22
23
#include "AstGlobal.h"
24
A_SUPPRESS_WARNINGS_BEGIN
25
#include <matplot/util/visitor.h>
26
A_SUPPRESS_WARNINGS_END
27
#include <array>
28
#include <QColor>
29
30
31
class
QwtPlot;
32
33
AST_NAMESPACE_BEGIN
34
35
class
ColoredSurfacePlot;
36
37
inline
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
45
class
QwtPlotVisitor
:
public
matplot::visitor {
46
public
:
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
59
private
:
60
QwtPlot* plot_{
nullptr
};
61
ColoredSurfacePlot
* surface_{
nullptr
};
62
};
63
64
65
66
AST_NAMESPACE_END
ast::ColoredSurfacePlot
定义
ColoredSurfacePlot.hpp:34
ast::QwtPlotVisitor
定义
QwtPlotVisitor.hpp:45
ast::units::s
Unit s
秒
定义
Unit.cpp:465
ast::units::h
Unit h
小时
定义
Unit.cpp:469
src
AstChart
QWT
QwtPlotVisitor.hpp
制作者
1.12.0