mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 06:01:14 +01:00
Tests for UI tabe
Adds functionality to retrieve an item from the UI table. Also adds tests for the UI table functionality, including serialization, label setting, item insertion, and item clearing.
This commit is contained in:
@@ -120,6 +120,17 @@ void UI_table::insert_item(size_t row, size_t column, std::string text)
|
||||
emit ui_changed();
|
||||
}
|
||||
|
||||
std::string UI_table::item(size_t row, size_t column) const
|
||||
{
|
||||
if (m_column_count <= column || m_row_count <= row)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
size_t index = row * m_column_count + column;
|
||||
|
||||
return m_table.at(index);
|
||||
}
|
||||
|
||||
void UI_table::empty_item(size_t row, size_t column)
|
||||
{
|
||||
size_t index = row * m_column_count + column;
|
||||
|
||||
Reference in New Issue
Block a user