mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
This commit is contained in:
parent
63814ffebf
commit
04b9dc2d30
328 changed files with 36 additions and 36 deletions
42
Libraries/LibGUI/GModelIndex.h
Normal file
42
Libraries/LibGUI/GModelIndex.h
Normal file
|
@ -0,0 +1,42 @@
|
|||
#pragma once
|
||||
|
||||
class GModel;
|
||||
|
||||
class GModelIndex {
|
||||
friend class GModel;
|
||||
|
||||
public:
|
||||
GModelIndex() {}
|
||||
|
||||
bool is_valid() const { return m_row != -1 && m_column != -1; }
|
||||
int row() const { return m_row; }
|
||||
int column() const { return m_column; }
|
||||
|
||||
void* internal_data() const { return m_internal_data; }
|
||||
|
||||
GModelIndex parent() const;
|
||||
|
||||
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)
|
||||
: m_model(&model)
|
||||
, m_row(row)
|
||||
, m_column(column)
|
||||
, m_internal_data(internal_data)
|
||||
{
|
||||
}
|
||||
|
||||
const GModel* m_model { nullptr };
|
||||
int m_row { -1 };
|
||||
int m_column { -1 };
|
||||
void* m_internal_data { nullptr };
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue