mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:13:24 +00:00
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>
This commit is contained in:
parent
11fc888cdc
commit
c4b7ed5444
2 changed files with 13 additions and 6 deletions
|
@ -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 */
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue