Tracing: CtfVisualizer: Add menu to restrict view to certain threads

Add a new dropdown menu to select which threads should be displayed.
If no threads are selected, all are shown (this is why the word
'restriction' was chosen). At the moment this only affects the
timeline view, see the follow up for the statistics view.

Change-Id: Ib3b08ea895e852189156e23feb8dea5f843cceb3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Tim Henning
2019-10-17 13:36:37 +02:00
parent ee7aad5719
commit b90200cb19
6 changed files with 92 additions and 12 deletions

View File

@@ -40,6 +40,7 @@ namespace Internal {
class CtfTraceManager;
class CtfStatisticsModel;
class CtfStatisticsView;
class CtfTimelineModel;
class CtfVisualizerTraceView;
@@ -63,6 +64,9 @@ private:
void initialize();
void finalize();
void setAvailableThreads(const QList<CtfTimelineModel *> &threads);
void toggleThreadRestriction(QAction *action);
Utils::Perspective m_perspective{Constants::CtfVisualizerPerspectiveId,
tr("Chrome Trace Format Visualizer")};
@@ -77,6 +81,9 @@ private:
CtfStatisticsView *m_statisticsView;
const QScopedPointer<CtfTraceManager> m_traceManager;
QToolButton *const m_restrictToThreadsButton;
QMenu *const m_restrictToThreadsMenu;
};
} // namespace Internal