Show a patch.

GET /api/patches/16659/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 16659,
    "url": "https://patchwork.libcamera.org/api/patches/16659/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/16659/",
    "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": "<20220715191400.890976-5-utkarsh02t@gmail.com>",
    "date": "2022-07-15T19:13:53",
    "name": "[libcamera-devel,04/11] qcam: ControlsTab: Implement QScrollArea",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "bacd3147107eaf8cc3b4ff33cd57d46899e81bf6",
    "submitter": {
        "id": 114,
        "url": "https://patchwork.libcamera.org/api/people/114/?format=api",
        "name": "Utkarsh Tiwari",
        "email": "utkarsh02t@gmail.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/16659/mbox/",
    "series": [
        {
            "id": 3292,
            "url": "https://patchwork.libcamera.org/api/series/3292/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3292",
            "date": "2022-07-15T19:13:49",
            "name": "Introduce control interaction to qcam",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/3292/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/16659/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/16659/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 633F0BE173\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 15 Jul 2022 19:14:16 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 12ACB6331F;\n\tFri, 15 Jul 2022 21:14:16 +0200 (CEST)",
            "from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com\n\t[IPv6:2607:f8b0:4864:20::1029])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 061F36330F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Jul 2022 21:14:14 +0200 (CEST)",
            "by mail-pj1-x1029.google.com with SMTP id\n\tq5-20020a17090a304500b001efcc885cc4so6986807pjl.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 15 Jul 2022 12:14:13 -0700 (PDT)",
            "from localhost.localdomain\n\t([2406:3003:2005:1c27:d8e8:f9ac:919c:9ac8])\n\tby smtp.gmail.com with ESMTPSA id\n\ts10-20020a170903214a00b0016be834d544sm3834315ple.237.2022.07.15.12.14.11\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 15 Jul 2022 12:14:12 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1657912456;\n\tbh=3mc+syPrI82F4rhVHk8MS62FrCry/Q0jomW8Ex+wT7c=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=0lVFQJdGUgEs/w3ezmkBqtEJReR7h1oct7xIMImV7z76PYtCSVvBc2goetsAfUIMm\n\tOrKbw1ZMRsIljd3JGreq44AqM8LHGABi9JwCI1TrixqDju+mnJhLPnd/EadYDddyMf\n\t3z6Kt7buZjhI4rIdxQ0qIskGafSaLM8OwFp4c3ZD2dvtI37Ix0Qu1y6+48DyiBFMtI\n\tQGQwXrd6adKmARnroD7bKmqnccEMZiETtzAkyxyaaTjtm44S7uDQwWnatyqVXgGvQV\n\tsZiEoiMBc0xs8nUVcOxBRi0vqtmV8VxOeJ3Tx7bsBUwBxQkCGs3kSOJJ+YGQalnKGi\n\tDExNZpqWLnSEg==",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=CcoTbYUj3cSt0YMH+9NqHU45gZLE6JusliHQMFRScRI=;\n\tb=c8nnjqr/6QhoQyHyftjONYBBPk/QegLJX35iEnEI2whK+y/UBVAiijTyu8p2GpcsGQ\n\tJtnTzXmkYTidnKq1/Okov8vOKl62PFh0qWE8eV8ldmbyx+L4bEM/dkF727WTsqOZNZ6k\n\tHcB+lXkSKTUUvLFsCst7vNA2MjX0SwKBdLUK01MIhMfvpiyItgt5kIrvJE/uZjtubyZY\n\tBanvYCAVO5SXzanTeX0UeYXupySY80kodqbkaqWgGi4k9i7D9g2VumVzAsha7iMDyHeG\n\tzUgYZ/R5b7vF5GeGQh2E2Z/vpdxsmcUlrobIK1IuE76bYiQpulM5keZxWUNByy3rbrMh\n\tue8g=="
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"c8nnjqr/\"; dkim-atps=neutral",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=CcoTbYUj3cSt0YMH+9NqHU45gZLE6JusliHQMFRScRI=;\n\tb=CI63XLfXdC0lBPo+qYEWZd2lFHh2E8yfc+3w3fl22BF7gXO8osnuuQmPIqs/jsrOQw\n\twHeGY7PN6xme57kmicxc0VElE8alfkzdGBgzr+k7z7U49ssIqvpcaqUfZj4Mlev4aV7e\n\tK+5sH1lqRDZRE7TparieS5nhS1D/wtQKnvND+jdfpz9jOwfs18Cm+ToW77lkIF47kcpI\n\tSkagBc9fQM7oeHTce7TRw0UDLZ7voGGCAnT/TkT0o90BzQrdScDw28MjF7KxUsRz5bHn\n\t3/TDpMv8jajG5LiW5+XAb/14erZfX500kOT6ZVHwqQMbEwnoU9e18s0kOZVXuqahrJFs\n\tfU6g==",
        "X-Gm-Message-State": "AJIora/oSsoq0A2a7YnS/AMJsVqLtwVqy6COClAphJmyLU/xujCf3ws/\n\tI+fFjalErOPqox45FDRAudsDPsBJU493Tw==",
        "X-Google-Smtp-Source": "AGRyM1ts4KofZ4srBp/IWk50Gjzv2erxS9lTF69z2ha2MOlFul/Xgof2lCdzx1oMT1grkW9qyLy0Fw==",
        "X-Received": "by 2002:a17:902:aa06:b0:16c:cf06:c2d0 with SMTP id\n\tbe6-20020a170902aa0600b0016ccf06c2d0mr2549587plb.117.1657912452320; \n\tFri, 15 Jul 2022 12:14:12 -0700 (PDT)",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Sat, 16 Jul 2022 03:13:53 +0800",
        "Message-Id": "<20220715191400.890976-5-utkarsh02t@gmail.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220715191400.890976-1-utkarsh02t@gmail.com>",
        "References": "<20220715191400.890976-1-utkarsh02t@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 04/11] qcam: ControlsTab: Implement\n\tQScrollArea",
        "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>",
        "From": "Utkarsh Tiwari via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>",
        "Reply-To": "Utkarsh Tiwari <utkarsh02t@gmail.com>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "If the camera has lots of controls it can overrun the screen.\nFix this by using a QScrollArea.\n\nSigned-off-by: Utkarsh Tiwari <utkarsh02t@gmail.com>\n---\n src/qcam/settings/controls_tab.cpp | 9 +++++++--\n src/qcam/settings/controls_tab.h   | 3 ++-\n 2 files changed, 9 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/src/qcam/settings/controls_tab.cpp b/src/qcam/settings/controls_tab.cpp\nindex 0777d708..30899783 100644\n--- a/src/qcam/settings/controls_tab.cpp\n+++ b/src/qcam/settings/controls_tab.cpp\n@@ -13,6 +13,7 @@\n \n #include <QGridLayout>\n #include <QLabel>\n+#include <QScrollArea>\n #include <QWidget>\n \n #include \"control_frame.h\"\n@@ -21,10 +22,11 @@ using namespace libcamera;\n \n ControlsTab::ControlsTab(std::shared_ptr<libcamera::Camera> camera_,\n \t\t\t QWidget *parent)\n-\t: QWidget(parent), controlList_(std::make_shared<ControlList>())\n+\t: QScrollArea(parent), controlList_(std::make_shared<ControlList>())\n {\n+\tQWidget *containerWidget = new QWidget(this);\n \t/* Main Layout for the tab */\n-\tQGridLayout *controlGLayout = new QGridLayout(this);\n+\tQGridLayout *controlGLayout = new QGridLayout(containerWidget);\n \n \tint controlCount = 0;\n \tfor (auto &[control, info] : camera_->controls()) {\n@@ -39,6 +41,9 @@ ControlsTab::ControlsTab(std::shared_ptr<libcamera::Camera> camera_,\n \n \tif (controlCount == 0)\n \t\tcontrolGLayout->addWidget(new QLabel(\"No controls available\"));\n+\n+\t/* Set widget and policies for the scrollarea */\n+\tsetWidget(containerWidget);\n }\n \n /* -----------------------------------------------------------------------------\ndiff --git a/src/qcam/settings/controls_tab.h b/src/qcam/settings/controls_tab.h\nindex 5bac7d48..28efd35e 100644\n--- a/src/qcam/settings/controls_tab.h\n+++ b/src/qcam/settings/controls_tab.h\n@@ -11,10 +11,11 @@\n \n #include <libcamera/camera.h>\n \n+#include <QScrollArea>\n #include <QVBoxLayout>\n #include <QWidget>\n \n-class ControlsTab : public QWidget\n+class ControlsTab : public QScrollArea\n {\n \tQ_OBJECT\n \n",
    "prefixes": [
        "libcamera-devel",
        "04/11"
    ]
}