From 166aadc4e1ac8260ebbfab6a3c6b48342e04680e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 28 Feb 2019 01:43:50 +0100 Subject: ProcessManager: Start working on a graphical process manager. I need a table view widget for this thing, so I'm also using this to prototype a model/view thingy. --- LibGUI/GTableModel.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 LibGUI/GTableModel.h (limited to 'LibGUI/GTableModel.h') diff --git a/LibGUI/GTableModel.h b/LibGUI/GTableModel.h new file mode 100644 index 0000000000..c05db160d8 --- /dev/null +++ b/LibGUI/GTableModel.h @@ -0,0 +1,20 @@ +#pragma once + +#include +#include + +class GTableModel { +public: + GTableModel() { } + virtual ~GTableModel() { } + + virtual int row_count() const = 0; + virtual int column_count() const = 0; + virtual String row_name(int) const { return { }; } + virtual String column_name(int) const { return { }; } + virtual int column_width(int) const { return 0; } + virtual String data(int row, int column) const = 0; + virtual void set_selected_index(GModelIndex) { } + virtual GModelIndex selected_index() const { return GModelIndex(); } + virtual void update() = 0; +}; -- cgit v1.2.3