From patchwork Thu Jul 4 13:03:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 1605 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E9B861569 for ; Thu, 4 Jul 2019 15:03:52 +0200 (CEST) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 18C18E21; Thu, 4 Jul 2019 15:03:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562245432; bh=kPRmPVpIuL84OkffCwEfKcOsAHxi5Nm7ZfvAeUM88XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hp9wf1WyXxNGBaFsb53lU5X/gxfP3jQpQS6OQZGjmsxRAMd828jfm5LNkWWIP0jgq SrsSkBDsKO2e9C34P9f1o0WUlse2VN+T5LcuQw/4FBtOLefzoH4t838nIeTTiycYm6 SAm7VNypfIiTVbcLdpQkGCsskaCO7G45FFoThReA= From: Kieran Bingham To: LibCamera Devel Date: Thu, 4 Jul 2019 14:03:40 +0100 Message-Id: <20190704130347.9372-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190704130347.9372-1-kieran.bingham@ideasonboard.com> References: <20190704130347.9372-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/4] qcam: Add the version string to the title X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jul 2019 13:03:52 -0000 Provide the version string reported by the libcamera library on the qcam test utility. This helps confirm the exact version of the library that is being used while testing. Signed-off-by: Kieran Bingham --- src/qcam/main_window.cpp | 8 ++++++++ src/qcam/main_window.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp index 16b123132dd9..61d7aa9469f0 100644 --- a/src/qcam/main_window.cpp +++ b/src/qcam/main_window.cpp @@ -14,6 +14,7 @@ #include #include +#include #include "main_window.h" #include "viewfinder.h" @@ -25,6 +26,7 @@ MainWindow::MainWindow(const OptionsParser::Options &options) { int ret; + setWindowTitle(); viewfinder_ = new ViewFinder(this); setCentralWidget(viewfinder_); viewfinder_->setFixedSize(500, 500); @@ -50,6 +52,12 @@ MainWindow::~MainWindow() CameraManager::instance()->stop(); } +void MainWindow::setWindowTitle() +{ + QMainWindow::setWindowTitle("QCam : " + + QString::fromStdString(libcamera::version.toString())); +} + int MainWindow::openCamera() { CameraManager *cm = CameraManager::instance(); diff --git a/src/qcam/main_window.h b/src/qcam/main_window.h index fe565cbcb460..b30a86768efc 100644 --- a/src/qcam/main_window.h +++ b/src/qcam/main_window.h @@ -33,6 +33,8 @@ public: ~MainWindow(); private: + void setWindowTitle(); + int openCamera(); int startCapture();