subsurface/qt-ui/divepicturewidget.h
Tomaz Canabrava 1c34c831a4 Add stub for a widget to show the dive pictures.
This has a few classes: the model is the list of pictures for the current
dive, the delegate is how this pictures will be displayed on screen, the
widget is the collection of delegates, and the DivePictureThumbnailThread
is a worker-thread to generate the thumbnails so the UI will not freeze.

[Dirk Hohndel: added the new files to subsurface.pro]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01 15:54:07 -07:00

29 lines
No EOL
766 B
C++

#ifndef DIVEPICTUREWIDGET_H
#define DIVEPICTUREWIDGET_H
#include <QAbstractTableModel>
#include <QStyledItemDelegate>
#include <QListView>
#include <QThread>
class DivePictureModel : QAbstractTableModel {
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;
};
class DivePictureDelegate : QStyledItemDelegate {
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
};
class DivePictureView : public QListView{
Q_OBJECT
public:
DivePictureView(QWidget *parent);
};
class DivePictureThumbnailThread : public QThread {
};
#endif