mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 11:00:29 +00:00
3fd2304dad
You can now select the time range you want on the profile timeline. The tree view will update automatically as you alter the range. Unfortunately this causes the treeview to collapse all of its nodes. It would be nice to solve this somehow in the future so that nodes can stay open.
25 lines
641 B
C++
25 lines
641 B
C++
#include <LibGUI/GFrame.h>
|
|
|
|
class Profile;
|
|
|
|
class ProfileTimelineWidget final : public GFrame {
|
|
C_OBJECT(ProfileTimelineWidget)
|
|
public:
|
|
virtual ~ProfileTimelineWidget() override;
|
|
|
|
private:
|
|
virtual void paint_event(GPaintEvent&) override;
|
|
virtual void mousedown_event(GMouseEvent&) override;
|
|
virtual void mousemove_event(GMouseEvent&) override;
|
|
virtual void mouseup_event(GMouseEvent&) override;
|
|
|
|
ProfileTimelineWidget(Profile&, GWidget* parent);
|
|
|
|
u64 timestamp_at_x(int x) const;
|
|
|
|
Profile& m_profile;
|
|
|
|
bool m_selecting { false };
|
|
u64 m_select_start_time { 0 };
|
|
u64 m_select_end_time { 0 };
|
|
};
|