mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
1c34c831a4
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>
29 lines
No EOL
766 B
C++
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 |