[KLF Backend][KLF Tools][KLF Home]
KLatexFormula Project
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
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]

List of all members.

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 &)

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

Enumerator:
CategorySpecificXmlConfig 

XML representation of the category-specific configuration (QByteArray)

Definition at line 63 of file klfuserscript.h.


Constructor & Destructor Documentation

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, and KLFERR_NOERROR.


Member Function Documentation

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

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.7.6.1. The KLatexFormula website is hosted on sourceforge.net