diff options
author | Andreas Kling <kling@serenityos.org> | 2020-08-16 10:44:10 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-08-16 16:44:09 +0200 |
commit | e1ed71ef9e50909f29dc4aa984e8544c7f7077c4 (patch) | |
tree | 70661e54eb0e786b5152618433ee43bca1623721 /Libraries/LibGUI/MultiView.h | |
parent | 370624bc376824c0c9d0966df62e0e1438aca08f (diff) | |
download | serenity-e1ed71ef9e50909f29dc4aa984e8544c7f7077c4.zip |
LibGUI: Make model sorting imperative and move order to AbstractView
Instead of SortingProxyModel having a column+order, we move that state
to AbstractView. When you click on a column header, the view tells the
model to resort the relevant column with the new order.
This is implemented in SortingProxyModel by simply walking all the
reified source/proxy mappings and resorting their row indexes.
Diffstat (limited to 'Libraries/LibGUI/MultiView.h')
-rw-r--r-- | Libraries/LibGUI/MultiView.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibGUI/MultiView.h b/Libraries/LibGUI/MultiView.h index d7dbe6ea49..5d9e9d4b8b 100644 --- a/Libraries/LibGUI/MultiView.h +++ b/Libraries/LibGUI/MultiView.h @@ -63,6 +63,8 @@ public: void set_column_hidden(int column_index, bool hidden); + void set_key_column_and_sort_order(int column, SortOrder); + GUI::AbstractView& current_view() { switch (m_view_mode) { |