mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Build a gui for configure OSTC 4
Signed-off-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
		
							parent
							
								
									6e23ce1488
								
							
						
					
					
						commit
						0c276403ac
					
				
					 4 changed files with 1443 additions and 0 deletions
				
			
		|  | @ -175,6 +175,14 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia | |||
| 	ui.ostcDilTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); | ||||
| 	ui.ostcSetPointTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::SETPOINT)); | ||||
| 	ui.ostcSetPointTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); | ||||
| 	ui.ostc4GasTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::PERCENT)); | ||||
| 	ui.ostc4GasTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::PERCENT)); | ||||
| 	ui.ostc4GasTable->setItemDelegateForColumn(3, new GasTypeComboBoxItemDelegate(this, GasTypeComboBoxItemDelegate::OSTC3)); | ||||
| 	ui.ostc4GasTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); | ||||
| 	ui.ostc4DilTable->setItemDelegateForColumn(3, new GasTypeComboBoxItemDelegate(this, GasTypeComboBoxItemDelegate::OSTC3)); | ||||
| 	ui.ostc4DilTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); | ||||
| 	ui.ostc4SetPointTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::SETPOINT)); | ||||
| 	ui.ostc4SetPointTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH)); | ||||
| 
 | ||||
| 	QSettings settings; | ||||
| 	settings.beginGroup("ConfigureDiveComputerDialog"); | ||||
|  | @ -221,6 +229,27 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia | |||
| 			ui.ostcSetPointTable->setColumnWidth(i, width.toInt()); | ||||
| 	} | ||||
| 	settings.endGroup(); | ||||
| 	settings.beginGroup("ostc4GasTable"); | ||||
| 	for (int i = 0; i < ui.ostc4GasTable->columnCount(); i++) { | ||||
| 		QVariant width = settings.value(QString("colwidth%1").arg(i)); | ||||
| 		if (width.isValid()) | ||||
| 			ui.ostc4GasTable->setColumnWidth(i, width.toInt()); | ||||
| 	} | ||||
| 	settings.endGroup(); | ||||
| 	settings.beginGroup("ostc4DilTable"); | ||||
| 	for (int i = 0; i < ui.ostc4DilTable->columnCount(); i++) { | ||||
| 		QVariant width = settings.value(QString("colwidth%1").arg(i)); | ||||
| 		if (width.isValid()) | ||||
| 			ui.ostc4DilTable->setColumnWidth(i, width.toInt()); | ||||
| 	} | ||||
| 	settings.endGroup(); | ||||
| 	settings.beginGroup("ostc4SetPointTable"); | ||||
| 	for (int i = 0; i < ui.ostc4SetPointTable->columnCount(); i++) { | ||||
| 		QVariant width = settings.value(QString("colwidth%1").arg(i)); | ||||
| 		if (width.isValid()) | ||||
| 			ui.ostc4SetPointTable->setColumnWidth(i, width.toInt()); | ||||
| 	} | ||||
| 	settings.endGroup(); | ||||
| 	settings.endGroup(); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								icons/ostc4.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								icons/ostc4.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 189 KiB | 
|  | @ -67,6 +67,7 @@ | |||
|         <file alias="close">icons/subsurface/32x32/actions/window-close.png</file> | ||||
|         <file>icons/ostc2n.png</file> | ||||
|         <file>icons/ostc3.png</file> | ||||
|         <file>icons/ostc4.png</file> | ||||
|         <file>icons/suunto_vyper.png</file> | ||||
|         <file alias="facebook">icons/facebook.png</file> | ||||
|         <file alias="georeference">icons/georeference.png</file> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue