Patch Detail
Show a patch.
GET /api/1.1/patches/2791/?format=api
{ "id": 2791, "url": "https://patchwork.libcamera.org/api/1.1/patches/2791/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2791/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200206150504.24204-6-kieran.bingham@ideasonboard.com>", "date": "2020-02-06T15:05:03", "name": "[libcamera-devel,5/6] qcam: Provide initial icon buttons \"Play/Stop\"", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "16603f8a56b2e15f16f4ac02f6073adf97fb791b", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2791/mbox/", "series": [ { "id": 663, "url": "https://patchwork.libcamera.org/api/1.1/series/663/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=663", "date": "2020-02-06T15:04:58", "name": "qcam: Provide an initial toolbar", "version": 1, "mbox": "https://patchwork.libcamera.org/series/663/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2791/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2791/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6EF2E608A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 6 Feb 2020 16:05:11 +0100 (CET)", "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0EA409F0;\n\tThu, 6 Feb 2020 16:05:11 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581001511;\n\tbh=CG++kaOhv+WrNngzAWuFzVKnqHqhdEBC+W0BUpXRz/o=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=F3HO4A6TaFv5sgbVIiugWjhUFBYyIojwNK+wGELksEULsr9hafZ7utcmzAIFob9Qr\n\t2v4MgdgDU9uDZZzgjV5PR7NtVDsT8ZEQRVJ+xwyO/wE6Mgy7lsUFHs/YfZYNbZTcW4\n\tlsW+iIyuSPJLqwY9OsGZ11R20TOsL3TbA9RMD79I=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>", "Date": "Thu, 6 Feb 2020 15:05:03 +0000", "Message-Id": "<20200206150504.24204-6-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200206150504.24204-1-kieran.bingham@ideasonboard.com>", "References": "<20200206150504.24204-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH 5/6] qcam: Provide initial icon buttons\n\t\"Play/Stop\"", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "X-List-Received-Date": "Thu, 06 Feb 2020 15:05:12 -0000" }, "content": "Provide Quit, Play, Pause, Stop icons.\n\nUtilise the provided QT resources to present icons for the toolbar.\n\nUpdate the Quit button with a 'cross', and implement Play/Pause/Stop\nbuttons.\n\n'Pause' is a no-op currently and likely could be removed, but I wanted\nan ability to distinguish between holding the stream and restarting it.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/qcam/main_window.cpp | 12 +++++++++++-\n src/qcam/main_window.h | 7 +++----\n src/qcam/meson.build | 8 +++++++-\n 3 files changed, 21 insertions(+), 6 deletions(-)", "diff": "diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex 1c7260f32d0a..0ae4c60b8699 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -11,6 +11,7 @@\n #include <sys/mman.h>\n \n #include <QCoreApplication>\n+#include <QIcon>\n #include <QInputDialog>\n #include <QTimer>\n #include <QToolBar>\n@@ -63,7 +64,7 @@ int MainWindow::createToolbars(CameraManager *cm)\n \n \ttoolbar_ = addToolBar(\"\");\n \n-\taction = toolbar_->addAction(\"Quit\");\n+\taction = toolbar_->addAction(QIcon(\":x-circle.svg\"), \"Quit\");\n \tconnect(action, &QAction::triggered, this, &MainWindow::quit);\n \n \tQAction *cameraAction = new QAction(\"&Cameras\", this);\n@@ -79,6 +80,15 @@ int MainWindow::createToolbars(CameraManager *cm)\n \t\tconnect(action, &QAction::triggered, this, [=]() { this->setCamera(cam); });\n \t}\n \n+\taction = toolbar_->addAction(QIcon(\":play-circle.svg\"), \"start\");\n+\tconnect(action, &QAction::triggered, this, &MainWindow::startCapture);\n+\n+\ttoolbar_->addAction(QIcon(\":pause-circle.svg\"), \"pause\");\n+\t/* TODO: Connect an action to perform when 'pause' requested? or remove */\n+\n+\taction = toolbar_->addAction(QIcon(\":stop-circle.svg\"), \"stop\");\n+\tconnect(action, &QAction::triggered, this, &MainWindow::stopCapture);\n+\n \treturn 0;\n }\n \ndiff --git a/src/qcam/main_window.h b/src/qcam/main_window.h\nindex f7c96fdd5c30..b0bf16dd2a09 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -46,14 +46,13 @@ private Q_SLOTS:\n \n \tint setCamera(const std::shared_ptr<Camera> &cam);\n \n+\tint startCapture();\n+\tvoid stopCapture();\n+\n private:\n \tint createToolbars(CameraManager *cm);\n \tstd::string chooseCamera(CameraManager *cm);\n \tint openCamera(CameraManager *cm);\n-\n-\tint startCapture();\n-\tvoid stopCapture();\n-\n \tvoid requestComplete(Request *request);\n \tint display(FrameBuffer *buffer);\n \ndiff --git a/src/qcam/meson.build b/src/qcam/meson.build\nindex 1e71f20fa15e..b6544dbf3f2b 100644\n--- a/src/qcam/meson.build\n+++ b/src/qcam/meson.build\n@@ -11,6 +11,10 @@ qcam_moc_headers = files([\n 'main_window.h',\n ])\n \n+qcam_resources = files([\n+ 'assets/feathericons/feathericons.qrc',\n+])\n+\n qt5 = import('qt5')\n qt5_dep = dependency('qt5',\n method : 'pkg-config',\n@@ -33,7 +37,9 @@ if qt5_dep.found()\n moc_files = qt5.preprocess(moc_headers: qcam_moc_headers,\n dependencies: qt5_dep)\n \n- qcam = executable('qcam', qcam_sources, moc_files,\n+ resources = qt5.preprocess(qresources : qcam_resources)\n+\n+ qcam = executable('qcam', qcam_sources, moc_files, resources,\n install : true,\n dependencies : [libcamera_dep, qt5_dep],\n cpp_args : qt5_cpp_args)\n", "prefixes": [ "libcamera-devel", "5/6" ] }