|
RADLib
RADical C++ application framework
|
Simple string table model for grid/table UI components. More...
#include <RADWidgets.h>
Inheritance diagram for RADUi::TableModel:
Collaboration diagram for RADUi::TableModel:Public Member Functions | |
| size_t | rowCount () const |
| Returns number of rows. More... | |
| size_t | columnCount () const |
| Returns number of columns. More... | |
| std::string | value (size_t row, size_t column) const |
| Returns a cell value or empty string when out of range. More... | |
| void | setColumnCount (size_t columns) |
| Sets the table column count. More... | |
| void | appendRow (std::vector< std::string > row) |
| Appends a row, padding/truncating to column count as needed. More... | |
| void | setValue (size_t row, size_t column, std::string value) |
| Sets one cell value. More... | |
| void | clear () |
| Removes all rows and columns. More... | |
Public Member Functions inherited from RADCore::RADObject | |
| RADObject () | |
| Creates a RADObject bound to the current thread. More... | |
| virtual | ~RADObject () |
| Disconnects tracked event links and releases lifetime token. More... | |
| void | registerLink (const ConnectionRecord &record) |
| Registers a connection for cleanup when this object is destroyed. More... | |
| std::thread::id | threadId () const |
| Returns the thread id this object is currently associated with. More... | |
| EventLoop * | associatedEventLoop () const |
| Returns the associated event loop, if any. More... | |
| ThreadAffinity | threadAffinity () const |
| Returns both thread id and associated loop atomically. More... | |
| std::weak_ptr< void > | lifetimeToken () const |
| Returns a weak token used to drop queued callbacks after destruction. More... | |
| void | moveToThread (std::thread::id tId, EventLoop *loop=nullptr) |
| Moves the object's affinity to tId and optional loop. More... | |
Public Attributes | |
| RADCore::Event< void() > | changed |
| Raised when row, column, or cell data changes. More... | |
Simple string table model for grid/table UI components.
| void RADUi::TableModel::appendRow | ( | std::vector< std::string > | row | ) |
Appends a row, padding/truncating to column count as needed.
| void RADUi::TableModel::clear | ( | ) |
Removes all rows and columns.
| size_t RADUi::TableModel::columnCount | ( | ) | const |
Returns number of columns.
| size_t RADUi::TableModel::rowCount | ( | ) | const |
Returns number of rows.
| void RADUi::TableModel::setColumnCount | ( | size_t | columns | ) |
Sets the table column count.
| void RADUi::TableModel::setValue | ( | size_t | row, |
| size_t | column, | ||
| std::string | value | ||
| ) |
Sets one cell value.
| std::string RADUi::TableModel::value | ( | size_t | row, |
| size_t | column | ||
| ) | const |
Returns a cell value or empty string when out of range.
| RADCore::Event<void () > RADUi::TableModel::changed |
Raised when row, column, or cell data changes.