• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

parley

Public Member Functions | Static Public Member Functions | List of all members
ScriptManager Class Reference

#include <scriptmanager.h>

Inheritance diagram for ScriptManager:
Inheritance graph
[legend]

Public Member Functions

 ScriptManager (Editor::EditorWindow *editor)
 
 ~ScriptManager ()
 
void addObject (QObject *obj, const QString &name)
 
void addScriptAction (const QString &name, KAction *action)
 
void disablePlugin (QString desktopFile)
 
QStringList enabledScripts ()
 
QString getScriptFileName (QString desktopFile)
 
void loadScripts ()
 
void reloadScripts ()
 
Translator * translator ()
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObject * child (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThread * thread () const
 

Static Public Member Functions

static QMap< QString, QString > categories ()
 
static QStringList getDesktopFiles ()
 
static QString getScriptEntry (QString desktopFile)
 
- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Additional Inherited Members

- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

This class finds the scripts installed in the application directory and manages loading and unloading of the scripts.

For each script an instance of Script class is created.

Author
Avgoustinos Kadis avgou.nosp@m.stin.nosp@m.os.ka.nosp@m.dis@.nosp@m.kdema.nosp@m.il.n.nosp@m.et

Definition at line 30 of file scriptmanager.h.

Constructor & Destructor Documentation

ScriptManager::ScriptManager ( Editor::EditorWindow *  editor)

Definition at line 31 of file scriptmanager.cpp.

ScriptManager::~ScriptManager ( )

Definition at line 40 of file scriptmanager.cpp.

Member Function Documentation

void ScriptManager::addObject ( QObject *  obj,
const QString &  name 
)

Adds a QObject as a module for the script.

Parameters
objThe QObject to be added to the script
nameThe name of the object as it will appear in the script

Definition at line 138 of file scriptmanager.cpp.

void ScriptManager::addScriptAction ( const QString &  name,
KAction *  action 
)

Add a KAction to the Scripts menu.

Parameters
nameThe action name
actionKAction to be added

Definition at line 162 of file scriptmanager.cpp.

QMap< QString, QString > ScriptManager::categories ( )
static

Returns a QMap (from from categories codenames to categories display label) to be used in KPluginSelector (ScriptDialog) for displaying the various categories.

Note
this function is not used later on (categories are disabled)
Returns
the QMap described above

Definition at line 57 of file scriptmanager.cpp.

void ScriptManager::disablePlugin ( QString  desktopFile)

Modify the parleyrc configuration so it disables the dektopFile plugin.

This function is to be used when the plugin is invalid (wrong script name, incorrect desktop file etc)

Parameters
desktopFile

Definition at line 100 of file scriptmanager.cpp.

QStringList ScriptManager::enabledScripts ( )

Returns a list of filenames (full path) of enabled scripts.

Definition at line 81 of file scriptmanager.cpp.

QStringList ScriptManager::getDesktopFiles ( )
static

Finds all the available desktop files in {PARLEY_DATA_FOLDER}/plugins.

Returns
The list of desktop filenames available for parley

Definition at line 45 of file scriptmanager.cpp.

QString ScriptManager::getScriptEntry ( QString  desktopFile)
static

Parses the desktop desktopFile given and returns the value of "Script" entry.

Parameters
desktopFileThe .desktop file that will get the value from
Returns
The value of "Script" entry. Empty string of no "Script" entry is found

Definition at line 65 of file scriptmanager.cpp.

QString ScriptManager::getScriptFileName ( QString  desktopFile)

Returns the full path to the script name given in the desktopFile.

Parameters
desktopFileThe desktop file for the parley plugin
Returns
The full-path to the script

Definition at line 74 of file scriptmanager.cpp.

void ScriptManager::loadScripts ( )

Loads (activates) all the available scripts and notifies the user if any script was not activated (due to errors in the script)

Definition at line 112 of file scriptmanager.cpp.

void ScriptManager::reloadScripts ( )

Reloads all the scripts.

Definition at line 144 of file scriptmanager.cpp.

Translator* ScriptManager::translator ( )
inline

returns the Translator object the Scripting::Parley

Definition at line 111 of file scriptmanager.h.


The documentation for this class was generated from the following files:
  • scriptmanager.h
  • scriptmanager.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

parley

Skip menu "parley"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal