Summary of the info returned by a user script. More...
#include <klfuserscript.h>


Public Types | |
| enum | Properties { ExeScript = 0 , Category , Name , Author , Version , License , KLFMinVersion , KLFMaxVersion , SettingsFormUI , CanProvideDefaultSettings , CategorySpecificXmlConfig } |
Public Member Functions | |
| KLFUserScriptInfo (const QString &userScriptPath) | |
| KLFUserScriptInfo (const KLFUserScriptInfo ©) | |
| int | scriptInfoError () const |
| QString | scriptInfoErrorString () const |
| QString | userScriptPath () const |
| e.g. "/path/to/klffeynmf.klfuserscript" | |
| QString | userScriptName () const |
| e.g. "klffeynmf.klfuserscript" | |
| QString | userScriptBaseName () const |
| e.g. "klffeynmf" | |
| QString | relativeFile (const QString &fname) const |
| QString | exeScript () const |
| QString | exeScriptFullPath () const |
| QString | category () const |
| QString | name () const |
| QString | author () const |
| QStringList | authorList () const |
| QString | version () const |
| QString | license () const |
| QString | klfMinVersion () const |
| QString | klfMaxVersion () const |
| QString | settingsFormUI () const |
| A UI widget form file (Qt designer file) to display for setting up the user script. | |
| bool | canProvideDefaultSettings () const |
| QMap< QString, QVariant > | queryDefaultSettings (const KLFBackend::klfSettings *settings=NULL) const |
| bool | hasNotices () const |
| QStringList | notices () const |
| bool | hasWarnings () const |
| QStringList | warnings () const |
| bool | hasErrors () const |
| QStringList | errors () const |
| QString | htmlInfo (const QString &extra_css=QString()) const |
| Formats most (all?) properties in HTML, suitable for human-readable text display. | |
| QVariant | scriptInfo (int propId) const |
| QVariant | scriptInfo (const QString &key) const |
| QStringList | scriptInfosList () const |
| A list of Keys (eg. "Name", "Author", ... including custom infos) found in the scriptinfo. | |
| virtual QString | objectKind () const |
| virtual QVariant | property (const QString &propName) const |
| virtual QStringList | propertyNameList () const |
| virtual bool | setProperty (const QString &, const QVariant &) |
| Public Member Functions inherited from KLFAbstractPropertizedObject | |
| virtual QMap< QString, QVariant > | allProperties () const |
| virtual bool | setAllProperties (const QMap< QString, QVariant > &data) |
| virtual bool | hasFixedTypes () const |
| virtual QByteArray | typeNameFor (const QString &property) const |
| virtual QByteArray | typeSpecificationFor (const QString &property) const |
Static Public Member Functions | |
| static bool | hasScriptInfoInCache (const QString &userScriptPath) |
| static KLFUserScriptInfo | forceReloadScriptInfo (const QString &scriptFileName) |
| static void | clearCacheAll () |
| static QMap< QString, QString > | usConfigToStrMap (const QVariantMap &usconfig) |
| static QStringList | usConfigToEnvList (const QVariantMap &usconfig) |
Protected Member Functions | |
| void | internalSetProperty (const QString &key, const QVariant &val) |
| const KLFPropertizedObject * | pobj () |
| QByteArray | categorySpecificXmlConfig () const |
| The XML for the category-specific config. | |
| void | setScriptInfoError (int code, const QString &msg) |
Summary of the info returned by a user script.
See also User Scripts .
Definition at line 37 of file klfuserscript.h.
| Enumerator | |
|---|---|
| CategorySpecificXmlConfig | XML representation of the category-specific configuration (QByteArray). |
Definition at line 63 of file klfuserscript.h.
| KLFUserScriptInfo::KLFUserScriptInfo | ( | const QString & | userScriptPath | ) |
| klfuserscriptpath | is the path to the "xxx.klfuserscript" directory |
Definition at line 317 of file klfuserscript.cpp.
References QFileInfo::baseName(), QFileInfo::canonicalFilePath(), QFileInfo::fileName(), and KLFERR_NOERROR.
| KLFUserScriptInfo::KLFUserScriptInfo | ( | const KLFUserScriptInfo & | copy | ) |
Definition at line 341 of file klfuserscript.cpp.
|
virtual |
Definition at line 348 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::author | ( | ) | const |
Definition at line 395 of file klfuserscript.cpp.
| QStringList KLFUserScriptInfo::authorList | ( | ) | const |
Definition at line 396 of file klfuserscript.cpp.
| bool KLFUserScriptInfo::canProvideDefaultSettings | ( | ) | const |
Definition at line 403 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::category | ( | ) | const |
Definition at line 393 of file klfuserscript.cpp.
|
protected |
The XML for the category-specific config.
This class is meant to be accessed by subclasses who parse this XML and expose a higher level API.
Definition at line 485 of file klfuserscript.cpp.
References CategorySpecificXmlConfig.
|
static |
Definition at line 301 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::exeScript | ( | ) | const |
Definition at line 387 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::exeScriptFullPath | ( | ) | const |
Definition at line 388 of file klfuserscript.cpp.
|
static |
Definition at line 286 of file klfuserscript.cpp.
| bool KLFUserScriptInfo::hasErrors | ( | ) | const |
Definition at line 499 of file klfuserscript.cpp.
| bool KLFUserScriptInfo::hasNotices | ( | ) | const |
Definition at line 491 of file klfuserscript.cpp.
|
static |
Definition at line 309 of file klfuserscript.cpp.
| bool KLFUserScriptInfo::hasWarnings | ( | ) | const |
Definition at line 495 of file klfuserscript.cpp.
Formats most (all?) properties in HTML, suitable for human-readable text display.
Definition at line 565 of file klfuserscript.cpp.
References QString::toHtmlEscaped(), QObject::tr(), and userScriptName().
Definition at line 545 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::klfMaxVersion | ( | ) | const |
Definition at line 400 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::klfMinVersion | ( | ) | const |
Definition at line 399 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::license | ( | ) | const |
Definition at line 398 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::name | ( | ) | const |
Definition at line 394 of file klfuserscript.cpp.
|
virtual |
Implements KLFAbstractPropertizedObject.
Definition at line 541 of file klfuserscript.cpp.
|
protected |
Definition at line 550 of file klfuserscript.cpp.
Implements KLFAbstractPropertizedObject.
Definition at line 122 of file klfuserscript.h.
|
inlinevirtual |
Implements KLFAbstractPropertizedObject.
Definition at line 123 of file klfuserscript.h.
| QMap< QString, QVariant > KLFUserScriptInfo::queryDefaultSettings | ( | const KLFBackend::klfSettings * | settings = NULL | ) | const |
Definition at line 405 of file klfuserscript.cpp.
Definition at line 382 of file klfuserscript.cpp.
Calls scriptInfo(propId) for the correct id.
Definition at line 517 of file klfuserscript.cpp.
References userScriptName().
| QVariant KLFUserScriptInfo::scriptInfo | ( | int | propId | ) | const |
Definition at line 512 of file klfuserscript.cpp.
| int KLFUserScriptInfo::scriptInfoError | ( | ) | const |
Definition at line 366 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::scriptInfoErrorString | ( | ) | const |
Definition at line 370 of file klfuserscript.cpp.
| QStringList KLFUserScriptInfo::scriptInfosList | ( | ) | const |
A list of Keys (eg. "Name", "Author", ... including custom infos) found in the scriptinfo.
Definition at line 536 of file klfuserscript.cpp.
Implements KLFAbstractPropertizedObject.
Definition at line 124 of file klfuserscript.h.
|
protected |
Definition at line 376 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::settingsFormUI | ( | ) | const |
A UI widget form file (Qt designer file) to display for setting up the user script.
Definition at line 401 of file klfuserscript.cpp.
|
static |
Definition at line 638 of file klfuserscript.cpp.
Definition at line 629 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::userScriptBaseName | ( | ) | const |
e.g. "klffeynmf"
Definition at line 361 of file klfuserscript.cpp.
| QString KLFUserScriptInfo::userScriptName | ( | ) | const |
e.g. "klffeynmf.klfuserscript"
Definition at line 357 of file klfuserscript.cpp.
Referenced by htmlInfo(), and scriptInfo().
| QString KLFUserScriptInfo::userScriptPath | ( | ) | const |
e.g. "/path/to/klffeynmf.klfuserscript"
Definition at line 353 of file klfuserscript.cpp.
Referenced by KLFBackend::getLatexFormula().
| QString KLFUserScriptInfo::version | ( | ) | const |
Definition at line 397 of file klfuserscript.cpp.