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 &) | 
| 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.
| 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(), KLF_DEBUG_BLOCK, KLF_FUNC_NAME, and KLFERR_NOERROR.
| QByteArray KLFUserScriptInfo::categorySpecificXmlConfig | ( | ) | const  [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, and QVariant::toByteArray().
Calls scriptInfo(propId) for the correct id.
Definition at line 517 of file klfuserscript.cpp.
References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfDbg, and userScriptName().