ark::plotting::SelectedObjectTableModel

Defined in header “ark/plotting/gui/selected_object_table_model.hh”.


A table model that reads the selected fields from a comms manager, and displays them as if it was a legend. Also shows their current values, and has provisions for removing items.

Typedefs

  • using Columns =
    A list of columns, in display-order.

Methods

  • SelectedObjectTableModel(QObject * parent)
    Constructor.

  • ~SelectedObjectTableModel()
    Destructor. Implemented privately to hide details.

  • int rowCount(const QModelIndex & parent)
    Returns a count of rows for this model.

  • int columnCount(const QModelIndex & parent)
    Returns the count of columns for this model.

  • QVariant data(const QModelIndex & index, int role)
    Returns the raw data for the given model index.

  • Qt::ItemFlags flags(const QModelIndex & index)
    Returns flags for a given column. Used to mark if something is selectable or not.

  • QVariant headerData(int section, Qt::Orientation orientation, int role)
    Returns the header names at the given column.

  • void set_data(std::vector< PlottingFieldPtr > fields)
    Sets the comms manager that sources the pieces of information that is displayed here.

  • void set_interested_key(std::optional< double > key)
    Sets the mouse-over key shows values from series near this key, instead of the current value.

  • void refresh_rows()
    Refreshes all of the rows. Call this when you know new fields were added or removed.

  • void set_colors(const gui::Rgba * colors, size_t colors_length)
    Sets the color map we should use for the legend.

  • std::string subscriber_name(int row)
    Returns the subscriber name at the given row identifier, or an empty string if the row is out of bounds.