Kross
manager.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KROSS_MANAGER_H
00021 #define KROSS_MANAGER_H
00022
00023
00024 #include <QtCore/QStringList>
00025 #include <QtCore/QMap>
00026 #include <QtCore/QObject>
00027
00028 #include "krossconfig.h"
00029 #include "childreninterface.h"
00030
00031
00032 namespace Kross {
00033
00034
00035 class Interpreter;
00036 class Action;
00037 class ActionCollection;
00038 class InterpreterInfo;
00039
00048 class KROSSCORE_EXPORT Manager : public QObject, public ChildrenInterface
00049 {
00050 Q_OBJECT
00051
00052 protected:
00053
00058 Manager();
00059
00060 public:
00061
00065 ~Manager();
00066
00071 static Manager& self();
00072
00077 QHash<QString, InterpreterInfo*> interpreterInfos() const;
00078
00083 bool hasInterpreterInfo(const QString& interpretername) const;
00084
00090 InterpreterInfo* interpreterInfo(const QString& interpretername) const;
00091
00102 const QString interpreternameForFile(const QString& file);
00103
00113 Interpreter* interpreter(const QString& interpretername) const;
00114
00120 ActionCollection* actionCollection() const;
00121
00122 public Q_SLOTS:
00123
00129 QStringList interpreters() const;
00130
00136 bool hasAction(const QString& name);
00137
00143 QObject* action(const QString& name);
00144
00154 QObject* module(const QString& modulename);
00155
00160 bool executeScriptFile(const QString& file = QString());
00161
00162 Q_SIGNALS:
00163
00167 void started(Kross::Action*);
00168
00172 void finished(Kross::Action*);
00173
00174 private:
00176 class Private;
00178 Private* const d;
00179 };
00180
00181 }
00182
00183 #endif
00184