QtCraft API C++ classes QML types Handbook

QcAdminCompletion Namespace

Completion of a command line for the admin channel's command picker (decision E-848): the command names of the catalogue for the first word, then what the parameter at the cursor takes by its usage (QcCommandSyntax): the choices, the names of the players, the structures or biomes the server names with the command (decision E-911), or the blocks, items and creatures of the content. More...

Header: #include <clientcore/admin/QcAdminCompletion.h>

Classes

struct Sources

Functions

const QcMsg::AdminCatalogue::Command *command(const QcMsg::AdminCatalogue &catalogue, QStringView name)
QStringList complete(const QString &line, const QcAdminCompletion::Sources &sources, qsizetype limit = 50)
QList<QcCommandSyntax::Parameter> parameters(const QString &line, const QcMsg::AdminCatalogue &catalogue)

Detailed Description

Pure: everything it offers comes from its arguments.

Classes

class Sources

What completion takes its words from. More...

Function Documentation

const QcMsg::AdminCatalogue::Command *QcAdminCompletion::command(const QcMsg::AdminCatalogue &catalogue, QStringView name)

Returns the command of catalogue named name (or with that alias); nullptr when there is none.

QStringList QcAdminCompletion::complete(const QString &line, const QcAdminCompletion::Sources &sources, qsizetype limit = 50)

Returns the whole lines line may become by completing its last word from sources (a trailing space starts a new word), sorted, at most limit.

QList<QcCommandSyntax::Parameter> QcAdminCompletion::parameters(const QString &line, const QcMsg::AdminCatalogue &catalogue)

Returns the parameters the next word of line may be, by the forms of its command's usage in catalogue.