linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu
@ 2019-01-10 13:44 Yordan Karadzhov
  2019-01-10 13:44 ` [PATCH 1/5] kernel-shark-qt: Remove _deselectAction from KsQuickContextMenu Yordan Karadzhov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Yordan Karadzhov @ 2019-01-10 13:44 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

All modifications to the KsQuickContextMenu done in this series of
patches have been sent already, but as a single patch ([PATCH v2 2/6])
The original patch was divided in order to provide a clean sequence of
distinct changes.

Yordan Karadzhov (5):
  kernel-shark-qt: Remove _deselectAction from KsQuickContextMenu
  kernel-shark-qt: Remove the "Apply to" checkboxes from
    KsQuickContextMenu
  kernel-shark-qt: Rearrange the KsQuickContextMenu menu
  kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu
  kernel-shark-qt: Add section separator in KsQuickContextMenu

 kernel-shark-qt/src/KsQuickContextMenu.cpp | 63 +++++++---------------
 kernel-shark-qt/src/KsQuickContextMenu.hpp |  4 +-
 2 files changed, 23 insertions(+), 44 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] kernel-shark-qt: Remove _deselectAction from KsQuickContextMenu
  2019-01-10 13:44 [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu Yordan Karadzhov
@ 2019-01-10 13:44 ` Yordan Karadzhov
  2019-01-10 13:44 ` [PATCH 2/5] kernel-shark-qt: Remove the "Apply to" checkboxes " Yordan Karadzhov
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yordan Karadzhov @ 2019-01-10 13:44 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

The action used to deselect the active marker gets inherited from
KsQuickMarkerMenu. This makes the declaration of an identical data
member in class KsQuickContextMenu ambiguous.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsQuickContextMenu.cpp | 3 +--
 kernel-shark-qt/src/KsQuickContextMenu.hpp | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel-shark-qt/src/KsQuickContextMenu.cpp b/kernel-shark-qt/src/KsQuickContextMenu.cpp
index 6c9c9ef..b41adb9 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.cpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.cpp
@@ -61,8 +61,7 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
   _addCPUPlotAction(this),
   _addTaskPlotAction(this),
   _removeCPUPlotAction(this),
-  _removeTaskPlotAction(this),
-  _deselectAction(this)
+  _removeTaskPlotAction(this)
 {
 	typedef void (KsQuickContextMenu::*mfp)();
 	QString taskName, parentName, descr;
diff --git a/kernel-shark-qt/src/KsQuickContextMenu.hpp b/kernel-shark-qt/src/KsQuickContextMenu.hpp
index f5a2a78..670d010 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.hpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.hpp
@@ -104,8 +104,6 @@ private:
 	QAction _removeCPUPlotAction;
 
 	QAction _removeTaskPlotAction;
-
-	QAction _deselectAction;
 };
 
 /**
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] kernel-shark-qt: Remove the "Apply to" checkboxes from KsQuickContextMenu
  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 ` Yordan Karadzhov
  2019-01-10 13:44 ` [PATCH 3/5] kernel-shark-qt: Rearrange the KsQuickContextMenu menu Yordan Karadzhov
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yordan Karadzhov @ 2019-01-10 13:44 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

"Apply to list/graph" checkboxes are available in the "Filter" top menu.
Having the same checkboxes in the Context menu is a potential source of
confusion for the user.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsQuickContextMenu.cpp | 30 ----------------------
 1 file changed, 30 deletions(-)

diff --git a/kernel-shark-qt/src/KsQuickContextMenu.cpp b/kernel-shark-qt/src/KsQuickContextMenu.cpp
index b41adb9..4f922a2 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.cpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.cpp
@@ -88,36 +88,6 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 
 	addSection("Pointer menu");
 
-	if (parentName == "KsTraceViewer") {
-		_graphSyncCBox =
-			KsUtils::addCheckBoxToMenu(this, "Apply filters to Graph");
-
-		connect(_graphSyncCBox,	&QCheckBox::stateChanged,
-					&KsUtils::graphFilterSync);
-
-		/*
-		 * By defauls the filters will be append to the List (Table)
-		 * only.
-		 */
-		KsUtils::listFilterSync(true);
-		KsUtils::graphFilterSync(false);
-		_graphSyncCBox->setChecked(false);
-	}
-
-	if (parentName == "KsTraceGraph" &&
-	    (graphs = dynamic_cast<KsTraceGraph *>(parent))) {
-		_listSyncCBox =
-			KsUtils::addCheckBoxToMenu(this, "Apply filters to List");
-
-		connect(_listSyncCBox,	&QCheckBox::stateChanged,
-					&KsUtils::listFilterSync);
-
-		/* By defauls the filters will be append to the Graph only. */
-		KsUtils::graphFilterSync(true);
-		KsUtils::listFilterSync(false);
-		_listSyncCBox->setChecked(false);
-	}
-
 	descr = "Hide task [";
 	descr += taskName;
 	descr += "-";
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] kernel-shark-qt: Rearrange the KsQuickContextMenu menu
  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 ` Yordan Karadzhov
  2019-01-10 13:44 ` [PATCH 4/5] kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu Yordan Karadzhov
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Yordan Karadzhov @ 2019-01-10 13:44 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

Swaps the position of the Show / Hide actions in the menu. This is
done because we expect the "Show" actions to be used more often.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsQuickContextMenu.cpp | 26 ++++++++++++----------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/kernel-shark-qt/src/KsQuickContextMenu.cpp b/kernel-shark-qt/src/KsQuickContextMenu.cpp
index 4f922a2..7ab5a5f 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.cpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.cpp
@@ -88,13 +88,6 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 
 	addSection("Pointer menu");
 
-	descr = "Hide task [";
-	descr += taskName;
-	descr += "-";
-	descr += QString("%1").arg(pid);
-	descr += "]";
-	lamAddAction(&_hideTaskAction, &KsQuickContextMenu::_hideTask);
-
 	descr = "Show task [";
 	descr += taskName;
 	descr += "-";
@@ -102,23 +95,32 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 	descr += "] only";
 	lamAddAction(&_showTaskAction, &KsQuickContextMenu::_showTask);
 
-	descr = "Hide event [";
-	descr += kshark_get_event_name_easy(_data->rows()[_row]);
+	descr = "Hide task [";
+	descr += taskName;
+	descr += "-";
+	descr += QString("%1").arg(pid);
 	descr += "]";
-	lamAddAction(&_hideEventAction, &KsQuickContextMenu::_hideEvent);
+	lamAddAction(&_hideTaskAction, &KsQuickContextMenu::_hideTask);
 
 	descr = "Show event [";
 	descr += kshark_get_event_name_easy(_data->rows()[_row]);
 	descr += "] only";
 	lamAddAction(&_showEventAction, &KsQuickContextMenu::_showEvent);
 
-	descr = QString("Hide CPU [%1]").arg(_data->rows()[_row]->cpu);
-	lamAddAction(&_hideCPUAction, &KsQuickContextMenu::_hideCPU);
+	descr = "Hide event [";
+	descr += kshark_get_event_name_easy(_data->rows()[_row]);
+	descr += "]";
+	lamAddAction(&_hideEventAction, &KsQuickContextMenu::_hideEvent);
 
 	if (parentName == "KsTraceViewer") {
 		descr = QString("Show CPU [%1] only").arg(cpu);
 		lamAddAction(&_showCPUAction, &KsQuickContextMenu::_showCPU);
+	}
+
+	descr = QString("Hide CPU [%1]").arg(_data->rows()[_row]->cpu);
+	lamAddAction(&_hideCPUAction, &KsQuickContextMenu::_hideCPU);
 
+	if (parentName == "KsTraceViewer") {
 		descr = "Add [";
 		descr += taskName;
 		descr += "-";
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu
  2019-01-10 13:44 [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu Yordan Karadzhov
                   ` (2 preceding siblings ...)
  2019-01-10 13:44 ` [PATCH 3/5] kernel-shark-qt: Rearrange the KsQuickContextMenu menu Yordan Karadzhov
@ 2019-01-10 13:44 ` Yordan Karadzhov
  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
  5 siblings, 0 replies; 7+ messages in thread
