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

Class GraphModifier

QtDataVisualization/BarsVisualization.py:73–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71
72
73class GraphModifier(QObject):
74 # 奥卢 温度
75 tempOulu = (
76 (-6.7, -11.7, -9.7, 3.3, 9.2, 14.0, 16.3, 17.8, 10.2, 2.1, -2.6, -0.3),
77 (-6.8, -13.3, 0.2, 1.5, 7.9, 13.4, 16.1, 15.5, 8.2, 5.4, -2.6, -0.8),
78 (-4.2, -4.0, -4.6, 1.9, 7.3, 12.5, 15.0, 12.8, 7.6, 5.1, -0.9, -1.3),
79 (-7.8, -8.8, -4.2, 0.7, 9.3, 13.2, 15.8, 15.5, 11.2, 0.6, 0.7, -8.4),
80 (-14.4, -12.1, -7.0, 2.3, 11.0, 12.6, 18.8, 13.8, 9.4, 3.9, -5.6, -13.0),
81 (-9.0, -15.2, -3.8, 2.6, 8.3, 15.9, 18.6, 14.9, 11.1, 5.3, 1.8, -0.2),
82 (-8.7, -11.3, -2.3, 0.4, 7.5, 12.2, 16.4, 14.1, 9.2, 3.1, 0.3, -12.1),
83 (-7.9, -5.3, -9.1, 0.8, 11.6, 16.6, 15.9, 15.5, 11.2, 4.0, 0.1, -1.9)
84 )
85
86 # 赫尔辛基 温度
87 tempHelsinki = (
88 (-3.7, -7.8, -5.4, 3.4, 10.7, 15.4, 18.6, 18.7, 14.3, 8.5, 2.9, 4.1),
89 (-1.2, -7.5, 3.1, 5.5, 10.3, 15.9, 17.4, 17.9, 11.2, 7.3, 1.1, 0.5),
90 (-0.6, 1.2, 0.2, 6.3, 10.2, 13.8, 18.1, 15.1, 10.1, 9.4, 2.5, 0.4),
91 (-2.9, -3.5, -0.9, 4.7, 10.9, 14.0, 17.4, 16.8, 13.2, 4.1, 2.6, -2.3),
92 (-10.2, -8.0, -1.9, 6.6, 11.3, 14.5, 21.0, 18.8, 12.6, 6.1, -0.5, -7.3),
93 (-4.4, -9.1, -2.0, 5.5, 9.9, 15.6, 20.8, 17.8, 13.4, 8.9, 3.6, 1.5),
94 (-3.5, -3.2, -0.7, 4.0, 11.1, 13.4, 17.3, 15.8, 13.1, 6.4, 4.1, -5.1),
95 (-4.8, -1.8, -5.0, 2.9, 12.8, 17.2, 18.0, 17.1, 12.5, 7.5, 4.5, 2.3)
96 )
97
98 months = (
99 "January", "February", "March", "April", "May", "June",
100 "July", "August", "September", "October", "November", "December"
101 )
102
103 years = ("2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013")
104
105 shadowQualityChanged = pyqtSignal(int) # 阴影质量改变信号
106 backgroundEnabledChanged = pyqtSignal(bool) # 背景开启信号
107 gridEnabledChanged = pyqtSignal(bool) # 网格开启信号
108 fontChanged = pyqtSignal(QFont) # 字体改变信号
109 fontSizeChanged = pyqtSignal(int) # 字体大小改变信号
110
111 def __init__(self, bargraph):
112 super(GraphModifier, self).__init__()
113
114 self.m_graph = bargraph # Q3DBars 实例
115
116 self.m_xRotation = 0.0 # 水平旋转角度
117 self.m_yRotation = 0.0 # 垂直旋转角度
118 self.m_fontSize = 30
119 self.m_segments = 4
120 self.m_subSegments = 3
121 self.m_minval = -20.0
122 self.m_maxval = 20.0
123 self.m_temperatureAxis = QValue3DAxis() # 温度轴
124 self.m_yearAxis = QCategory3DAxis() # 年份轴
125 self.m_monthAxis = QCategory3DAxis() # 月份轴
126 self.m_primarySeries = QBar3DSeries() # 主序列
127 self.m_secondarySeries = QBar3DSeries() # 次序列
128 self.m_barMesh = QAbstract3DSeries.MeshBevelBar # 预定义的网格类型
129 self.m_smooth = False # 是否平滑
130

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected