Dive d/l selection UI:: Add skeleton for the dialog

So the user can remove the ones they don't like.

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-08 10:12:11 -02:00 committed by Dirk Hohndel
parent 5f4770a5bd
commit db367ae0a2
2 changed files with 64 additions and 17 deletions

View file

@ -5,6 +5,7 @@
#include <QThread>
#include <QHash>
#include <QMap>
#include <QAbstractTableModel>
#include "libdivecomputer.h"
#include "configuredivecomputerdialog.h"
@ -24,6 +25,20 @@ private:
device_data_t *data;
};
class DiveImportedModel : public QAbstractTableModel
{
Q_OBJECT
public:
DiveImportedModel(QObject *o);
int columnCount(const QModelIndex& index = QModelIndex()) const;
int rowCount(const QModelIndex& index = QModelIndex()) const;
QVariant data(const QModelIndex& index, int role) const;
void setImportedDivesIndexes(int first, int last);
private:
int firstIndex;
int lastIndex;
};
class DownloadFromDCWidget : public QDialog {
Q_OBJECT
public:
@ -77,6 +92,7 @@ private:
QTimer *timer;
bool dumpWarningShown;
OstcFirmwareCheck *ostcFirmwareCheck;
DiveImportedModel *diveImportedModel;
public:
bool preferDownloaded();