ladybird/LibGUI/GModelIndex.h
Andreas Kling 166aadc4e1 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.
2019-02-28 01:43:50 +01:00

20 lines
372 B
C++

#pragma once
class GModelIndex {
public:
GModelIndex() { }
GModelIndex(int row, int column)
: m_row(row)
, m_column(column)
{
}
bool is_valid() const { return m_row != -1 && m_column != -1; }
int row() const { return m_row; }
int column() const { return m_column; }
private:
int m_row { -1 };
int m_column { -1 };
};