diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-01-07 15:47:40 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-07 12:33:30 -0800 |
commit | c4b7ed5444b4add0a8a525f7e0a89026f2092bb2 (patch) | |
tree | 943eaa91ca3f3fbd18eb0e94af1a5c29f285c9c7 /qt-ui | |
parent | 11fc888cdc07708394f047097a1dd6510eb4bb09 (diff) | |
download | subsurface-c4b7ed5444b4add0a8a525f7e0a89026f2092bb2.tar.gz |
CSV Import UI: Prettifications, hide headers, code cleanup.
Just a few cleanups.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 7 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.ui | 12 |
2 files changed, 13 insertions, 6 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index d8b1b6e8c..a869a7298 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -204,7 +204,6 @@ ColumnNameResult::ColumnNameResult(QObject *parent) : QAbstractTableModel(parent } void ColumnNameResult::swapValues(int firstIndex, int secondIndex) { - qDebug() << firstIndex << secondIndex; QString one = columnNames[firstIndex]; QString two = columnNames[secondIndex]; setData(index(0, firstIndex), QVariant(two), Qt::EditRole); @@ -304,11 +303,8 @@ void ColumnDropCSVView::mousePressEvent(QMouseEvent *press) QObject *target = drag->target(); if (target->objectName() == "qt_scrollarea_viewport") target = target->parent(); - - - if (target != drag->source()) { + if (target != drag->source()) model()->setData(atClick, QString()); - } } } @@ -335,7 +331,6 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList fn, QWidget *parent) : QDia ui->avaliableColumns->setItemDelegate(new TagDragDelegate(ui->avaliableColumns)); resultModel = new ColumnNameResult(this); ui->tableView->setModel(resultModel); - loadFileContents(); /* manually import CSV file */ diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui index 89f96934f..7aace4847 100644 --- a/qt-ui/divelogimportdialog.ui +++ b/qt-ui/divelogimportdialog.ui @@ -125,6 +125,18 @@ <height>200</height> </size> </property> + <attribute name="horizontalHeaderVisible"> + <bool>false</bool> + </attribute> + <attribute name="horizontalHeaderHighlightSections"> + <bool>false</bool> + </attribute> + <attribute name="verticalHeaderVisible"> + <bool>false</bool> + </attribute> + <attribute name="verticalHeaderHighlightSections"> + <bool>false</bool> + </attribute> </widget> </item> <item> |