mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Display the list of column names on the ListView
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									7bc93d4242
								
							
						
					
					
						commit
						d2a4cd9965
					
				
					 1 changed files with 4 additions and 1 deletions
				
			
		| 
						 | 
					@ -18,7 +18,7 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] =
 | 
				
			||||||
	{ NULL, }
 | 
						{ NULL, }
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ColumnNameProvider::ColumnNameProvider(QObject *parent)
 | 
					ColumnNameProvider::ColumnNameProvider(QObject *parent) : QAbstractListModel(parent)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	columnNames << tr("Dive #") << tr("Date") << tr("Time") << tr("Duration") << tr("Location") << tr("GPS") << tr("Weight") << tr("Cyl size") << tr("Start Pressure")
 | 
						columnNames << tr("Dive #") << tr("Date") << tr("Time") << tr("Duration") << tr("Location") << tr("GPS") << tr("Weight") << tr("Cyl size") << tr("Start Pressure")
 | 
				
			||||||
		    << tr("End Press") << tr("Max depth") << tr("Mean depth") << tr("Buddy") << tr("Notes") << tr("Tags") << tr("Air temp") << tr("Water temp")
 | 
							    << tr("End Press") << tr("Max depth") << tr("Mean depth") << tr("Buddy") << tr("Notes") << tr("Tags") << tr("Air temp") << tr("Water temp")
 | 
				
			||||||
| 
						 | 
					@ -75,6 +75,9 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDi
 | 
				
			||||||
	ui->CSVSeparator->addItems( QStringList() << tr("Separator") << tr("Tab") << ";" << ",");
 | 
						ui->CSVSeparator->addItems( QStringList() << tr("Separator") << tr("Tab") << ";" << ",");
 | 
				
			||||||
	ui->knownImports->setCurrentIndex(1);
 | 
						ui->knownImports->setCurrentIndex(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ColumnNameProvider *provider = new ColumnNameProvider(this);
 | 
				
			||||||
 | 
						ui->avaliableColumns->setModel(provider);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* manually import CSV file */
 | 
						/* manually import CSV file */
 | 
				
			||||||
	QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
 | 
						QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
 | 
				
			||||||
	connect(close, SIGNAL(activated()), this, SLOT(close()));
 | 
						connect(close, SIGNAL(activated()), this, SLOT(close()));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue