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 #include <QString>
00024 #include <QStringList>
00025 #include <QMap>
00026 #include <QObject>
00027
00028 #include "krossconfig.h"
00029 #include "childreninterface.h"
00030
00031 class QAbstractItemModel;
00032 class KActionCollection;
00033 class KMenu;
00034
00035 namespace Kross {
00036
00037
00038 class Interpreter;
00039 class Action;
00040 class ActionCollection;
00041 class InterpreterInfo;
00042
00051 class KROSSCORE_EXPORT Manager : public QObject, public ChildrenInterface
00052 {
00053 Q_OBJECT
00054
00055 protected:
00056
00061 Manager();
00062
00063 public:
00064
00068 ~Manager();
00069
00074 static Manager& self();
00075
00080 QHash<QString, InterpreterInfo*> interpreterInfos() const;
00081
00086 bool hasInterpreterInfo(const QString& interpretername) const;
00087
00093 InterpreterInfo* interpreterInfo(const QString& interpretername) const;
00094
00105 const QString interpreternameForFile(const QString& file);
00106
00116 Interpreter* interpreter(const QString& interpretername) const;
00117
00118 #if 0
00119
00123 bool readConfig();
00124
00128 bool writeConfig();
00129 #endif
00130
00136 ActionCollection* actionCollection() const;
00137
00138 public slots:
00139
00145 QStringList interpreters() const;
00146
00152 bool hasAction(const QString& name);
00153
00159 QObject* action(const QString& name);
00160
00170 QObject* module(const QString& modulename);
00171
00172 signals:
00173
00177 void started(Kross::Action*);
00178
00182 void finished(Kross::Action*);
00183
00184 private:
00186 class Private;
00188 Private* const d;
00189 };
00190
00191 }
00192
00193 #endif
00194