2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2019 Klarälvdalens Datakonsult AB, a KDAB Group company,
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2019-08-29 11:45:45 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "ctfvisualizerconstants.h"
|
2022-09-01 12:13:45 +02:00
|
|
|
#include "ctfvisualizertr.h"
|
2019-08-29 11:45:45 +02:00
|
|
|
|
|
|
|
|
#include <debugger/debuggermainwindow.h>
|
|
|
|
|
#include <tracing/timelinemodelaggregator.h>
|
|
|
|
|
#include <tracing/timelinezoomcontrol.h>
|
|
|
|
|
|
|
|
|
|
#include <QScopedPointer>
|
|
|
|
|
|
|
|
|
|
namespace CtfVisualizer {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
|
|
|
|
class CtfTraceManager;
|
|
|
|
|
class CtfStatisticsModel;
|
|
|
|
|
class CtfStatisticsView;
|
2019-10-17 13:36:37 +02:00
|
|
|
class CtfTimelineModel;
|
2019-08-29 11:45:45 +02:00
|
|
|
class CtfVisualizerTraceView;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CtfVisualizerTool : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
CtfVisualizerTool();
|
|
|
|
|
~CtfVisualizerTool();
|
|
|
|
|
|
|
|
|
|
Timeline::TimelineModelAggregator *modelAggregator() const;
|
|
|
|
|
CtfTraceManager *traceManager() const;
|
|
|
|
|
Timeline::TimelineZoomControl *zoomControl() const;
|
|
|
|
|
|
|
|
|
|
void loadJson();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
void createViews();
|
|
|
|
|
|
|
|
|
|
void initialize();
|
|
|
|
|
void finalize();
|
|
|
|
|
|
2019-10-17 13:36:37 +02:00
|
|
|
void setAvailableThreads(const QList<CtfTimelineModel *> &threads);
|
|
|
|
|
void toggleThreadRestriction(QAction *action);
|
|
|
|
|
|
2019-08-29 11:45:45 +02:00
|
|
|
Utils::Perspective m_perspective{Constants::CtfVisualizerPerspectiveId,
|
2022-10-14 14:52:54 +02:00
|
|
|
::CtfVisualizer::Tr::tr("Chrome Trace Format Visualizer")};
|
2019-08-29 11:45:45 +02:00
|
|
|
|
|
|
|
|
bool m_isLoading;
|
|
|
|
|
QScopedPointer<QAction> m_loadJson;
|
|
|
|
|
|
|
|
|
|
CtfVisualizerTraceView *m_traceView;
|
|
|
|
|
const QScopedPointer<Timeline::TimelineModelAggregator> m_modelAggregator;
|
|
|
|
|
const QScopedPointer<Timeline::TimelineZoomControl> m_zoomControl;
|
|
|
|
|
|
|
|
|
|
const QScopedPointer<CtfStatisticsModel> m_statisticsModel;
|
|
|
|
|
CtfStatisticsView *m_statisticsView;
|
|
|
|
|
|
|
|
|
|
const QScopedPointer<CtfTraceManager> m_traceManager;
|
2019-10-17 13:36:37 +02:00
|
|
|
|
|
|
|
|
QToolButton *const m_restrictToThreadsButton;
|
|
|
|
|
QMenu *const m_restrictToThreadsMenu;
|
2019-08-29 11:45:45 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace CtfVisualizer
|