(self)
| 100 | self.addData() |
| 101 | |
| 102 | def addData(self): |
| 103 | # 添加数据 |
| 104 | self.m_graph.axisX().setTitle("X") |
| 105 | self.m_graph.axisY().setTitle("Y") |
| 106 | self.m_graph.axisZ().setTitle("Z") |
| 107 | |
| 108 | dataArray = [] |
| 109 | |
| 110 | limit = math.sqrt(self.m_itemCount) / 2.0 |
| 111 | i = -limit |
| 112 | while i < limit: |
| 113 | j = -limit |
| 114 | while j < limit: |
| 115 | itm = QScatterDataItem( |
| 116 | QVector3D(i + 0.5, |
| 117 | math.cos( |
| 118 | math.radians((i * j) / self.m_curveDivider)), |
| 119 | j + 0.5)) |
| 120 | dataArray.append(itm) |
| 121 | j += 1.0 |
| 122 | |
| 123 | i += 1.0 |
| 124 | |
| 125 | self.m_graph.seriesList()[0].dataProxy().resetArray(dataArray) |
| 126 | |
| 127 | def changeStyle(self, style): |
| 128 | comboBox = self.sender() |
no test coverage detected