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

parley

  • sources
  • kde-4.14
  • kdeedu
  • parley
  • src
  • scripts
scriptmanager.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  Copyright 2008 Avgoustinos Kadis <avgoustinos.kadis@kdemail.net>
4 
5  ***************************************************************************/
6 
7 /***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 #ifndef SCRIPTMANAGER_H
16 #define SCRIPTMANAGER_H
17 
18 #include "script.h"
19 
20 #include "editor/editor.h"
21 
22 #include <QStringList>
23 
24 
30 class ScriptManager : public QObject
31 {
32 public:
33  ScriptManager(Editor::EditorWindow * editor);
34 
35  ~ScriptManager();
36 
42  static QStringList getDesktopFiles();
43 
53  static QMap<QString, QString> categories();
54 
61  static QString getScriptEntry(QString desktopFile);
62 
69  QString getScriptFileName(QString desktopFile);
70 
74  QStringList enabledScripts();
75 
83  void disablePlugin(QString desktopFile);
84 
89  void loadScripts();
90 
96  void addObject(QObject * obj, const QString & name);
97 
101  void reloadScripts();
102 
108  void addScriptAction(const QString & name, KAction * action);
109 
111  Translator * translator() {
112  return m_scriptingParley->translator();
113  }
114 
115 private:
116  Editor::EditorWindow * m_editor;
117  QList<Script*> m_scripts;
118  QMap<QString, QObject*> m_scriptObjects;
119  QList<QAction*> m_scriptActions;
120 
122  Scripting::Parley* m_scriptingParley;
123 };
124 
125 #endif
ScriptManager::ScriptManager
ScriptManager(Editor::EditorWindow *editor)
Definition: scriptmanager.cpp:31
ScriptManager::enabledScripts
QStringList enabledScripts()
Returns a list of filenames (full path) of enabled scripts.
Definition: scriptmanager.cpp:81
ScriptManager::addObject
void addObject(QObject *obj, const QString &name)
Adds a QObject as a module for the script.
Definition: scriptmanager.cpp:138
ScriptManager::addScriptAction
void addScriptAction(const QString &name, KAction *action)
Add a KAction to the Scripts menu.
Definition: scriptmanager.cpp:162
ScriptManager::translator
Translator * translator()
returns the Translator object the Scripting::Parley
Definition: scriptmanager.h:111
ScriptManager::getScriptEntry
static QString getScriptEntry(QString desktopFile)
Parses the desktop desktopFile given and returns the value of "Script" entry.
Definition: scriptmanager.cpp:65
QMap< QString, QString >
script.h
editor.h
ScriptManager::getScriptFileName
QString getScriptFileName(QString desktopFile)
Returns the full path to the script name given in the desktopFile.
Definition: scriptmanager.cpp:74
QObject::name
const char * name() const
ScriptManager::reloadScripts
void reloadScripts()
Reloads all the scripts.
Definition: scriptmanager.cpp:144
QObject
QString
QList< Script * >
QStringList
Translator
Keeps the translated words.
Definition: translator.h:74
ScriptManager::loadScripts
void loadScripts()
Loads (activates) all the available scripts and notifies the user if any script was not activated (du...
Definition: scriptmanager.cpp:112
Scripting::Parley
Parley scripting class (main entry point of a Parley Kross script)
Definition: parley.h:152
ScriptManager::categories
static QMap< QString, QString > categories()
Returns a QMap (from from categories codenames to categories display label) to be used in KPluginSele...
Definition: scriptmanager.cpp:57
Editor::EditorWindow
Definition: editor.h:50
ScriptManager
This class finds the scripts installed in the application directory and manages loading and unloading...
Definition: scriptmanager.h:30
ScriptManager::~ScriptManager
~ScriptManager()
Definition: scriptmanager.cpp:40
ScriptManager::getDesktopFiles
static QStringList getDesktopFiles()
Finds all the available desktop files in {PARLEY_DATA_FOLDER}/plugins.
Definition: scriptmanager.cpp:45
ScriptManager::disablePlugin
void disablePlugin(QString desktopFile)
Modify the parleyrc configuration so it disables the dektopFile plugin.
Definition: scriptmanager.cpp:100
Scripting::Parley::translator
Translator * translator()
Definition: parley.h:225
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:15:56 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