Manages and provides access to the data displayed in the deployer list.
More...
#include <deployerlistmodel.h>
|
| DeployerListModel (QObject *parent=nullptr) |
| Constructor.
|
|
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| Returns the horizontal header section names and vertical header section indices.
|
|
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| Returns the number of rows to display.
|
|
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| Returns the number of columns to display.
|
|
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| Used to access the data stored in this model.
|
|
void | setDeployerInfo (const DeployerInfo &info) |
| Updates all data stored in this model with the given data.
|
|
bool | hasSeparateDirs () const |
| Only for ReverseDeployers: Whether or not profiles use separate directories.
|
|
bool | hasIgnoredFiles () const |
| Only for ReverseDeployers: Whether or not the deployer's ignore list contains files.
|
|
|
static constexpr int | status_col = 0 |
| Index of the mod status column.
|
|
static constexpr int | name_col = 1 |
| Index of the mod name column.
|
|
static constexpr int | id_col = 2 |
| Index of the mod id column.
|
|
static constexpr int | tags_col = 3 |
| Index of the tags column.
|
|
static constexpr int | mod_status_role = 300 |
| Role representing the activation status of a mod.
|
|
static constexpr int | mod_tags_role = 301 |
| Role representing all tags added to a mod.
|
|
static constexpr int | ids_are_source_references_role = 302 |
| Rile representing whether ids are references to source mods.
|
|
static constexpr int | source_mod_name_role = 303 |
| Role representing the name of the source mod.
|
|
static constexpr int | valid_mod_actions_role = 304 |
| Role representing a list of valid mod actions.
|
|
|
DeployerInfo | deployer_info_ |
| Contains all mods managed by this model.
|
|
std::map< int, QBrush > | text_colors_ |
| Maps mod ids to the color used to display their names.
|
|
std::vector< std::vector< std::string > > | tags_ |
| For every mod: A vector containing every tag added to that mod.
|
|
Manages and provides access to the data displayed in the deployer list.
◆ DeployerListModel()
DeployerListModel::DeployerListModel |
( |
QObject * | parent = nullptr | ) |
|
|
explicit |
Constructor.
- Parameters
-
parent | Parent for this model. |
◆ columnCount()
int DeployerListModel::columnCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
Returns the number of columns to display.
- Parameters
-
- Returns
- The number of columns.
◆ data()
QVariant DeployerListModel::data |
( |
const QModelIndex & | index, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
Used to access the data stored in this model.
Returns data depending of the given role and index. Qt standard roles are used to provide data displayed in views. Custom roles defined in this file and in the ModListModel header provide access to the raw data.
- Parameters
-
index | Holds row and column for which to return data. |
role | Describes type of data to return. |
- Returns
- The requested data.
◆ hasIgnoredFiles()
bool DeployerListModel::hasIgnoredFiles |
( |
| ) |
const |
Only for ReverseDeployers: Whether or not the deployer's ignore list contains files.
- Returns
- True if at least one file is ignored.
◆ hasSeparateDirs()
bool DeployerListModel::hasSeparateDirs |
( |
| ) |
const |
Only for ReverseDeployers: Whether or not profiles use separate directories.
- Returns
- True if separate directories are used.
◆ headerData()
QVariant DeployerListModel::headerData |
( |
int | section, |
|
|
Qt::Orientation | orientation, |
|
|
int | role = Qt::DisplayRole ) const |
|
override |
Returns the horizontal header section names and vertical header section indices.
- Parameters
-
section | Target section. |
orientation | Header orientation. |
role | Data role. |
- Returns
- Name of the section.
◆ rowCount()
int DeployerListModel::rowCount |
( |
const QModelIndex & | parent = QModelIndex() | ) |
const |
|
override |
Returns the number of rows to display.
- Parameters
-
- Returns
- The number of rows.
◆ setDeployerInfo()
void DeployerListModel::setDeployerInfo |
( |
const DeployerInfo & | info | ) |
|
Updates all data stored in this model with the given data.
- Parameters
-
mods | Data for all mods managed by this model. |
The documentation for this class was generated from the following files: