|
| DeployerListProxyModel (QLabel *row_count_label, QObject *parent=nullptr) |
| Constructor.
|
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| Maps the given index to the source models index and returns the source models data at that index.
|
|
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| Maps the given index to the source mods index and sets its data to the given new data.
|
|
void | setFilterMode (FilterMode mode, bool status, bool invalidate_filter=true) |
| Sets the given filter mode to the given status.
|
|
void | addFilter (FilterMode mode, bool invalidate_filter=true) |
| Enables the given filter mode.
|
|
void | removeFilter (FilterMode mode, bool invalidate_filter=true) |
| Disables the given filter mode.
|
|
bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override |
| Checks if the given row will be accepted by the current filter.
|
|
void | clearFilter (bool invalidate_filter=true) |
| Resets the filter to allow all mods.
|
|
int | getFilterMode () |
| Getter for the current filter mode.
|
|
void | setConflicts (const std::unordered_set< int > &conflicts) |
| Sets data for the conflicts filter.
|
|
void | addTagFilter (const QString &tag, bool include, bool invalidate_filter) |
| Adds a tag to the tag filters.
|
|
void | removeTagFilter (const QString &tag, bool invalidate_filter) |
| Removes the filter for the given tag.
|
|
void | setConflictGroups (const std::vector< std::vector< int > > &groups) |
| Generates a map used for row coloring from the given conflict groups.
|
|
void | updateRowCountLabel () |
| Updates the row count label with the current number of rows.
|
|
void | updateFilter (bool invalidate=true) |
| Updates the filter and row coloring.
|
|
std::vector< std::pair< QString, bool > > | getTagFilters () const |
| Returns the currently set tag filters.
|
|
void | setFilterString (const QString &filter_string) |
| Sets the string to use for filtering.
|
|
|
int | filter_mode_ = 0 |
| Contains the sum of all currently active filter modes.
|
|
std::unordered_set< int > | conflicts_ |
| Contains all mod ids to be shown when the conflicts filter is active.
|
|
std::vector< std::pair< QString, bool > > | tag_filters_ |
| Contains every tag to be filtered as well as a bool indicating whether mods with that tag show be shown or not shown.
|
|
std::map< int, int > | conflict_groups_ |
| Maps mod ids to their conflict group.
|
|
int | no_conflict_group_ = 0 |
| Id of the conflict group that contains mods without conflicts.
|
|
std::vector< QBrush > | row_text_colors_ |
| For every displayed row: The text color used.
|
|
QLabel * | row_count_label_ |
| Used to display to total number of rows.
|
|
QString | filter_string_ |
| String used to filter rows.
|
|
const QRegularExpression | id_regex_ |
| Regex used to check if filter_string_ is used to filter for ids.
|
|
bool | filter_string_is_int_ = false |
| True if the current filter string is an integer.
|
|
QString | filter_string_id_ |
| If the current filter string is an integer, this contains that integer.
|
|
bool | filter_string_targets_id_ = false |
| True if filter string matches id_regex_.
|
|
Used to sort and filter the deployer list.