Add skeleton code for the model that will have the result of columns

This model will show some columns and the user will
need to provide the correct information for each of them

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:01:21 -02:00 committed by Dirk Hohndel
parent aa33ae9526
commit 858fe5588a
2 changed files with 39 additions and 0 deletions

View file

@ -142,6 +142,31 @@ void ColumnDropCSVView::dropEvent(QDropEvent *event)
}
ColumnNameResult::ColumnNameResult(QObject *parent)
{
}
bool ColumnNameResult::setData(const QModelIndex &index, const QVariant &value, int role)
{
}
QVariant ColumnNameResult::data(const QModelIndex &index, int role) const
{
}
int ColumnNameResult::rowCount(const QModelIndex &parent) const
{
}
int ColumnNameResult::columnCount(const QModelIndex &parent) const
{
}
DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDialog(parent),
selector(true),
ui(new Ui::DiveLogImportDialog)

View file

@ -6,6 +6,7 @@
#include <QListView>
#include <QDragLeaveEvent>
#include <QTableView>
#include <QAbstractTableModel>
#include "../dive.h"
#include "../divelist.h"
@ -27,6 +28,19 @@ private:
QStringList columnNames;
};
class ColumnNameResult : public QAbstractTableModel {
Q_OBJECT
public:
ColumnNameResult(QObject *parent);
bool setData(const QModelIndex &index, const QVariant &value, int role);
QVariant data(const QModelIndex &index, int role) const;
int rowCount(const QModelIndex &parent) const;
int columnCount(const QModelIndex &parent) const;
private:
QList<QStringList> columnValues;
QStringList columnNames;
};
class ColumnNameView : public QListView {
Q_OBJECT
public: