QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_theme.h
1/******************************************************************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10#ifndef QWT3D_THEME_H
11#define QWT3D_THEME_H
12
13#include "qwt3d_global.h"
14#include "qwt3d_types.h"
15
16#include <qstring.h>
17#include <qstringlist.h>
18
19class QwtColorMap;
20
21namespace Qwt3D
22{
23
24class Plot3D;
25
33class QWT3D_EXPORT Qwt3DTheme
34{
35public:
36 enum Preset
37 {
38 Default,
39 Dark,
40 Scientific,
41 Warm,
42 Cool,
43 Matplotlib,
44 EarthTones,
45 Ocean,
46 HighContrast,
47 Presentation
48 };
49
50 enum LightingPreset
51 {
52 NoLighting,
53 FlatLight,
54 Studio,
55 Outdoor,
56 Soft
57 };
58
59 Qwt3DTheme();
60 explicit Qwt3DTheme(Preset preset);
62
63 Qwt3DTheme(const Qwt3DTheme&);
64 Qwt3DTheme& operator=(const Qwt3DTheme&);
65
66 static Qwt3DTheme create(Preset preset);
67 static Qwt3DTheme create(const QString& name);
68 static QStringList availablePresets();
69
70 // Background
71 RGBA backgroundColor() const;
72 void setBackgroundColor(RGBA);
73
74 // Mesh
75 RGBA meshColor() const;
76 void setMeshColor(RGBA);
77 double meshLineWidth() const;
78 void setMeshLineWidth(double);
79 bool smoothMesh() const;
80 void setSmoothMesh(bool);
81
82 // Data Color
83 QString dataColorPreset() const;
84 void setDataColorPreset(const QString&);
85 QwtColorMap* createColorMap() const;
86
87 // Coordinate System
88 RGBA axesColor() const;
89 void setAxesColor(RGBA);
90 RGBA numberColor() const;
91 void setNumberColor(RGBA);
92 RGBA labelColor() const;
93 void setLabelColor(RGBA);
94 RGBA gridLinesColor() const;
95 void setGridLinesColor(RGBA);
96
97 // Title
98 RGBA titleColor() const;
99 void setTitleColor(RGBA);
100 QString titleFontFamily() const;
101 void setTitleFontFamily(const QString&);
102 int titleFontSize() const;
103 void setTitleFontSize(int);
104 bool titleFontBold() const;
105 void setTitleFontBold(bool);
106
107 // Lighting
108 LightingPreset lightingPreset() const;
109 void setLightingPreset(LightingPreset);
110
111 // Shading
112 SHADINGSTYLE shading() const;
113 void setShading(SHADINGSTYLE);
114
115 // Plot Style
116 PLOTSTYLE plotStyle() const;
117 void setPlotStyle(PLOTSTYLE);
118
119 // Material
120 double shininess() const;
121 void setShininess(double);
122 double specularIntensity() const;
123 void setSpecularIntensity(double);
124
125 // Apply to a plot
126 void apply(Plot3D* plot) const;
127
128private:
129 RGBA m_backgroundColor;
130 RGBA m_meshColor;
131 double m_meshLineWidth;
132 bool m_smoothMesh;
133 QString m_dataColorPreset;
134 RGBA m_axesColor;
135 RGBA m_numberColor;
136 RGBA m_labelColor;
137 RGBA m_gridLinesColor;
138 RGBA m_titleColor;
139 QString m_titleFontFamily;
140 int m_titleFontSize;
141 bool m_titleFontBold;
142 LightingPreset m_lightingPreset;
143 SHADINGSTYLE m_shading;
144 PLOTSTYLE m_plotStyle;
145 double m_shininess;
146 double m_specularIntensity;
147};
148
149} // namespace Qwt3D
150
151#endif
Base class for all plotting widgets
Definition qwt3d_plot.h:22
Complete visual theme descriptor for Plot3D widgets.
Definition qwt3d_theme.h:34
QwtColorMap is used to map values into colors.
Definition qwt_colormap.h:33
Red-Green-Blue-Alpha value
Definition qwt3d_types.h:364