1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

ProcessManager: Show some basic system memory stats below the process table.

This really improves the feeling of "system overview" :^)
This commit is contained in:
Andreas Kling 2019-03-10 12:13:22 +01:00
parent 8017c1e17c
commit 37388b311f
9 changed files with 158 additions and 9 deletions

View file

@ -2,7 +2,6 @@
#include <LibGUI/GWidget.h>
#include <LibGUI/GBoxLayout.h>
#include <LibGUI/GApplication.h>
#include <LibGUI/GStatusBar.h>
#include <LibGUI/GToolBar.h>
#include <LibGUI/GMenuBar.h>
#include <LibGUI/GAction.h>
@ -10,6 +9,7 @@
#include <stdio.h>
#include <signal.h>
#include "ProcessTableView.h"
#include "MemoryStatsWidget.h"
int main(int argc, char** argv)
{
@ -21,10 +21,8 @@ int main(int argc, char** argv)
auto* toolbar = new GToolBar(widget);
auto* process_table_view = new ProcessTableView(widget);
auto* statusbar = new GStatusBar(widget);
process_table_view->on_status_message = [statusbar] (String message) {
statusbar->set_text(move(message));
};
new MemoryStatsWidget(widget);
auto kill_action = GAction::create("Kill process", GraphicsBitmap::load_from_file(GraphicsBitmap::Format::RGBA32, "/res/icons/kill16.rgb", { 16, 16 }), [process_table_view] (const GAction&) {
pid_t pid = process_table_view->selected_pid();