mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-29 21:50:26 +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>
36 lines
651 B
C++
36 lines
651 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#ifndef TAB_DIVE_PHOTOS_H
|
|
#define TAB_DIVE_PHOTOS_H
|
|
|
|
#include "TabBase.h"
|
|
|
|
namespace Ui {
|
|
class TabDivePhotos;
|
|
};
|
|
|
|
class DivePictureModel;
|
|
|
|
class TabDivePhotos : public TabBase {
|
|
Q_OBJECT
|
|
public:
|
|
TabDivePhotos(QWidget *parent = 0);
|
|
~TabDivePhotos();
|
|
void updateData() override;
|
|
void clear() override;
|
|
|
|
protected:
|
|
void contextMenuEvent(QContextMenuEvent *ev) override;
|
|
|
|
private slots:
|
|
void addPhotosFromFile();
|
|
void addPhotosFromURL();
|
|
void removeAllPhotos();
|
|
void removeSelectedPhotos();
|
|
void changeZoomLevel(int delta);
|
|
|
|
private:
|
|
Ui::TabDivePhotos *ui;
|
|
DivePictureModel *divePictureModel;
|
|
};
|
|
|
|
#endif
|