This commit is contained in:
2026-05-15 00:06:14 +08:00
parent 83c2c26e89
commit b4c7697e8a
6 changed files with 174 additions and 45 deletions
+13 -4
View File
@@ -3,8 +3,10 @@
#include <QDialog>
#include <QImage>
class QEvent;
class QLabel;
class QScrollArea;
class QShowEvent;
class QResizeEvent;
class InpaintPreviewDialog final : public QDialog {
Q_OBJECT
@@ -13,10 +15,17 @@ public:
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;
QScrollArea* m_beforeScroll = nullptr;
QScrollArea* m_afterScroll = nullptr;
QImage m_beforeImg;
QImage m_afterImg;
bool m_inUpdateScaledPreviews = false;
};