From: Yordan Karadzhov <ykaradzhov@vmware.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH 4/5] kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu
Date: Thu, 10 Jan 2019 15:44:18 +0200 [thread overview]
Message-ID: <20190110134419.20247-5-ykaradzhov@vmware.com> (raw)
In-Reply-To: <20190110134419.20247-1-ykaradzhov@vmware.com>
A quick access to this action can save time and be very useful.
Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
| 6 +++++-
| 4 ++++
2 files changed, 9 insertions(+), 1 deletion(-)
--git a/kernel-shark-qt/src/KsQuickContextMenu.cpp b/kernel-shark-qt/src/KsQuickContextMenu.cpp
index 7ab5a5f..231ca38 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.cpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.cpp
@@ -61,7 +61,8 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
_addCPUPlotAction(this),
_addTaskPlotAction(this),
_removeCPUPlotAction(this),
- _removeTaskPlotAction(this)
+ _removeTaskPlotAction(this),
+ _clearAllFilters(this)
{
typedef void (KsQuickContextMenu::*mfp)();
QString taskName, parentName, descr;
@@ -120,6 +121,9 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
descr = QString("Hide CPU [%1]").arg(_data->rows()[_row]->cpu);
lamAddAction(&_hideCPUAction, &KsQuickContextMenu::_hideCPU);
+ descr = "Clear all filters";
+ lamAddAction(&_clearAllFilters, &KsQuickContextMenu::_clearFilters);
+
if (parentName == "KsTraceViewer") {
descr = "Add [";
descr += taskName;
--git a/kernel-shark-qt/src/KsQuickContextMenu.hpp b/kernel-shark-qt/src/KsQuickContextMenu.hpp
index 670d010..df8a65b 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.hpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.hpp
@@ -85,6 +85,8 @@ private:
QVector<int> _getFilterVector(tracecmd_filter_id *filter, int newId);
+ void _clearFilters() {_data->clearAllFilters();}
+
KsDataStore *_data;
size_t _row;
@@ -104,6 +106,8 @@ private:
QAction _removeCPUPlotAction;
QAction _removeTaskPlotAction;
+
+ QAction _clearAllFilters;
};
/**
--
2.17.1
next prev parent reply other threads:[~2019-01-10 13:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-10 13:44 [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu Yordan Karadzhov
2019-01-10 13:44 ` [PATCH 1/5] kernel-shark-qt: Remove _deselectAction from KsQuickContextMenu Yordan Karadzhov
2019-01-10 13:44 ` [PATCH 2/5] kernel-shark-qt: Remove the "Apply to" checkboxes " Yordan Karadzhov
2019-01-10 13:44 ` [PATCH 3/5] kernel-shark-qt: Rearrange the KsQuickContextMenu menu Yordan Karadzhov
2019-01-10 13:44 ` Yordan Karadzhov [this message]
2019-01-10 13:44 ` [PATCH 5/5] kernel-shark-qt: Add section separator in KsQuickContextMenu Yordan Karadzhov
2019-01-10 14:31 ` [PATCH 0/5] Cosmetic modifications " 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=20190110134419.20247-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).