mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
05a1626c7e
This implements different zoom levels for the dive photos tab as suggested by Stefan Fuchs <sfuchs@gmx.de> in #898. The zoom level can be changed using a slider or CTRL+mousewheel. Zoom levels range from a third of the standard thumbnail size to thrice the standard thumbnail size. Thumbnails are cached in maximum resolution and scaled down on the fly. Because the profile widget took its pictures from the photo list model, an extra picture copy with a fixed size had to be introduced. The UI is still a bit crude. Reported-by: Stefan Fuchs <sfuchs@gmx.de> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
27 lines
635 B
C++
27 lines
635 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef DIVEPICTUREWIDGET_H
|
|
#define DIVEPICTUREWIDGET_H
|
|
|
|
#include <QAbstractTableModel>
|
|
#include <QListView>
|
|
#include <QThread>
|
|
#include <QFuture>
|
|
|
|
class DivePictureWidget : public QListView {
|
|
Q_OBJECT
|
|
public:
|
|
DivePictureWidget(QWidget *parent);
|
|
protected:
|
|
void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
|
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
|
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
|
|
|
|
signals:
|
|
void photoDoubleClicked(const QString filePath);
|
|
void zoomLevelChanged(int delta);
|
|
};
|
|
|
|
class DivePictureThumbnailThread : public QThread {
|
|
};
|
|
|
|
#endif
|