Files
hfut-bishe/client/gui/dialogs/InpaintPreviewDialog.h
T
2026-05-15 00:06:14 +08:00

32 lines
718 B
C++

#pragma once
#include <QDialog>
#include <QImage>
class QEvent;
class QLabel;
class QShowEvent;
class QResizeEvent;
class InpaintPreviewDialog final : public QDialog {
Q_OBJECT
public:
explicit InpaintPreviewDialog(const QString& title, QWidget* parent = nullptr);
void setImages(const QImage& before, const QImage& after);
protected:
void resizeEvent(QResizeEvent* e) override;
void showEvent(QShowEvent* e) override;
bool eventFilter(QObject* watched, QEvent* event) override;
private:
void updateScaledPreviews();
QLabel* m_beforeLabel = nullptr;
QLabel* m_afterLabel = nullptr;
QImage m_beforeImg;
QImage m_afterImg;
bool m_inUpdateScaledPreviews = false;
};