mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 22:25:08 +00:00
LibGUI: Replace ColumnMetadata::sortable => Model::is_column_sortable()
Now there's only one thing left in ColumnMetadata: the initial width.
This commit is contained in:
parent
2e03bded43
commit
c666c251c8
6 changed files with 12 additions and 9 deletions
|
@ -48,11 +48,6 @@ class Model : public RefCounted<Model> {
|
|||
public:
|
||||
struct ColumnMetadata {
|
||||
int preferred_width { 0 };
|
||||
enum class Sortable {
|
||||
False,
|
||||
True,
|
||||
};
|
||||
Sortable sortable { Sortable::True };
|
||||
};
|
||||
|
||||
enum UpdateFlag {
|
||||
|
@ -89,6 +84,8 @@ public:
|
|||
virtual int tree_column() const { return 0; }
|
||||
virtual bool accepts_drag(const ModelIndex&, const StringView& data_type);
|
||||
|
||||
virtual bool is_column_sortable([[maybe_unused]] int column_index) const { return true; }
|
||||
|
||||
bool is_valid(const ModelIndex& index) const
|
||||
{
|
||||
auto parent_index = this->parent_index(index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue