From: Yordan Karadzhov <ykaradzhov@vmware.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org,
Yordan Karadzhov <ykaradzhov@vmware.com>
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 [thread overview]
Message-ID: <20190212170402.10104-5-ykaradzhov@vmware.com> (raw)
In-Reply-To: <20190212170402.10104-1-ykaradzhov@vmware.com>
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 <ykaradzhov@vmware.com>
---
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);
--
2.17.1
next prev parent reply other threads:[~2019-02-12 17:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 17:03 [PATCH 0/5] The right click of the button deselects the marker Yordan Karadzhov
2019-02-12 17:03 ` [PATCH 1/5] kernel-shark: Customize the marker switching button Yordan Karadzhov
2019-02-12 17:03 ` [PATCH 2/5] kernel-shark: Define a method in View for selecting the Passive marker Yordan Karadzhov
2019-02-12 17:04 ` [PATCH 3/5] kernel-shark: Define KS_NO_ROW_SELECTED as a negative row index (-1) Yordan Karadzhov
2019-02-12 17:04 ` Yordan Karadzhov [this message]
2019-02-12 17:04 ` [PATCH 5/5] kernel-shark: Rename the method for deselecting the Active marker Yordan Karadzhov
2019-02-13 14:41 ` [PATCH 0/5] The right click of the button deselects the marker Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190212170402.10104-5-ykaradzhov@vmware.com \
--to=ykaradzhov@vmware.com \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).