From: Yordan Karadzhov @ 2019-01-10 13:44 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

A quick access to this action can save time and be very useful.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsQuickContextMenu.cpp | 6 +++++-
 kernel-shark-qt/src/KsQuickContextMenu.hpp | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --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;
diff --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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] kernel-shark-qt: Add section separator in KsQuickContextMenu
  2019-01-10 13:44 [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu Yordan Karadzhov
                   ` (3 preceding siblings ...)
  2019-01-10 13:44 ` [PATCH 4/5] kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu Yordan Karadzhov
@ 2019-01-10 13:44 ` Yordan Karadzhov
  2019-01-10 14:31 ` [PATCH 0/5] Cosmetic modifications " Steven Rostedt
  5 siblings, 0 replies; 7+ messages in thread
From: Yordan Karadzhov @ 2019-01-10 13:44 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

Adding a separator between the filter-related and the plot-related
actions in the menu helps the user to get orientation.

Signed-off-by: Yordan Karadzhov <ykaradzhov@vmware.com>
---
 kernel-shark-qt/src/KsQuickContextMenu.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel-shark-qt/src/KsQuickContextMenu.cpp b/kernel-shark-qt/src/KsQuickContextMenu.cpp
index 231ca38..728ecbd 100644
--- a/kernel-shark-qt/src/KsQuickContextMenu.cpp
+++ b/kernel-shark-qt/src/KsQuickContextMenu.cpp
@@ -87,7 +87,7 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 
 	parentName = parent->metaObject()->className();
 
-	addSection("Pointer menu");
+	addSection("Pointer filter menu");
 
 	descr = "Show task [";
 	descr += taskName;
@@ -124,6 +124,8 @@ KsQuickContextMenu::KsQuickContextMenu(KsDataStore *data, size_t row,
 	descr = "Clear all filters";
 	lamAddAction(&_clearAllFilters, &KsQuickContextMenu::_clearFilters);
 
+	addSection("Pointer plot menu");
+
 	if (parentName == "KsTraceViewer") {
 		descr = "Add [";
 		descr += taskName;
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu
  2019-01-10 13:44 [PATCH 0/5] Cosmetic modifications in KsQuickContextMenu Yordan Karadzhov
                   ` (4 preceding siblings ...)
  2019-01-10 13:44 ` [PATCH 5/5] kernel-shark-qt: Add section separator in KsQuickContextMenu Yordan Karadzhov
@ 2019-01-10 14:31 ` Steven Rostedt
  5 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2019-01-10 14:31 UTC (permalink / raw)
  To: Yordan Karadzhov; +Cc: linux-trace-devel

On Thu, 10 Jan 2019 15:44:14 +0200
Yordan Karadzhov <ykaradzhov@vmware.com> wrote:

> All modifications to the KsQuickContextMenu done in this series of
> patches have been sent already, but as a single patch ([PATCH v2 2/6])
> The original patch was divided in order to provide a clean sequence of
> distinct changes.
> 
> Yordan Karadzhov (5):
>   kernel-shark-qt: Remove _deselectAction from KsQuickContextMenu
>   kernel-shark-qt: Remove the "Apply to" checkboxes from
>     KsQuickContextMenu
>   kernel-shark-qt: Rearrange the KsQuickContextMenu menu
>   kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu
>   kernel-shark-qt: Add section separator in KsQuickContextMenu
> 
>  kernel-shark-qt/src/KsQuickContextMenu.cpp | 63 +++++++---------------
>  kernel-shark-qt/src/KsQuickContextMenu.hpp |  4 +-
>  2 files changed, 23 insertions(+), 44 deletions(-)
> 

Applied. Thanks a lot Yordan!

-- Steve

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-01-10 14:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 4/5] kernel-shark-qt: Add "clear all filters" action to KsQuickContextMenu Yordan Karadzhov
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

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).