🛰️航天仿真算法库 SpaceAST 0.3.1
载入中...
搜索中...
未找到
QwtBackend.hpp
浏览该文件的文档.
1
20
21#pragma once
22
23#include "AstGlobal.h"
24
25#if defined(AST_WITH_MATPLOT) && defined(AST_WITH_QWT)
26
27A_SUPPRESS_WARNINGS_BEGIN
28#include <matplot/backend/backend_interface.h>
29A_SUPPRESS_WARNINGS_END
30#include <memory>
31#include <string>
32
33class QwtFigure;
34
35AST_NAMESPACE_BEGIN
36
37class UiFigure;
38
39class AST_CHART_API QwtBackend : public matplot::backend::backend_interface {
40public:
41 QwtBackend();
42 virtual ~QwtBackend() override;
43
44 bool consumes_gnuplot_commands() override;
45 bool is_interactive() override;
46
47 const std::string& output() override;
48 const std::string& output_format() override;
49 bool output(const std::string& filename) override;
50 bool output(const std::string& filename,
51 const std::string& file_format) override;
52
53 unsigned int width() override;
54 unsigned int height() override;
55 void width(unsigned int new_width) override;
56 void height(unsigned int new_height) override;
57
58 unsigned int position_x() override;
59 unsigned int position_y() override;
60 void position_x(unsigned int new_position_x) override;
61 void position_y(unsigned int new_position_y) override;
62
63 void window_title(const std::string& title) override;
64 std::string window_title() override;
65
66 bool new_frame() override;
67 bool render_data() override;
68 void show(matplot::figure_type* f) override;
69 bool should_close() override;
70 bool supports_fonts() override;
71
72 void draw(matplot::figure_type* f) override;
73private:
74 struct Impl;
75 std::unique_ptr<Impl> impl_;
76};
77
78AST_NAMESPACE_END
79#endif
80
81
82AST_NAMESPACE_BEGIN
83
84AST_CHART_API void aUseQwtBackend();
85
86AST_NAMESPACE_END