From patchwork Tue Jul 2 11:48: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: 1583 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D06FB61950 for ; Tue, 2 Jul 2019 13:48:49 +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 5E6DC2C6; Tue, 2 Jul 2019 13:48:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1562068129; bh=kPRmPVpIuL84OkffCwEfKcOsAHxi5Nm7ZfvAeUM88XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gsm0kjO7j43PyggZWODWLqNXotY2XU7JHZq4Ulz5O8IDRa8ZCCPU5oF0CLtki8es5 DeKlAdrr1H1jcfQ9wzkZsJgOiLGGBZCtrAj3DnTT8ZmVg8k+QhP1vPtzLpBtwJu2BC gcWByXOP8QCwken/7zEN8PHa+yFRepq5brMotwQs= From: Kieran Bingham To: LibCamera Devel Date: Tue, 2 Jul 2019 12:48:40 +0100 Message-Id: <20190702114841.19101-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190702114841.19101-1-kieran.bingham@ideasonboard.com> References: <20190702114841.19101-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: Tue, 02 Jul 2019 11:48:50 -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();