111 self.__axisY.setLabelFormat("%d") |
112 self.__axisY.setLabelFormat("%d") |
112 self.__chart.setAxisX(self.__axisX, self.__series[0]) |
113 self.__chart.setAxisX(self.__axisX, self.__series[0]) |
113 self.__chart.setAxisY(self.__axisY, self.__series[0]) |
114 self.__chart.setAxisY(self.__axisY, self.__series[0]) |
114 self.__chartView.setChart(self.__chart) |
115 self.__chartView.setChart(self.__chart) |
115 self.__chartView.setRenderHint(QPainter.Antialiasing) |
116 self.__chartView.setRenderHint(QPainter.Antialiasing) |
|
117 self.preferencesChanged() |
116 |
118 |
117 self.__maxXSpinBox.valueChanged.connect(self.__handleMaxXChanged) |
119 self.__maxXSpinBox.valueChanged.connect(self.__handleMaxXChanged) |
|
120 |
|
121 @pyqtSlot() |
|
122 def preferencesChanged(self): |
|
123 """ |
|
124 Public slot to apply changed preferences. |
|
125 """ |
|
126 chartColorTheme = Preferences.getMicroPython("ChartColorTheme") |
|
127 if chartColorTheme == -1: |
|
128 # automatic selection of light or dark depending on desktop |
|
129 # color scheme |
|
130 if e5App().usesDarkPalette(): |
|
131 self.__chart.setTheme(QChart.ChartThemeDark) |
|
132 else: |
|
133 self.__chart.setTheme(QChart.ChartThemeLight) |
|
134 else: |
|
135 self.__chart.setTheme(chartColorTheme) |
118 |
136 |
119 @pyqtSlot(bytes) |
137 @pyqtSlot(bytes) |
120 def processData(self, data): |
138 def processData(self, data): |
121 """ |
139 """ |
122 Public slot to process the raw data. |
140 Public slot to process the raw data. |