mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 23:09:08 +00:00
LibGUI: Rename GTableModel => GModel.
This commit is contained in:
parent
9d4b4c2689
commit
994cf10b3e
Notes:
sideshowbarker
2024-07-19 14:58:14 +09:00
Author: https://github.com/awesomekling
Commit: 994cf10b3e
23 changed files with 105 additions and 105 deletions
|
@ -1,13 +1,13 @@
|
|||
#include "ProcessTableView.h"
|
||||
#include "ProcessTableModel.h"
|
||||
#include <LibGUI/GSortingProxyTableModel.h>
|
||||
#include "ProcessModel.h"
|
||||
#include <LibGUI/GSortingProxyModel.h>
|
||||
#include <stdio.h>
|
||||
|
||||
ProcessTableView::ProcessTableView(GWidget* parent)
|
||||
: GTableView(parent)
|
||||
{
|
||||
set_model(GSortingProxyTableModel::create(ProcessTableModel::create()));
|
||||
model()->set_key_column_and_sort_order(ProcessTableModel::Column::CPU, GSortOrder::Descending);
|
||||
set_model(GSortingProxyModel::create(ProcessModel::create()));
|
||||
model()->set_key_column_and_sort_order(ProcessModel::Column::CPU, GSortOrder::Descending);
|
||||
start_timer(1000);
|
||||
model()->update();
|
||||
}
|
||||
|
@ -33,5 +33,5 @@ pid_t ProcessTableView::selected_pid() const
|
|||
{
|
||||
if (!model()->selected_index().is_valid())
|
||||
return -1;
|
||||
return model()->data({ model()->selected_index().row(), ProcessTableModel::Column::PID }, GTableModel::Role::Sort).as_int();
|
||||
return model()->data({ model()->selected_index().row(), ProcessModel::Column::PID }, GModel::Role::Sort).as_int();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue