[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KLFUserScriptInfo Class Reference

Summary of the info returned by a user script. More...

#include <klfuserscript.h>

Inheritance diagram for KLFUserScriptInfo:
Inheritance graph
[legend]
Collaboration diagram for KLFUserScriptInfo:
Collaboration graph
[legend]

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 &copy)
 
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, QVariantqueryDefaultSettings (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, QVariantallProperties () 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, QStringusConfigToStrMap (const QVariantMap &usconfig)
 
static QStringList usConfigToEnvList (const QVariantMap &usconfig)
 

Protected Member Functions

void internalSetProperty (const QString &key, const QVariant &val)
 
const KLFPropertizedObjectpobj ()
 
QByteArray categorySpecificXmlConfig () const
 The XML for the category-specific config. More...
 
void setScriptInfoError (int code, const QString &msg)
 

Detailed Description

Summary of the info returned by a user script.

See also User Scripts .

Definition at line 37 of file klfuserscript.h.

Member Enumeration Documentation

◆ Properties

Enumerator
CategorySpecificXmlConfig 

XML representation of the category-specific configuration (QByteArray)

Definition at line 63 of file klfuserscript.h.

Constructor & Destructor Documentation

◆ KLFUserScriptInfo()

KLFUserScriptInfo::KLFUserScriptInfo ( const QString userScriptPath)
Parameters
klfuserscriptpathis 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, KLFAbstractPropertizedObject::KLFAbstractPropertizedObject(), and KLFERR_NOERROR.

Referenced by htmlInfo().

Member Function Documentation

◆ categorySpecificXmlConfig()

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 propId.

Referenced by htmlInfo().

◆ scriptInfo()

QVariant KLFUserScriptInfo::scriptInfo ( const QString key) const

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().


The documentation for this class was generated from the following files:

Generated by doxygen 1.8.13