some changes in propertiesDlg
This commit is contained in:
		
							parent
							
								
									395295a295
								
							
						
					
					
						commit
						a745381e8e
					
				
							
								
								
									
										10
									
								
								QtPyLoT.py
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								QtPyLoT.py
									
									
									
									
									
								
							| @ -96,7 +96,7 @@ class MainWindow(QMainWindow): | ||||
|         else: | ||||
|              self.infile = infile | ||||
|         self._inputs = AutoPickParameter(infile) | ||||
|         self._props = PropertiesDlg(self, infile=infile) | ||||
|         self._props = None | ||||
| 
 | ||||
|         self.project = Project() | ||||
|         self.tap = None | ||||
| @ -158,6 +158,8 @@ class MainWindow(QMainWindow): | ||||
|             settings.setValue("data/dataRoot", dirname) | ||||
|         settings.sync() | ||||
| 
 | ||||
|         print('ns:', settings.value('nth_sample')) | ||||
|          | ||||
|         self.filteroptions = {} | ||||
|         self.pickDlgs = {} | ||||
|         self.picks = {} | ||||
| @ -651,6 +653,9 @@ class MainWindow(QMainWindow): | ||||
|             return self.fnames | ||||
|         except DatastructureError as e: | ||||
|             print(e) | ||||
|             if not self._props: | ||||
|                 self._props = PropertiesDlg(self, infile=self.infile) | ||||
| 
 | ||||
|             if self._props.exec_() == QDialog.Accepted: | ||||
|                 return self.getWFFnames() | ||||
|             else: | ||||
| @ -2041,6 +2046,9 @@ class MainWindow(QMainWindow): | ||||
|             QMainWindow.closeEvent(self, event) | ||||
| 
 | ||||
|     def PyLoTprefs(self): | ||||
|         if not self._props: | ||||
|             self._props = PropertiesDlg(self, infile=self.infile) | ||||
|          | ||||
|         if self._props.exec_(): | ||||
|             return | ||||
| 
 | ||||
|  | ||||
| @ -1 +1 @@ | ||||
| 0f12-dirty | ||||
| 3952-dirty | ||||
|  | ||||
| @ -2157,17 +2157,22 @@ class GraphicsTab(PropTab): | ||||
|         self.main_layout = QGridLayout() | ||||
| 
 | ||||
|     def add_nth_sample(self): | ||||
|         self.nth_sample = QtGui.QSpinBox() | ||||
|         settings = QSettings() | ||||
|         nth_sample = settings.value("nth_sample") | ||||
|         if not nth_sample: | ||||
|             nth_sample = 1 | ||||
|          | ||||
|         self.spinbox_nth_sample = QtGui.QSpinBox() | ||||
|         label = QLabel('nth sample') | ||||
|         self.nth_sample.setMinimum(1) | ||||
|         self.nth_sample.setMaximum(100) | ||||
|         self.nth_sample.setValue(1) | ||||
|         self.spinbox_nth_sample.setMinimum(1) | ||||
|         self.spinbox_nth_sample.setMaximum(100) | ||||
|         self.spinbox_nth_sample.setValue(int(nth_sample)) | ||||
|         label.setToolTip('Plot every nth sample (to speed up plotting)') | ||||
|         self.main_layout.addWidget(label, 0, 0) | ||||
|         self.main_layout.addWidget(self.nth_sample, 0, 1) | ||||
|         self.main_layout.addWidget(self.spinbox_nth_sample, 0, 1) | ||||
| 
 | ||||
|     def getValues(self): | ||||
|         values = {'nth_sample': self.nth_sample.value()} | ||||
|         values = {'nth_sample': self.spinbox_nth_sample.value()} | ||||
|         return values | ||||
|          | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user