diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-30 14:38:27 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-01 15:54:07 -0700 |
commit | 1c34c831a4bd51a94d953828ea08ab0db3373049 (patch) | |
tree | f39b37da3ef72cf396b7f98045eb098570c381f1 /qt-ui/divepicturewidget.h | |
parent | 1556b723a26982204f3d648c5e1b98d6eda40a8c (diff) | |
download | subsurface-1c34c831a4bd51a94d953828ea08ab0db3373049.tar.gz |
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>
Diffstat (limited to 'qt-ui/divepicturewidget.h')
-rw-r--r-- | qt-ui/divepicturewidget.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/qt-ui/divepicturewidget.h b/qt-ui/divepicturewidget.h new file mode 100644 index 000000000..260d3caa7 --- /dev/null +++ b/qt-ui/divepicturewidget.h @@ -0,0 +1,29 @@ +#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
\ No newline at end of file |