TextAutoGenerateText::TextAutoGenerateTextAgentModel Class
class TextAutoGenerateText::TextAutoGenerateTextAgentModelThe TextAutoGenerateTextAgentModel class Author: Laurent Montel <montel@kde.org>. More...
| Header: | #include <TextAutoGenerateText/TextAutoGenerateTextAgentModel> |
| Inherits: | QAbstractListModel |
Public Types
| enum | AgentRoles { Name, Description, Identifier, Agent } |
Public Functions
| TextAutoGenerateTextAgentModel(QObject *parent = nullptr) | |
| virtual | ~TextAutoGenerateTextAgentModel() override |
| void | addAgent(const TextAutoGenerateText::TextAutoGenerateAgent &newAgent) |
| QList<TextAutoGenerateText::TextAutoGenerateAgent> | agents() const |
| void | removeAgent(const QByteArray &identifier) |
| void | setAgents(const QList<TextAutoGenerateText::TextAutoGenerateAgent> &newAgents) |
| void | updateAgent(const TextAutoGenerateText::TextAutoGenerateAgent &agent) |
Reimplemented Public Functions
| virtual QVariant | data(const QModelIndex &index, int role) const override |
| virtual int | rowCount(const QModelIndex & = {}) const override |
Detailed Description
Member Type Documentation
enum TextAutoGenerateTextAgentModel::AgentRoles
The AgentRoles enum
Member Function Documentation
[explicit] TextAutoGenerateTextAgentModel::TextAutoGenerateTextAgentModel(QObject *parent = nullptr)
Constructs a new TextAutoGenerateTextAgentModel object. parent The parent QObject
[override virtual noexcept] TextAutoGenerateTextAgentModel::~TextAutoGenerateTextAgentModel()
Destroys the TextAutoGenerateTextAgentModel object.
void TextAutoGenerateTextAgentModel::addAgent(const TextAutoGenerateText::TextAutoGenerateAgent &newAgent)
addAgent newAgent
QList<TextAutoGenerateText::TextAutoGenerateAgent> TextAutoGenerateTextAgentModel::agents() const
agents Returns
See also setAgents().
[override virtual] QVariant TextAutoGenerateTextAgentModel::data(const QModelIndex &index, int role) const
Reimplements: QAbstractItemModel::data(const QModelIndex &index, int role) const.
Returns the data at the given index for the specified role. index The model index role The data role Returns The data value
void TextAutoGenerateTextAgentModel::removeAgent(const QByteArray &identifier)
removeAgent identifier
[override virtual] int TextAutoGenerateTextAgentModel::rowCount(const QModelIndex & = {}) const
Reimplements: QAbstractItemModel::rowCount(const QModelIndex &parent) const.
Returns the number of rows in the model. Returns The row count
void TextAutoGenerateTextAgentModel::setAgents(const QList<TextAutoGenerateText::TextAutoGenerateAgent> &newAgents)
setAgents newAgents
See also agents().
void TextAutoGenerateTextAgentModel::updateAgent(const TextAutoGenerateText::TextAutoGenerateAgent &agent)
updateAgent agent