Kig Python Scripting API Documentation

bogus_imp.h
1// Copyright (C) 2002 Dominique Devriese <devriese@kde.org>
2
3// This program is free software; you can redistribute it and/or
4// modify it under the terms of the GNU General Public License
5// as published by the Free Software Foundation; either version 2
6// of the License, or (at your option) any later version.
7
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11// GNU General Public License for more details.
12
13// You should have received a copy of the GNU General Public License
14// along with this program; if not, write to the Free Software
15// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16// 02110-1301, USA.
17
18#ifndef BOGUS_IMP_H
19#define BOGUS_IMP_H
20
21#include "object_imp.h"
22#include "../misc/object_hierarchy.h"
23#include "../misc/kigtransform.h"
24
25#include <tqstring.h>
26
37class BogusImp
38 : public ObjectImp
39{
40 typedef ObjectImp Parent;
41public:
45 static const ObjectImpType* stype();
46
48 void draw( KigPainter& p ) const;
49 bool contains( const Coordinate& p, int width, const KigWidget& w ) const;
50 bool inRect( const Rect& r, int width, const KigWidget& w ) const;
51 Rect surroundingRect() const;
52
53 ObjectImp* transform( const Transformation& ) const;
54};
55
61class InvalidImp
62 : public BogusImp
63{
64public:
68 static const ObjectImpType* stype();
69 typedef BogusImp Parent;
70
74 InvalidImp();
75 InvalidImp* copy() const;
76
77 const ObjectImpType* type() const;
78 void visit( ObjectImpVisitor* vtor ) const;
79
80 bool canFillInNextEscape() const;
81 void fillInNextEscape( TQString& s, const KigDocument& ) const;
82
83 bool equals( const ObjectImp& rhs ) const;
84};
85
89class DoubleImp
90 : public BogusImp
91{
92 double mdata;
93public:
97 static const ObjectImpType* stype();
98 typedef BogusImp Parent;
99
103 DoubleImp( const double d );
104
108 double data() const { return mdata; }
112 void setData( double d ) { mdata = d; }
113
114 DoubleImp* copy() const;
115
116 const ObjectImpType* type() const;
117 void visit( ObjectImpVisitor* vtor ) const;
118
119 bool canFillInNextEscape() const;
120 void fillInNextEscape( TQString& s, const KigDocument& ) const;
121
122 bool equals( const ObjectImp& rhs ) const;
123};
124
128class IntImp
129 : public BogusImp
130{
131 int mdata;
132public:
136 static const ObjectImpType* stype();
137 typedef BogusImp Parent;
138
142 IntImp( const int d );
143
147 int data() const { return mdata; }
151 void setData( int d ) { mdata = d; }
152
153 IntImp* copy() const;
154
155 const ObjectImpType* type() const;
156 void visit( ObjectImpVisitor* vtor ) const;
157
158 bool canFillInNextEscape() const;
159 void fillInNextEscape( TQString& s, const KigDocument& ) const;
160
161 bool equals( const ObjectImp& rhs ) const;
162};
163
167class StringImp
168 : public BogusImp
169{
170 TQString mdata;
171public:
175 static const ObjectImpType* stype();
176 typedef BogusImp Parent;
177
181 StringImp( const TQString& d );
182
186 const TQString& data() const { return mdata; }
190 void setData( const TQString& s ) { mdata = s; }
191
192 StringImp* copy() const;
193
194 const ObjectImpType* type() const;
195 void visit( ObjectImpVisitor* vtor ) const;
196
197 bool canFillInNextEscape() const;
198 void fillInNextEscape( TQString& s, const KigDocument& ) const;
199
200 bool equals( const ObjectImp& rhs ) const;
201};
202
203class HierarchyImp
204 : public BogusImp
205{
206 ObjectHierarchy mdata;
207public:
208 static const ObjectImpType* stype();
209 typedef BogusImp Parent;
210
211 HierarchyImp( const ObjectHierarchy& h );
212
213 const ObjectHierarchy& data() const { return mdata; }
214 void setData( const ObjectHierarchy& h ) { mdata = h; }
215
216 HierarchyImp* copy() const;
217 const char* baseName() const;
218
219 const ObjectImpType* type() const;
220 void visit( ObjectImpVisitor* vtor ) const;
221
222 bool equals( const ObjectImp& rhs ) const;
223};
224
232class TransformationImp
233 : public BogusImp
234{
235 Transformation mdata;
236public:
237 static const ObjectImpType* stype();
238 typedef BogusImp Parent;
239
240 TransformationImp( const Transformation& h );
241
242 const Transformation& data() const { return mdata; }
243 void setData( const Transformation& h ) { mdata = h; }
244
245 TransformationImp* copy() const;
246
247 const ObjectImpType* type() const;
248 void visit( ObjectImpVisitor* vtor ) const;
249
250 bool equals( const ObjectImp& rhs ) const;
251};
252
253class TestResultImp
254 : public BogusImp
255{
256 const TQString mdata;
257public:
258 static const ObjectImpType* stype();
259 typedef BogusImp Parent;
260
261 TestResultImp( const TQString& s );
262
263 TestResultImp* copy() const;
264
265 const TQString& data() const { return mdata; }
266
267 const ObjectImpType* type() const;
268 void visit( ObjectImpVisitor* vtor ) const;
269
270 const uint numberOfProperties() const;
271 const QCStringList properties() const;
272 const QCStringList propertiesInternalNames() const;
273 ObjectImp* property( uint which, const KigDocument& d ) const;
274 const char* iconForProperty( uint which ) const;
275 const ObjectImpType* impRequirementForProperty( uint which ) const;
276 bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
277
278 bool equals( const ObjectImp& rhs ) const;
279};
280
281#endif
This is the base class for the so-called BogusObject's.
Definition: bogus_imp.h:39
Object * transform(const Transformation &) const
Return this Object, transformed by the transformation t.
static const ObjectType * stype()
Returns the ObjectType representing the BogusObject type.
Coordinate attachPoint() const
Returns a reference point where to attach labels; when this returns an invalidCoord then the attachme...
The Coordinate class is the basic class representing a 2D location by its x and y components.
Definition: coordinate.h:34
This Object is a BogusObject containing only a double value.
Definition: bogus_imp.h:91
DoubleObject(const double d)
Construct a new DoubleObject containing the value d.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
DoubleObject * copy() const
Returns a copy of this Object.
void setData(double d)
Set the contained data to d.
Definition: bogus_imp.h:112
double data() const
Get hold of the contained data.
Definition: bogus_imp.h:108
static const ObjectType * stype()
Returns the ObjectType representing the DoubleObject type.
This Object is a BogusObject containing only an int value.
Definition: bogus_imp.h:130
IntObject * copy() const
Returns a copy of this Object.
static const ObjectType * stype()
Returns the ObjectType representing the IntObject type.
IntObject(const int d)
Construct a new IntObject containing the value d.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
int data() const
Get hold of the contained data.
Definition: bogus_imp.h:147
void setData(int d)
Set the contained data to d.
Definition: bogus_imp.h:151
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
This Object represents an invalid object.
Definition: bogus_imp.h:63
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
InvalidObject * copy() const
Returns a copy of this Object.
InvalidObject()
Construct a new InvalidObject.
static const ObjectType * stype()
Returns the ObjectType representing the InvalidObject type.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
Instances of this class represent a certain Object type.
Definition: object_imp.h:89
The Object class represents the behaviour of an object after it is calculated.
Definition: object_imp.h:219
virtual Object * copy() const =0
Returns a copy of this Object.
This Object is a BogusObject containing only a string value.
Definition: bogus_imp.h:169
const TQString & data() const
Get hold of the contained data.
Definition: bogus_imp.h:186
const ObjectType * type() const
Returns the lowermost ObjectType that this object is an instantiation of.
bool equals(const Object &rhs) const
Returns true if this Object is equal to rhs.
static const ObjectType * stype()
Returns the ObjectType representing the StringObject type.
StringObject * copy() const
Returns a copy of this Object.
void setData(const TQString &s)
Set the contained data.
Definition: bogus_imp.h:190
StringObject(const TQString &d)
Construct a new StringObject containing the string d.
Class representing a transformation.
Definition: kigtransform.h:38
KDE Logo
This file is part of the documentation for tdelibs .
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed May 15 2024 03:39:42 by doxygen 1.9.4 written by Dimitri van Heesch, © 1997-2001