Set the model on the table view, one more skeleton

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-06 16:05:06 -02:00 committed by Dirk Hohndel
parent 858fe5588a
commit f1b90813cf
2 changed files with 9 additions and 0 deletions

View file

@ -167,6 +167,11 @@ int ColumnNameResult::columnCount(const QModelIndex &parent) const
}
void ColumnNameResult::setColumnValues(QList<QStringList> columns)
{
}
DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDialog(parent),
selector(true),
ui(new Ui::DiveLogImportDialog)
@ -188,6 +193,9 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDi
ColumnNameProvider *provider = new ColumnNameProvider(this);
ui->avaliableColumns->setModel(provider);
ColumnNameResult *result = new ColumnNameResult(this);
ui->tableView->setModel(result);
/* manually import CSV file */
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
connect(close, SIGNAL(activated()), this, SLOT(close()));

View file

@ -36,6 +36,7 @@ public:
QVariant data(const QModelIndex &index, int role) const;
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
void setColumnValues(QList<QStringList> columns);
private:
QList<QStringList> columnValues;
QStringList columnNames;