-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Expand file tree
/
Copy pathImageViewer.h
More file actions
40 lines (30 loc) · 737 Bytes
/
ImageViewer.h
File metadata and controls
40 lines (30 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef IMAGEVIEWER_H
#define IMAGEVIEWER_H
#include <QWidget>
namespace Ui {
class ImageViewer;
}
class ImageViewer : public QWidget
{
Q_OBJECT
public:
explicit ImageViewer(QWidget* parent = nullptr);
~ImageViewer() override;
void resetImage();
void setImage(const QImage& image);
public slots:
void openPrintImageDialog();
private slots:
void scaleToFitWindow(bool enabled);
void scaleImage(int scale);
private:
Ui::ImageViewer* ui;
QSize m_image_size;
bool m_pan_mode;
QPoint m_mouse_down;
bool eventFilter(QObject *obj, QEvent *e) override;
bool isQSizeCovered(QSize rect);
void setNoFitWithoutSignal();
void setSliderValueWithoutSignal(int value);
};
#endif