mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 02:33:03 +00:00
GAbstractView: Add function for adding all to selection
This commit is contained in:
parent
00596296c4
commit
7cf15bcb75
Notes:
sideshowbarker
2024-07-19 10:17:49 +09:00
Author: https://github.com/shannonbooth
Commit: 7cf15bcb75
Pull-request: https://github.com/SerenityOS/serenity/pull/1033
2 changed files with 13 additions and 0 deletions
|
@ -95,6 +95,18 @@ void GAbstractView::stop_editing()
|
|||
}
|
||||
}
|
||||
|
||||
void GAbstractView::select_all()
|
||||
{
|
||||
ASSERT(model());
|
||||
int rows = model()->row_count();
|
||||
int columns = model()->column_count();
|
||||
|
||||
for (int i = 0; i < rows; ++i) {
|
||||
for (int j = 0; j < columns; ++j)
|
||||
selection().add(model()->index(i, j));
|
||||
}
|
||||
}
|
||||
|
||||
void GAbstractView::activate(const GModelIndex& index)
|
||||
{
|
||||
if (on_activation)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue