Patch Detail
Show a patch.
GET /api/patches/2831/?format=api
{ "id": 2831, "url": "https://patchwork.libcamera.org/api/patches/2831/?format=api", "web_url": "https://patchwork.libcamera.org/patch/2831/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20200214001810.19302-7-kieran.bingham@ideasonboard.com>", "date": "2020-02-14T00:18:09", "name": "[libcamera-devel,v2,6/7] qcam: Provide initial icon buttons \"Play/Stop\"", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "a900fe285062ec7aa1ad2d5598e00404de1928ea", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/2831/mbox/", "series": [ { "id": 673, "url": "https://patchwork.libcamera.org/api/series/673/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=673", "date": "2020-02-14T00:18:03", "name": "qcam: Provide an initial toolbar", "version": 2, "mbox": "https://patchwork.libcamera.org/series/673/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/2831/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/2831/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@ideasonboard.com>", "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id BE10A61A2B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 14 Feb 2020 01:18:15 +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 51CE99D3;\n\tFri, 14 Feb 2020 01:18:15 +0100 (CET)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1581639495;\n\tbh=k6FWYGdYMSBVyrZG+Il02eJbl1ph4eBQhghcDofRDAo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=TwLJIS/Eyjvd1iOFCRW1suVIbnROVPMm6aj4apncF5cBaEYDWLIhbn+fEm8LcSTOK\n\tOlEkjKU3y7U4kOnzMQlBB62BSE9CH0EwQ9jXnjeZs519s244xaHx4FhYZavLTdP1Oz\n\tk+INOD2QXS6vvPQKW+VF4DUDEkJrPi5j9+hcYPoA=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Fri, 14 Feb 2020 00:18:09 +0000", "Message-Id": "<20200214001810.19302-7-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.20.1", "In-Reply-To": "<20200214001810.19302-1-kieran.bingham@ideasonboard.com>", "References": "<20200214001810.19302-1-kieran.bingham@ideasonboard.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 6/7] 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": "Fri, 14 Feb 2020 00:18:16 -0000" }, "content": "Provide Quit, Play, Stop icons.\n\nCreate a Qt resource to compile icons into the binary and present them\non the toolbar.\n\nUpdate the Quit button with a 'cross', and implement Play/Stop buttons.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nv2\n - Remove pause button\n\n src/qcam/assets/feathericons/feathericons.qrc | 7 +++++++\n src/qcam/main_window.cpp | 9 ++++++++-\n src/qcam/main_window.h | 6 +++---\n src/qcam/meson.build | 9 +++++++--\n 4 files changed, 25 insertions(+), 6 deletions(-)\n create mode 100644 src/qcam/assets/feathericons/feathericons.qrc", "diff": "diff --git a/src/qcam/assets/feathericons/feathericons.qrc b/src/qcam/assets/feathericons/feathericons.qrc\nnew file mode 100644\nindex 000000000000..b8e5c2266408\n--- /dev/null\n+++ b/src/qcam/assets/feathericons/feathericons.qrc\n@@ -0,0 +1,7 @@\n+<!DOCTYPE RCC><RCC version=\"1.0\">\n+<qresource>\n+<file>./play-circle.svg</file>\n+<file>./stop-circle.svg</file>\n+<file>./x-circle.svg</file>\n+</qresource>\n+</RCC>\ndiff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp\nindex 0e9e717b7e1a..ec93e0177b41 100644\n--- a/src/qcam/main_window.cpp\n+++ b/src/qcam/main_window.cpp\n@@ -12,6 +12,7 @@\n \n #include <QComboBox>\n #include <QCoreApplication>\n+#include <QIcon>\n #include <QInputDialog>\n #include <QTimer>\n #include <QToolBar>\n@@ -66,7 +67,7 @@ int MainWindow::createToolbars()\n \t/* Disable right click context menu */\n \ttoolbar_->setContextMenuPolicy(Qt::PreventContextMenu);\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 \t/* Camera selection */\n@@ -81,6 +82,12 @@ int MainWindow::createToolbars()\n \n \ttoolbar_->addSeparator();\n \n+\taction = toolbar_->addAction(QIcon(\":play-circle.svg\"), \"start\");\n+\tconnect(action, &QAction::triggered, this, &MainWindow::startCapture);\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 12af103f87d0..27ceed611d59 100644\n--- a/src/qcam/main_window.h\n+++ b/src/qcam/main_window.h\n@@ -46,14 +46,14 @@ private Q_SLOTS:\n \n \tvoid switchCamera(int index);\n \n+\tint startCapture();\n+\tvoid stopCapture();\n+\n private:\n \tint createToolbars();\n \tstd::string chooseCamera();\n \tint openCamera();\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..5b877a84da85 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@@ -30,10 +34,11 @@ if qt5_dep.found()\n endif\n endif\n \n- moc_files = qt5.preprocess(moc_headers: qcam_moc_headers,\n+ resources = qt5.preprocess(moc_headers: qcam_moc_headers,\n+ qresources : qcam_resources,\n dependencies: qt5_dep)\n \n- qcam = executable('qcam', qcam_sources, moc_files,\n+ qcam = executable('qcam', qcam_sources, resources,\n install : true,\n dependencies : [libcamera_dep, qt5_dep],\n cpp_args : qt5_cpp_args)\n", "prefixes": [ "libcamera-devel", "v2", "6/7" ] }