@@ -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;
@@ -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;
};
/**
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(-)