Message ID | 20200320085029.17875-2-show.liu@linaro.org |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Show, Thanks for your work. On 2020-03-20 16:50:27 +0800, Show Liu wrote: > qcam: Added statusbar to show the camera stream information > > Signed-off-by: Show Liu <show.liu@linaro.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> > --- > src/qcam/main_window.cpp | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp > index ae1760d..98e55ba 100644 > --- a/src/qcam/main_window.cpp > +++ b/src/qcam/main_window.cpp > @@ -21,6 +21,7 @@ > #include <QTimer> > #include <QToolBar> > #include <QToolButton> > +#include <QStatusBar> > > #include <libcamera/camera_manager.h> > #include <libcamera/version.h> > @@ -238,6 +239,8 @@ int MainWindow::startCapture() > return ret; > } > > + statusBar()->showMessage(QString(cfg.toString().c_str())); > + > adjustSize(); > > allocator_ = FrameBufferAllocator::create(camera_); > @@ -342,6 +345,8 @@ void MainWindow::stopCapture() > > config_.reset(); > > + statusBar()->clearMessage(); > + > titleTimer_.stop(); > setWindowTitle(title_); > } > -- > 2.20.1 > > _______________________________________________ > libcamera-devel mailing list > libcamera-devel@lists.libcamera.org > https://lists.libcamera.org/listinfo/libcamera-devel
Hi Show, Thank you for the patch. On Fri, Mar 20, 2020 at 04:50:27PM +0800, Show Liu wrote: > qcam: Added statusbar to show the camera stream information This should be the subject line :-) s/statusbar/status bar/ > Signed-off-by: Show Liu <show.liu@linaro.org> > --- > src/qcam/main_window.cpp | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp > index ae1760d..98e55ba 100644 > --- a/src/qcam/main_window.cpp > +++ b/src/qcam/main_window.cpp > @@ -21,6 +21,7 @@ > #include <QTimer> > #include <QToolBar> > #include <QToolButton> > +#include <QStatusBar> Please keep headers sorted alphabetically. > > #include <libcamera/camera_manager.h> > #include <libcamera/version.h> > @@ -238,6 +239,8 @@ int MainWindow::startCapture() > return ret; > } > > + statusBar()->showMessage(QString(cfg.toString().c_str())); > + Shouldn't we create the status bar when creating the main window, to avoid its magical apparition when starting the stream ? I would then store it in the MainWindow class to avoid retrieving it from Qt every time. > adjustSize(); > > allocator_ = FrameBufferAllocator::create(camera_); > @@ -342,6 +345,8 @@ void MainWindow::stopCapture() > > config_.reset(); > > + statusBar()->clearMessage(); > + > titleTimer_.stop(); > setWindowTitle(title_); > }
diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index ae1760d..98e55ba 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -21,6 +21,7 @@ #include <QTimer> #include <QToolBar> #include <QToolButton> +#include <QStatusBar> #include <libcamera/camera_manager.h> #include <libcamera/version.h> @@ -238,6 +239,8 @@ int MainWindow::startCapture() return ret; } + statusBar()->showMessage(QString(cfg.toString().c_str())); + adjustSize(); allocator_ = FrameBufferAllocator::create(camera_); @@ -342,6 +345,8 @@ void MainWindow::stopCapture() config_.reset(); + statusBar()->clearMessage(); + titleTimer_.stop(); setWindowTitle(title_); }
qcam: Added statusbar to show the camera stream information Signed-off-by: Show Liu <show.liu@linaro.org> --- src/qcam/main_window.cpp | 5 +++++ 1 file changed, 5 insertions(+)