mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Call that method from the mainWindow when the dive changes. The updateDivePictures walks around the events of the first dc (since all pictures are distributed allong all dive computers) to get the events of type '123' (I wonder if there's not a better way to save pictures on the dive, like an linked list of char* named pictures.) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
35 lines
No EOL
893 B
C++
35 lines
No EOL
893 B
C++
#ifndef DIVEPICTUREWIDGET_H
|
|
#define DIVEPICTUREWIDGET_H
|
|
|
|
#include <QAbstractTableModel>
|
|
#include <QStyledItemDelegate>
|
|
#include <QListView>
|
|
#include <QThread>
|
|
|
|
class DivePictureModel : QAbstractTableModel {
|
|
Q_OBJECT
|
|
public:
|
|
DivePictureModel(QObject *parent);
|
|
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
|
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
|
|
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
|
void updateDivePictures(int divenr);
|
|
private:
|
|
int numberOfPictures;
|
|
};
|
|
|
|
class DivePictureDelegate : QStyledItemDelegate {
|
|
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
|
|
};
|
|
|
|
class DivePictureWidget : public QListView{
|
|
Q_OBJECT
|
|
public:
|
|
DivePictureWidget(QWidget *parent);
|
|
};
|
|
|
|
class DivePictureThumbnailThread : public QThread {
|
|
|
|
};
|
|
|
|
#endif |