From patchwork Tue Feb 12 17:04:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yordan Karadzhov X-Patchwork-Id: 10808323 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 721B4922 for ; Tue, 12 Feb 2019 17:04:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60CFC2C4A6 for ; Tue, 12 Feb 2019 17:04:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 558A22C49F; Tue, 12 Feb 2019 17:04:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF3882C48B for ; Tue, 12 Feb 2019 17:04:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729617AbfBLREc (ORCPT ); Tue, 12 Feb 2019 12:04:32 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:40410 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729700AbfBLREc (ORCPT ); Tue, 12 Feb 2019 12:04:32 -0500 Received: by mail-wr1-f66.google.com with SMTP id q1so3512277wrp.7 for ; Tue, 12 Feb 2019 09:04:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=0Hx1wgVdc1G6EHiAOFyWhFcEZrPnlmzgJ43u/19ITrA=; b=IJwZCBpfefcBrRNPWTTRvNxjsEATkB7rc8xwLjRezyJsepe/Sy7TR83zWGfgKudyd1 vpamEThgLvZazD8EOvV9ENHrjHHC8skHNRnUDULz+HKewcHlMVOxC2OKl2tFpAzua/T5 PqOSMApMOFsDL7xycGl/DAmHZ9jPZVvH3lV9yQQo4guhgNAtQ8NYRKr5xmc2SMgT+qXb SVrg84+h97loPknlVCQapize7Fniv1H89ZStn5BbVU593hD07Bky34KF+1FcuDNvZO9Q jiJt8aqDG3hCRSBrd28J7mTAFiqq0LKF+pEsQWXuln59HqbtKzJJh0TY8HqkKIHJS6m9 YnDA== X-Gm-Message-State: AHQUAubgiYJXr7fmZ5JmDg12UyzBLxxNv5zBYMe8YGSFq3i2jMdOjTgM wogniSVzqHK0svlvL0PpFXw= X-Google-Smtp-Source: AHgI3IagxvINaSxQQY9A2p8pV8MHkYETMVUxvD6nYFHRaRZQ2sJWj0sNmIBdLXNvSkNTlc9LCntuGQ== X-Received: by 2002:adf:e706:: with SMTP id c6mr3682597wrm.278.1549991070810; Tue, 12 Feb 2019 09:04:30 -0800 (PST) Received: from mamba.eng.vmware.com ([146.247.46.5]) by smtp.gmail.com with ESMTPSA id c139sm5579732wmd.13.2019.02.12.09.04.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Feb 2019 09:04:30 -0800 (PST) From: Yordan Karadzhov To: rostedt@goodmis.org Cc: linux-trace-devel@vger.kernel.org, Yordan Karadzhov Subject: [PATCH 4/5] kernel-shark-qt: Do marker-deselect by right mouse click of the button Date: Tue, 12 Feb 2019 19:04:01 +0200 Message-Id: <20190212170402.10104-5-ykaradzhov@vmware.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190212170402.10104-1-ykaradzhov@vmware.com> References: <20190212170402.10104-1-ykaradzhov@vmware.com> Sender: linux-trace-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-trace-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Methods for deselecting Marker A and B are added to KsMainWindow. Those methods are connected to the "deselect" signals of the two marker buttons. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202327 Signed-off-by: Yordan Karadzhov --- kernel-shark/src/KsMainWindow.cpp | 30 ++++++++++++++++++++++++++++++ kernel-shark/src/KsMainWindow.hpp | 4 ++++ 2 files changed, 34 insertions(+) diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp index 06770d9..443b7b0 100644 --- a/kernel-shark/src/KsMainWindow.cpp +++ b/kernel-shark/src/KsMainWindow.cpp @@ -119,6 +119,12 @@ KsMainWindow::KsMainWindow(QWidget *parent) connect(&_deselectShortcut, &QShortcut::activated, this, &KsMainWindow::_deselect); + connect(&_mState, &KsDualMarkerSM::deselectA, + this, &KsMainWindow::_deselectA); + + connect(&_mState, &KsDualMarkerSM::deselectB, + this, &KsMainWindow::_deselectB); + _resizeEmpty(); } @@ -1137,3 +1143,27 @@ void KsMainWindow::_deselect() _mState.updateLabels(); _graph.glPtr()->model()->update(); } + +void KsMainWindow::_deselectA() +{ + if (_mState.getState() == DualMarkerState::A) + _view.clearSelection(); + else + _view.passiveMarkerSelectRow(KS_NO_ROW_SELECTED); + + _mState.markerA().remove(); + _mState.updateLabels(); + _graph.glPtr()->model()->update(); +} + +void KsMainWindow::_deselectB() +{ + if (_mState.getState() == DualMarkerState::B) + _view.clearSelection(); + else + _view.passiveMarkerSelectRow(KS_NO_ROW_SELECTED); + + _mState.markerB().remove(); + _mState.updateLabels(); + _graph.glPtr()->model()->update(); +} diff --git a/kernel-shark/src/KsMainWindow.hpp b/kernel-shark/src/KsMainWindow.hpp index 44f7dd7..abfe196 100644 --- a/kernel-shark/src/KsMainWindow.hpp +++ b/kernel-shark/src/KsMainWindow.hpp @@ -218,6 +218,10 @@ private: void _deselect(); + void _deselectA(); + + void _deselectB(); + void _updateFilterMenu(); void _filterSyncCBoxUpdate(kshark_context *kshark_ctx);