mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:37:34 +00:00
ProfileViewer: Use the new multi-column tree model support in GTreeView
Put the sample count into a separate column. This is so neat :^)
This commit is contained in:
parent
0ac74d3778
commit
5cd4fb4db2
3 changed files with 44 additions and 5 deletions
|
@ -11,14 +11,23 @@ public:
|
|||
return adopt(*new ProfileModel(profile));
|
||||
}
|
||||
|
||||
enum Column {
|
||||
SampleCount,
|
||||
StackFrame,
|
||||
__Count
|
||||
};
|
||||
|
||||
virtual ~ProfileModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex& = GModelIndex()) const override;
|
||||
virtual int column_count(const GModelIndex& = GModelIndex()) const override;
|
||||
virtual String column_name(int) const override;
|
||||
virtual ColumnMetadata column_metadata(int) const override;
|
||||
virtual GVariant data(const GModelIndex&, Role = Role::Display) const override;
|
||||
virtual GModelIndex index(int row, int column, const GModelIndex& parent = GModelIndex()) const override;
|
||||
virtual GModelIndex parent_index(const GModelIndex&) const override;
|
||||
virtual void update() override;
|
||||
virtual int tree_column() const override { return Column::StackFrame; }
|
||||
|
||||
private:
|
||||
explicit ProfileModel(Profile&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue