From acd02afab0298bc91099fa280f13775e8e5e315b Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sun, 22 Mar 2020 12:53:13 +0200 Subject: qcam: Use QSize through the code base Qt has a QSize class to store sizes. Use it to replace width and height where applicable. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/qcam/viewfinder.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/qcam/viewfinder.h') diff --git a/src/qcam/viewfinder.h b/src/qcam/viewfinder.h index 0549f038..a019c3a4 100644 --- a/src/qcam/viewfinder.h +++ b/src/qcam/viewfinder.h @@ -8,6 +8,7 @@ #define __QCAM_VIEWFINDER_H__ #include +#include #include #include @@ -22,8 +23,7 @@ public: ViewFinder(QWidget *parent); ~ViewFinder(); - int setFormat(const libcamera::PixelFormat &format, unsigned int width, - unsigned int height); + int setFormat(const libcamera::PixelFormat &format, const QSize &size); void display(const unsigned char *rgb, size_t size); QImage getCurrentImage(); @@ -33,12 +33,11 @@ protected: QSize sizeHint() const override; private: - libcamera::PixelFormat format_; - unsigned int width_; - unsigned int height_; - FormatConverter converter_; + libcamera::PixelFormat format_; + QSize size_; + QImage *image_; QMutex mutex_; /* Prevent concurrent access to image_ */ }; -- cgit v1.2.1