1 #include "cell.h" 2 MakeInvalidCell()3/*static*/ Cell Cell::MakeInvalidCell() 4 { 5 Cell invalidCell; 6 invalidCell.m_character = 'X'; 7 invalidCell.m_isValid = false; 8 invalidCell.m_highlight = { Qt::white, Qt::red, QColor::Invalid, 9 false, false, false, false, false }; 10 11 return invalidCell; 12 } 13 SetCharacter(uint character)14void Cell::SetCharacter(uint character) 15 { 16 m_character = character; 17 m_isDoubleWidth = konsole_wcwidth(character) > 1; 18 } 19 operator ==(const Cell & other) const20bool Cell::operator==(const Cell& other) const 21 { 22 if (!m_isValid || !other.m_isValid) { 23 return false; 24 } 25 26 return m_character == other.m_character && 27 m_isDoubleWidth == other.m_isDoubleWidth && 28 m_highlight == other.m_highlight; 29 } 30