mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:37:47 +00:00
Ladybird: Allow replacing underlying model of ModelTranslator
This commit is contained in:
parent
419dea0996
commit
0313814d3b
2 changed files with 15 additions and 6 deletions
|
@ -14,9 +14,15 @@ namespace Ladybird {
|
|||
class ModelTranslator final : public QAbstractItemModel {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ModelTranslator(NonnullRefPtr<GUI::Model>);
|
||||
virtual ~ModelTranslator() override;
|
||||
|
||||
void set_underlying_model(RefPtr<GUI::Model> model)
|
||||
{
|
||||
beginResetModel();
|
||||
m_model = model;
|
||||
endResetModel();
|
||||
}
|
||||
|
||||
virtual int columnCount(QModelIndex const& parent) const override;
|
||||
virtual int rowCount(QModelIndex const& parent) const override;
|
||||
virtual QVariant data(QModelIndex const&, int role) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue