TextAutoGenerateTextMcpProtocolCore::McpRegistryServerModel Class
The McpRegistryServerModel class lists servers from the official MCP registry Author: Laurent Montel <montel@kde.org>. More...
| Header: | #include <TextAutoGenerateTextMcpProtocolCore/McpRegistryServerModel> |
| CMake: | find_package(KF6TextAutoGenerateTextMcpProtocolCore REQUIRED)target_link_libraries(mytarget PRIVATE KF6::TextAutoGenerateTextMcpProtocolCore) |
| Inherits: | QAbstractListModel |
Public Functions
| McpRegistryServerModel(QObject *parent = nullptr) | |
| virtual | ~McpRegistryServerModel() override |
| void | appendServers(const QList<TextAutoGenerateTextMcpProtocolCore::McpRegistryServerInfo> &servers) |
| void | clear() |
| TextAutoGenerateTextMcpProtocolCore::McpRegistryServerInfo | serverInfo(int row) const |
| void | setServers(const QList<TextAutoGenerateTextMcpProtocolCore::McpRegistryServerInfo> &servers) |
Reimplemented Public Functions
| virtual QVariant | data(const QModelIndex &index, int role = Qt::DisplayRole) const override |
| virtual int | rowCount(const QModelIndex &parent = {}) const override |
Detailed Description
Member Function Documentation
[explicit] McpRegistryServerModel::McpRegistryServerModel(QObject *parent = nullptr)
Constructs a new McpRegistryServerModel object. parent The parent QObject
[override virtual noexcept] McpRegistryServerModel::~McpRegistryServerModel()
Destroys the McpRegistryServerModel object.
void McpRegistryServerModel::appendServers(const QList<TextAutoGenerateTextMcpProtocolCore::McpRegistryServerInfo> &servers)
Appends servers (next page) to the model. servers The servers to append
void McpRegistryServerModel::clear()
Removes all servers from the model.
[override virtual] QVariant McpRegistryServerModel::data(const QModelIndex &index, int role = Qt::DisplayRole) 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
[override virtual] int McpRegistryServerModel::rowCount(const QModelIndex &parent = {}) const
Reimplements: QAbstractItemModel::rowCount(const QModelIndex &parent) const.
Returns the number of rows in the model.
TextAutoGenerateTextMcpProtocolCore::McpRegistryServerInfo McpRegistryServerModel::serverInfo(int row) const
Returns the server info at row, or an invalid info if row is out of range.
void McpRegistryServerModel::setServers(const QList<TextAutoGenerateTextMcpProtocolCore::McpRegistryServerInfo> &servers)
Replaces the servers of the model. servers The servers to set