• 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
script.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 SCRIPT_H
16 #define SCRIPT_H
17 
18 #include "scripting/parley.h"
19 
20 #include <QString>
21 #include <QObject>
22 #include <QPointer>
23 #include <QMap>
24 
31 class Script: public QObject
32 {
33  Q_OBJECT
34 public:
40  Script(QString file);
41  ~Script();
45  bool isActivated();
49  void activate();
53  void deactivate();
61  bool exists();
65  QString fileName();
71  void addObject(QString name, QObject * object);
76  void addObjects(QMap<QString, QObject*> objects);
80  QString errorMessage();
81 private:
82  bool m_activated;
83  QString m_file;
84  QPointer<QObject> m_object;
85  QMap<QString, QObject*> m_scriptObjects;
86  QString m_errorMessage;
87 };
88 
89 #endif
Script::addObjects
void addObjects(QMap< QString, QObject * > objects)
Adds more than one scripting Objects to the script.
Definition: script.cpp:116
Script::isActivated
bool isActivated()
Returns true if the script was successfully activated; false otherwise.
Definition: script.cpp:36
QMap< QString, QObject * >
QPointer< QObject >
parley.h
QObject::name
const char * name() const
Script
This class represents the activated script and is used by the ScriptManager to activate/deactivate sc...
Definition: script.h:31
QObject
QString
Script::deactivate
void deactivate()
Deactivate the script.
Definition: script.cpp:90
Script::errorMessage
QString errorMessage()
Returns an html error message if there have been errors in the script.
Definition: script.cpp:121
Script::~Script
~Script()
Definition: script.cpp:30
Script::fileName
QString fileName()
Returns the file that was given as parameter to the constructor.
Definition: script.cpp:104
Script::activate
void activate()
Activates the script.
Definition: script.cpp:42
Script::addObject
void addObject(QString name, QObject *object)
Add an object to be accessible by the script.
Definition: script.cpp:110
Script::exists
bool exists()
Checks if the script file assigned to the Script object exists as a file on the given path...
Definition: script.cpp:97
Script::Script
Script(QString file)
Script class constructor.
Definition: script.cpp:23
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