1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

GTreeView: Add basic selection support.

This commit is contained in:
Andreas Kling 2019-03-29 20:36:15 +01:00
parent 967eec1e52
commit 1963391ca6
4 changed files with 44 additions and 26 deletions

View file

@ -15,7 +15,15 @@ public:
GModelIndex parent() const;
bool operator==(const GModelIndex& other) const { return m_row == other.m_row && m_column == other.m_column; }
bool operator==(const GModelIndex& other) const
{
return m_model == other.m_model && m_row == other.m_row && m_column == other.m_column && m_internal_data == other.m_internal_data;
}
bool operator!=(const GModelIndex& other) const
{
return !(*this == other);
}
private:
GModelIndex(const GModel& model, int row, int column, void* internal_data)