kexi

metamethod.h
1/***************************************************************************
2 * This file is part of the KDE project
3 * copyright (C) 2005 by Sebastian Sauer (mail@dipe.org)
4 * copyright (C) 2005 by Tobi Krebs (tobi.krebs@gmail.com)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KOMACRO_METAMETHOD_H
21#define KOMACRO_METAMETHOD_H
22
23#include <tqstring.h>
24#include <tqvaluelist.h>
25#include <ksharedptr.h>
26
27#include "komacro_export.h"
28
29struct TQUObject;
30
31namespace KoMacro {
32
33 // forward declarations.
34 class Variable;
35 class MetaObject;
36 class MetaParameter;
37 class MetaProxy;
38
46 class KOMACRO_EXPORT MetaMethod : public TDEShared
47 {
48 public:
49
54 enum Type {
55 Signal,
58 };
59
72 explicit MetaMethod(const TQString& signature, Type type = Unknown, TDESharedPtr<MetaObject> object = 0);
73
78
83 TDESharedPtr<MetaObject> const object() const;
84
89 const TQString signature() const;
90
96 const TQString signatureTag() const;
97
103 const TQString signatureArguments() const;
104
109 Type type() const;
110
115 TQValueList< TDESharedPtr<MetaParameter> > arguments() const;
116
121 TQUObject* toTQUObject(TQValueList< TDESharedPtr<Variable> > arguments);
122
127 TDESharedPtr<Variable> toVariable(TQUObject* uo);
128
133 TQValueList< TDESharedPtr<Variable> > toVariableList(TQUObject* uo);
134
139 TDESharedPtr<Variable> invoke(TQValueList< TDESharedPtr<Variable> > arguments);
140
141 private:
143 class Private;
145 Private* const d;
146 };
147
148}
149
150#endif
Class to provide abstract methods for the undocumented TQt3 TQUObject-API functionality.
Definition metamethod.h:47
Type
The type of method this MetaMethod provides access to.
Definition metamethod.h:54
@ Slot
The MetaMethod points to a TQt signal.
Definition metamethod.h:56
@ Unknown
The MetaMethod points to a TQt slot.
Definition metamethod.h:57
MetaMethod(const TQString &signature, Type type=Unknown, TDESharedPtr< MetaObject > object=0)
Constructor.
Class to provide abstract access to extended TQObject functionality like the undocumented TQUObject-A...
Definition metaobject.h:42
Class to provide abstract methods for the undocumented TQt3 TQUObject-API functionality.
A variable value used to provide abstract access to variables.
Definition variable.h:39