QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
qwt3d_serialize.h
1#ifndef QWT3D_SERIALIZE_H
2#define QWT3D_SERIALIZE_H
3
4#include <QDataStream>
5
6#include "qwt3d_global.h"
7#include "qwt3d_types.h"
8
9class Qwt3DTheme;
10
11// 序列化版本号
12constexpr int qwt3d_serialize_version = 1;
13
14// 序列化魔数(用于块级校验)
15constexpr quint32 qwt3d_magic_mark = 0x3D5A4BF1; // '3D' + magic
16constexpr quint32 qwt3d_magic_mark2 = 0xAA3D1234;
17constexpr quint32 qwt3d_magic_mark3 = 0x3D5678AB;
18
19// QDataStream 版本(与 2D DAChartSerialize 保持一致)
20constexpr QDataStream::Version qwt3d_datastream_version = QDataStream::Qt_5_12;
21
22// ============================================================
23// 值类型序列化(本计划唯一声明和实现)
24// 08 计划的 DAChart3DSerialize.h 通过 #include "qwt3d_serialize.h"
25// 直接使用这些 operator,不再重复声明或实现。
26// ============================================================
27
28// Triple 序列化
29QWT3D_EXPORT QDataStream& operator<<(QDataStream& out, const Triple& t);
30QWT3D_EXPORT QDataStream& operator>>(QDataStream& in, Triple& t);
31
32// RGBA 序列化
33QWT3D_EXPORT QDataStream& operator<<(QDataStream& out, const RGBA& c);
34QWT3D_EXPORT QDataStream& operator>>(QDataStream& in, RGBA& c);
35
36// ParallelEpiped 序列化
37QWT3D_EXPORT QDataStream& operator<<(QDataStream& out, const ParallelEpiped& p);
38QWT3D_EXPORT QDataStream& operator>>(QDataStream& in, ParallelEpiped& p);
39
40// Qwt3DFunctionData 序列化
41QWT3D_EXPORT QDataStream& operator<<(QDataStream& out, const Qwt3DFunctionData& d);
42QWT3D_EXPORT QDataStream& operator>>(QDataStream& in, Qwt3DFunctionData& d);
43
44// Qwt3DParametricData 序列化
45QWT3D_EXPORT QDataStream& operator<<(QDataStream& out, const Qwt3DParametricData& d);
46QWT3D_EXPORT QDataStream& operator>>(QDataStream& in, Qwt3DParametricData& d);
47
48// ============================================================
49// Qwt3DTheme 序列化(本计划唯一声明和实现)
50// ============================================================
51
52QWT3D_EXPORT QDataStream& operator<<(QDataStream& out, const Qwt3DTheme& theme);
53QWT3D_EXPORT QDataStream& operator>>(QDataStream& in, Qwt3DTheme& theme);
54
55// ============================================================
56// Item/Plot 级 operator(Qwt3DPlotItem*, Qwt3DSurface*, Qwt3DBar*,
57// Qwt3DLine*, Qwt3DPlot*)和 Qwt3DPlot::saveState/restoreState
58// 不在本计划声明。由 08 计划在 DAFigure 模块(DAFIGURE_API)
59// 负责声明和实现。
60// ============================================================
61
62#endif // QWT3D_SERIALIZE_H
Complete visual theme descriptor for Qwt3DPlot widgets.
Definition qwt3d_theme.h:34
Parallelepiped spanned by 2 Triples.
Definition qwt3d_types.h:334
Result of evaluating a Qwt3DFunction over its grid.
Definition qwt3d_types.h:543
Result of evaluating a Qwt3DParametricSurface over its grid.
Definition qwt3d_types.h:560
Red-Green-Blue-Alpha value.
Definition qwt3d_types.h:395
Triple [x,y,z].
Definition qwt3d_types.h:201