mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 02:35:07 +00:00

I need a table view widget for this thing, so I'm also using this to prototype a model/view thingy.
19 lines
372 B
C++
19 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 };
|
|
};
|