F:/KPlato/koffice/libs/kross/core/manager.h

Aller à la documentation de ce fichier.
00001 /***************************************************************************
00002  * manager.h
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2006 by Sebastian Sauer (mail@dipe.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Library General Public License for more details.
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this program; see the file COPYING.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
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     // Forward declarations.
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 

Généré le Wed Nov 22 23:41:11 2006 pour KPlato par  doxygen 1.5.1-p1