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
21
22
23class Qwt3DPlot;
24class Qwt3DPlotItem;
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 // Qwt3DData 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 RGBA interiorGridLinesColor() const;
97 void setInteriorGridLinesColor(RGBA);
98 double interiorGridMajorWidth() const;
99 void setInteriorGridMajorWidth(double);
100 double interiorGridMinorWidth() const;
101 void setInteriorGridMinorWidth(double);
102
103 // Title
104 RGBA titleColor() const;
105 void setTitleColor(RGBA);
106 QString titleFontFamily() const;
107 void setTitleFontFamily(const QString&);
108 int titleFontSize() const;
109 void setTitleFontSize(int);
110 bool titleFontBold() const;
111 void setTitleFontBold(bool);
112
113 // Lighting
114 LightingPreset lightingPreset() const;
115 void setLightingPreset(LightingPreset);
116
117 // Shading
118 SHADINGSTYLE shading() const;
119 void setShading(SHADINGSTYLE);
120
121 // Plot Style
122 PLOTSTYLE plotStyle() const;
123 void setPlotStyle(PLOTSTYLE);
124
125 // Material
126 double shininess() const;
127 void setShininess(double);
128 double specularIntensity() const;
129 void setSpecularIntensity(double);
130
131 // Apply to a plot
132 void apply(Qwt3DPlot* plot) const;
133
134private:
135 // Apply item-level properties to a single item
136 void applyToItem(Qwt3DPlotItem* item) const;
137 RGBA m_backgroundColor;
138 RGBA m_meshColor;
139 double m_meshLineWidth;
140 bool m_smoothMesh;
141 QString m_dataColorPreset;
142 RGBA m_axesColor;
143 RGBA m_numberColor;
144 RGBA m_labelColor;
145 RGBA m_gridLinesColor;
146 RGBA m_interiorGridLinesColor;
147 double m_interiorGridMajorWidth;
148 double m_interiorGridMinorWidth;
149 RGBA m_titleColor;
150 QString m_titleFontFamily;
151 int m_titleFontSize;
152 bool m_titleFontBold;
153 LightingPreset m_lightingPreset;
154 SHADINGSTYLE m_shading;
155 PLOTSTYLE m_plotStyle;
156 double m_shininess;
157 double m_specularIntensity;
158};
159
160
161#endif
Base class for all 3D plot items
Definition qwt3d_plotitem.h:55
Pure rendering window for 3D plots
Definition qwt3d_plot.h:36
Complete visual theme descriptor for Qwt3DPlot 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:395