diff options
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 32 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.h | 14 |
2 files changed, 46 insertions, 0 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 02fc03e69..69639e2ec 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -4,6 +4,8 @@ #include "divelogimportdialog.h" #include "mainwindow.h" #include "ui_divelogimportdialog.h" +#include <QAbstractListModel> +#include <QAbstractTableModel> const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = { // time, depth, temperature, po2, cns, ndl, tts, stopdepth, pressure @@ -16,6 +18,36 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = { NULL, } }; +ColumnNameProvider::ColumnNameProvider(QObject *parent) +{ + +} + +bool ColumnNameProvider::insertRows(int row, int count, const QModelIndex &parent) +{ + +} + +bool ColumnNameProvider::removeRows(int row, int count, const QModelIndex &parent) +{ + +} + +bool ColumnNameProvider::setData(const QModelIndex &index, const QVariant &value, int role) +{ + +} + +QVariant ColumnNameProvider::data(const QModelIndex &index, int role) const +{ + +} + +int ColumnNameProvider::rowCount(const QModelIndex &parent) const +{ + +} + DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDialog(parent), selector(true), ui(new Ui::DiveLogImportDialog) diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h index b2ee4ff99..f658e5df4 100644 --- a/qt-ui/divelogimportdialog.h +++ b/qt-ui/divelogimportdialog.h @@ -2,6 +2,7 @@ #define DIVELOGIMPORTDIALOG_H #include <QDialog> +#include <QAbstractListModel> #include "../dive.h" #include "../divelist.h" @@ -10,6 +11,19 @@ namespace Ui { class DiveLogImportDialog; } +class ColumnNameProvider : public QAbstractListModel { + Q_OBJECT +public: + ColumnNameProvider(QObject *parent); + bool insertRows(int row, int count, const QModelIndex &parent); + bool removeRows(int row, int count, const QModelIndex &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; +private: + QStringList columnNames; +}; + class DiveLogImportDialog : public QDialog { Q_OBJECT |