Sonde v1.1.0
Embeddable Model Context Protocol server for Qt applications
Loading...
Searching...
No Matches
qmltemplatetools.cpp File Reference

ui_template_list, ui_template_save and ui_template_delete: the QML template libraries (design 0023). More...

#include "instance_p.h"
#include "qmltemplates_p.h"
#include "server_p.h"
#include <sonde/schema.h>
#include <QtCore/QDir>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtCore/QJsonArray>
#include <QtCore/QSaveFile>

Namespaces

namespace  Sonde
 Embeddable Model Context Protocol server for Qt applications.

Functions

QStringList Sonde::anonymous_namespace{qmltemplatetools.cpp}::libraryNames (const QString &dir, bool component)
 The names of the templates in dir, or with component of its components, value visualisers (components/values/, as "values/<Type>") included.
QList< LibraryFile > Sonde::anonymous_namespace{qmltemplatetools.cpp}::scanLibraries (const Locations &where)
 Every template and component in every library, in the order ui_open searches them: project, user, then the compiled-in ones.
QString Sonde::anonymous_namespace{qmltemplatetools.cpp}::paramsText (const LibraryFile &f)
 f's settings as "name = default (description)" text, or empty.
QString Sonde::anonymous_namespace{qmltemplatetools.cpp}::listLine (const LibraryFile &f)
 One line describing f, for ui_template_list.
QJsonObject Sonde::anonymous_namespace{qmltemplatetools.cpp}::listJson (const LibraryFile &f)
 f as JSON, for ui_template_list' structured content.
QString Sonde::anonymous_namespace{qmltemplatetools.cpp}::projectLibraryLine (const Locations &where)
 Where the project library is, or why there is none, for replies.
std::optional< Library > Sonde::anonymous_namespace{qmltemplatetools.cpp}::libraryArgument (const QJsonObject &args, QString *error)
 The library an argument names ("project" by default), or nothing with error set.
ToolResult Sonde::anonymous_namespace{qmltemplatetools.cpp}::readTemplate (const QJsonObject &args, const Locations &where)
 ui_template_list with a name: that file's source.
bool Sonde::anonymous_namespace{qmltemplatetools.cpp}::writeFile (const QString &path, const QByteArray &data, QString *error)
 Writes data to path, creating its directory.
ToolResult Sonde::anonymous_namespace{qmltemplatetools.cpp}::listTemplates (const QJsonObject &args)
 The ui_template_list tool.
ToolResult Sonde::anonymous_namespace{qmltemplatetools.cpp}::saveTemplate (const TemplateEngine &engine, const QJsonObject &args)
 The ui_template_save tool.
ToolResult Sonde::anonymous_namespace{qmltemplatetools.cpp}::deleteTemplate (const TemplateEngine &engine, const QJsonObject &args)
 The ui_template_delete tool.

Detailed Description

ui_template_list, ui_template_save and ui_template_delete: the QML template libraries (design 0023).