kexi

metaobject.h

00001 /***************************************************************************
00002  * This file is part of the KDE project
00003  * copyright (C) 2005 by Sebastian Sauer (mail@dipe.org)
00004  * copyright (C) 2005 by Tobi Krebs (tobi.krebs@gmail.com)
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 KOMACRO_METAOBJECT_H
00021 #define KOMACRO_METAOBJECT_H
00022 
00023 #include <qobject.h>
00024 #include <ksharedptr.h>
00025 
00026 #include "komacro_export.h"
00027 
00028 namespace KoMacro {
00029 
00030     // forward declarations.
00031     class Variable;
00032     class MetaMethod;
00033 
00041     class KOMACRO_EXPORT MetaObject : public KShared
00042     {
00043         public:
00044 
00051             explicit MetaObject(QObject* const object);
00052 
00056             ~MetaObject();
00057 
00062             QObject* const object() const;
00063 
00064             //QStrList signalNames() const;
00065             //QStrList slotNames() const;
00066 
00070             int indexOfSignal(const char* signal) const;
00071 
00075             int indexOfSlot(const char* slot) const;
00076 
00081             KSharedPtr<MetaMethod> method(int index);
00082 
00086             KSharedPtr<MetaMethod> signal(const char* signal);
00087 
00091             KSharedPtr<MetaMethod> slot(const char* slot);
00092 
00093 //KSharedPtr<MetaMethod> addSlot(const char* slot);
00094 //void connectSignal(QObject* obj, const char* signal);
00095 
00107             KSharedPtr<Variable> invokeMethod(int index, QValueList< KSharedPtr<Variable> > arguments);
00108 
00109         private:
00111             class Private;
00113             Private* const d;
00114     };
00115 
00116 }
00117 
00118 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys