| 1 | // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. |
| 2 | // |
| 3 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | |
| 5 | #ifndef TIMELINEWIDGET_H |
| 6 | #define TIMELINEWIDGET_H |
| 7 | |
| 8 | #include <QObject> |
| 9 | #include <QWidget> |
| 10 | #include <QObject> |
| 11 | #include <QEvent> |
| 12 | #include <QAction> |
| 13 | #include <QScrollBar> |
| 14 | |
| 15 | namespace ReverseDebugger{ |
| 16 | namespace Internal { |
| 17 | |
| 18 | class TaskWindow; |
| 19 | class TimelineWidgetPrivate; |
| 20 | class TimelineWidget : public QWidget |
| 21 | { |
| 22 | public: |
| 23 | TimelineWidget(QWidget *parent); |
| 24 | void setData(TaskWindow* window, void* timeline, int count); |
| 25 | void setEventTid(int tid); |
| 26 | void setEventRange(int begin, int end); |
| 27 | void setEventIndexRange(int begin, int end); |
| 28 | void setFilteredCategories(const QList<QString> &categoryIds); |
| 29 | |
| 30 | public slots: |
| 31 | void zoomIn(); |
| 32 | void zoomOut(); |
| 33 | void zoomFit(); |
| 34 | void valueChanged(int value); |
| 35 | |
| 36 | private: |
| 37 | void paintEvent(QPaintEvent *); |
| 38 | void mousePressEvent(QMouseEvent*); |
| 39 | void mouseReleaseEvent(QMouseEvent*); |
| 40 | void mouseMoveEvent(QMouseEvent*); |
| 41 | void (QContextMenuEvent*); |
| 42 | void resizeEvent(QResizeEvent *e); |
| 43 | void updateVisibleEvent(void); |
| 44 | void mouseDoubleClickEvent(QMouseEvent *event); |
| 45 | void invalidateFilter(); |
| 46 | |
| 47 | TimelineWidgetPrivate *const d; |
| 48 | }; |
| 49 | |
| 50 | } // namespace Internal |
| 51 | } // namespace ReverseDebugger |
| 52 | |
| 53 | #endif // TIMELINEWIDGET_H |
| 54 | |