Differences From Artifact [8e3511f4e5]:

  • File src/BaseImage.hxx — part of check-in [f9fe9a05c5] at 2018-10-25 11:26:30 on branch trunk — BaseImage: Do not cache source image (user: fifr size: 2841)

To Artifact [9a5b1a08be]:

  • File src/BaseImage.hxx — part of check-in [07d9a7c507] at 2018-10-25 14:35:31 on branch trunk — Add `AsyncImage`. `BaseImage` now does synchronous transformation, use `AsyncImage` for expensive transformations. (user: fifr size: 2827)

57
58
59
60
61
62
63




64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

87
88
89
90
91
92
93
94
95
96
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79


80
81
82
83
84
85
86
87

88



89
90
91
92
93
94
95







+
+
+
+












-
-








-
+
-
-
-








    qreal paintedHeight() const;

public slots:
    /// Set the source image.
    void setSource(BaseImage* source);

protected slots:
    /// Set the result image.
    void setImage(const QImage& image);

signals:
    /// The source image has been changed.
    void sourceChanged();

    /// The image is about to be changed.
    void imageChanging();

    /// The image has been changed.
    void imageChanged();

    void paintedSizeChanged();

    void startTransform(const QImage& image);

protected:
    /// Called to apply this image's transformation to `image`.
    ///
    /// This method may be called asynchronously.
    virtual QImage transform(const QImage& image) = 0;

protected slots:
    /// Called to trigger a new transformation when the source image had been changed.
    void updateImage();
    virtual void updateImage();

private slots:
    void finishTransform(const QImage& image);

private:
    struct Data;
    QScopedPointer<Data> d;

    friend class BaseImageTransformWorker;
};