mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:57:43 +00:00
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
This commit is contained in:
parent
63814ffebf
commit
04b9dc2d30
328 changed files with 36 additions and 36 deletions
36
Libraries/LibGUI/GSortingProxyModel.h
Normal file
36
Libraries/LibGUI/GSortingProxyModel.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
#pragma once
|
||||
|
||||
#include <LibGUI/GModel.h>
|
||||
|
||||
class GSortingProxyModel final : public GModel {
|
||||
public:
|
||||
static NonnullRefPtr<GSortingProxyModel> create(NonnullRefPtr<GModel>&& model) { return adopt(*new GSortingProxyModel(move(model))); }
|
||||
virtual ~GSortingProxyModel() override;
|
||||
|
||||
virtual int row_count(const GModelIndex& = GModelIndex()) const override;
|
||||
virtual int column_count(const GModelIndex& = GModelIndex()) const override;
|
||||
virtual String row_name(int) 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 void update() override;
|
||||
|
||||
virtual int key_column() const override { return m_key_column; }
|
||||
virtual GSortOrder sort_order() const override { return m_sort_order; }
|
||||
virtual void set_key_column_and_sort_order(int, GSortOrder) override;
|
||||
|
||||
GModelIndex map_to_target(const GModelIndex&) const;
|
||||
|
||||
private:
|
||||
explicit GSortingProxyModel(NonnullRefPtr<GModel>&&);
|
||||
|
||||
GModel& target() { return *m_target; }
|
||||
const GModel& target() const { return *m_target; }
|
||||
|
||||
void resort();
|
||||
|
||||
NonnullRefPtr<GModel> m_target;
|
||||
Vector<int> m_row_mappings;
|
||||
int m_key_column { -1 };
|
||||
GSortOrder m_sort_order { GSortOrder::Ascending };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue