diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-01-06 14:45:49 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-06 19:34:56 -0800 |
commit | d2a4cd99656a2710db0a0ecc3207ab435f6b6ea7 (patch) | |
tree | 56f8f49cce14540328b06a3c6349656b849a16b6 | |
parent | 7bc93d424254e4d544eb828f2374c652382bda6b (diff) | |
download | subsurface-d2a4cd99656a2710db0a0ecc3207ab435f6b6ea7.tar.gz |
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>
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index cff386404..60d74a952 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -18,7 +18,7 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = { 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") << 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->knownImports->setCurrentIndex(1); + ColumnNameProvider *provider = new ColumnNameProvider(this); + ui->avaliableColumns->setModel(provider); + /* manually import CSV file */ QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this); connect(close, SIGNAL(activated()), this, SLOT(close())); |