add log to edit signal
This commit is contained in:
@ -53,6 +53,8 @@ class QPreviewDialog(QtWidgets.QDialog, Ui_ApodEdit):
|
||||
pl.hideButtons()
|
||||
pl.setMenuEnabled(False)
|
||||
|
||||
self.time_graph.setLogMode(x=True)
|
||||
|
||||
self._all_time = None
|
||||
self._all_freq = None
|
||||
|
||||
@ -392,6 +394,28 @@ class QPreviewDialog(QtWidgets.QDialog, Ui_ApodEdit):
|
||||
self.zerofill_box.setVisible(self._all_time)
|
||||
self.apod_box.setVisible(self._all_time)
|
||||
self.shift_box.setVisible(self._all_time)
|
||||
self.time_graph.setVisible(self._all_time)
|
||||
self.logtime_widget.setVisible(self._all_time)
|
||||
|
||||
@QtCore.pyqtSlot(int, name='on_logx_time_stateChanged')
|
||||
@QtCore.pyqtSlot(int, name='on_logy_time_stateChanged')
|
||||
@QtCore.pyqtSlot(int, name='on_logx_freq_stateChanged')
|
||||
@QtCore.pyqtSlot(int, name='on_logy_freq_stateChanged')
|
||||
def set_log(self, state: int):
|
||||
switch = {
|
||||
self.logx_time: lambda _x: self.time_graph.setLogMode(x=_x),
|
||||
self.logy_time: lambda _x: self.time_graph.setLogMode(y=_x),
|
||||
self.logx_freq: lambda _x: self.freq_graph.setLogMode(x=_x),
|
||||
self.logy_freq: lambda _x: self.freq_graph.setLogMode(y=_x),
|
||||
}[self.sender()]
|
||||
switch(state == QtCore.Qt.Checked)
|
||||
|
||||
vb = self.freq_graph.getPlotItem().getViewBox()
|
||||
vb.disableAutoRange(axis=vb.YAxis)
|
||||
|
||||
vb = self.time_graph.getPlotItem().getViewBox()
|
||||
vb.disableAutoRange(axis=vb.YAxis)
|
||||
|
||||
|
||||
self._temp_baseline = self._temp_baseline_time if self._all_time else self._temp_baseline_freq
|
||||
self._temp_fft = self._temp_fft_time if self._all_time else self._temp_fft_freq
|
||||
|
Reference in New Issue
Block a user