mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-01 14:20:08 +01:00
27 lines
442 B
C++
27 lines
442 B
C++
#pragma once
|
|
|
|
#include <QImage>
|
|
#include <QLabel>
|
|
|
|
class screenshot_preview : public QLabel
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
screenshot_preview(const QString& filepath, QWidget* parent = nullptr);
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent* event) override;
|
|
|
|
private Q_SLOTS:
|
|
void show_context_menu(const QPoint& pos);
|
|
|
|
private:
|
|
void scale(const QSize& size);
|
|
|
|
QString m_filepath;
|
|
QImage m_image;
|
|
double m_factor = 1.0;
|
|
bool m_stretch = false;
|
|
};
|