metaparameter.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_METAPARAMETER_H
21#define KOMACRO_METAPARAMETER_H
22
23#include <tqstring.h>
24#include <tqvariant.h>
25#include <tqobject.h>
26#include <ksharedptr.h>
27
28#include "komacro_export.h"
29
30namespace KoMacro {
31
32 // Forward declarations.
33 class Variable;
34
42 class KOMACRO_EXPORT MetaParameter : public TDEShared
43 {
44
48 TQ_PROPERTY(Type type READ type)
49
50
53 TQ_PROPERTY(TQString typeName READ typeName)
54
55 public:
56
60 typedef TQValueList<TDESharedPtr <MetaParameter > > List;
61
70 explicit MetaParameter(const TQString& signatureargument = TQString());
71
76
80 enum Type {
81 TypeNone = 0,
83 TypeObject
84 };
85
89 Type type() const;
90
95 const TQString typeName() const;
96
100 void setType(Type type);
101
105 TQVariant::Type variantType() const;
106
110 void setVariantType(TQVariant::Type varianttype);
111
117 bool validVariable(TDESharedPtr<Variable> variable) const;
118
119 protected:
120
125 void setSignatureArgument(const TQString& signatureargument);
126
127 private:
129 class Private;
131 Private* const d;
132 };
133
134}
135
136#endif
Class to provide abstract methods for the undocumented TQt3 TQUObject-API functionality.
TQValueList< TDESharedPtr< MetaParameter > > List
Property to get the type of the variable.
Type
Possible types the MetaParameter could provide.
@ TypeVariant
None type, the MetaParameter is empty.