MCPcopy Index your code
hub / github.com/PyQt5/PyQt / __init__

Method __init__

QtDataVisualization/ScatterVisualization.py:72–100  ·  view source on GitHub ↗
(self, scatter)

Source from the content-addressed store, hash-verified

70 fontChanged = pyqtSignal(QFont)
71
72 def __init__(self, scatter):
73 super(ScatterDataModifier, self).__init__()
74
75 self.m_graph = scatter # Q3DScatter实例
76 self.m_fontSize = 40.0
77 self.m_style = QAbstract3DSeries.MeshSphere
78 self.m_smooth = True
79 self.m_itemCount = self.lowerNumberOfItems
80 self.m_curveDivider = self.lowerCurveDivider
81
82 # 设置当前主题类型
83 self.m_graph.activeTheme().setType(Q3DTheme.ThemeEbony)
84 # 设置当前主题的字体
85 font = self.m_graph.activeTheme().font()
86 font.setPointSize(self.m_fontSize)
87 self.m_graph.activeTheme().setFont(font)
88 # 设置阴影质量
89 self.m_graph.setShadowQuality(QAbstract3DGraph.ShadowQualitySoftLow)
90 self.m_graph.scene().activeCamera().setCameraPreset(
91 Q3DCamera.CameraPresetFront)
92
93 proxy = QScatterDataProxy()
94 series = QScatter3DSeries(proxy)
95 series.setItemLabelFormat(
96 "@xTitle: @xLabel @yTitle: @yLabel @zTitle: @zLabel")
97 series.setMeshSmooth(self.m_smooth)
98 self.m_graph.addSeries(series)
99
100 self.addData()
101
102 def addData(self):
103 # 添加数据

Callers

nothing calls this directly

Calls 1

addDataMethod · 0.95

Tested by

no test coverage detected