Kig Python Scripting API Documentation

bogus_imp.h

00001 // Copyright (C)  2002  Dominique Devriese <devriese@kde.org>
00002 
00003 // This program is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU General Public License
00005 // as published by the Free Software Foundation; either version 2
00006 // of the License, or (at your option) any later version.
00007 
00008 // This program is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011 // GNU General Public License for more details.
00012 
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00016 // 02110-1301, USA.
00017 
00018 #ifndef BOGUS_IMP_H
00019 #define BOGUS_IMP_H
00020 
00021 #include "object_imp.h"
00022 #include "../misc/object_hierarchy.h"
00023 #include "../misc/kigtransform.h"
00024 
00025 #include <qstring.h>
00026 
00037 class BogusImp
00038   : public ObjectImp
00039 {
00040   typedef ObjectImp Parent;
00041 public:
00045   static const ObjectImpType* stype();
00046 
00047   Coordinate attachPoint( ) const;
00048   void draw( KigPainter& p ) const;
00049   bool contains( const Coordinate& p, int width, const KigWidget& w ) const;
00050   bool inRect( const Rect& r, int width, const KigWidget& w ) const;
00051   Rect surroundingRect() const;
00052 
00053   ObjectImp* transform( const Transformation& ) const;
00054 };
00055 
00061 class InvalidImp
00062   : public BogusImp
00063 {
00064 public:
00068   static const ObjectImpType* stype();
00069   typedef BogusImp Parent;
00070 
00074   InvalidImp();
00075   InvalidImp* copy() const;
00076 
00077   const ObjectImpType* type() const;
00078   void visit( ObjectImpVisitor* vtor ) const;
00079 
00080   bool canFillInNextEscape() const;
00081   void fillInNextEscape( QString& s, const KigDocument& ) const;
00082 
00083   bool equals( const ObjectImp& rhs ) const;
00084 };
00085 
00089 class DoubleImp
00090   : public BogusImp
00091 {
00092   double mdata;
00093 public:
00097   static const ObjectImpType* stype();
00098   typedef BogusImp Parent;
00099 
00103   DoubleImp( const double d );
00104 
00108   double data() const { return mdata; }
00112   void setData( double d ) { mdata = d; }
00113 
00114   DoubleImp* copy() const;
00115 
00116   const ObjectImpType* type() const;
00117   void visit( ObjectImpVisitor* vtor ) const;
00118 
00119   bool canFillInNextEscape() const;
00120   void fillInNextEscape( QString& s, const KigDocument& ) const;
00121 
00122   bool equals( const ObjectImp& rhs ) const;
00123 };
00124 
00128 class IntImp
00129   : public BogusImp
00130 {
00131   int mdata;
00132 public:
00136   static const ObjectImpType* stype();
00137   typedef BogusImp Parent;
00138 
00142   IntImp( const int d );
00143 
00147   int data() const { return mdata; }
00151   void setData( int d )  { mdata = d; }
00152 
00153   IntImp* copy() const;
00154 
00155   const ObjectImpType* type() const;
00156   void visit( ObjectImpVisitor* vtor ) const;
00157 
00158   bool canFillInNextEscape() const;
00159   void fillInNextEscape( QString& s, const KigDocument& ) const;
00160 
00161   bool equals( const ObjectImp& rhs ) const;
00162 };
00163 
00167 class StringImp
00168   : public BogusImp
00169 {
00170   QString mdata;
00171 public:
00175   static const ObjectImpType* stype();
00176   typedef BogusImp Parent;
00177 
00181   StringImp( const QString& d );
00182 
00186   const QString& data() const { return mdata; }
00190   void setData( const QString& s ) { mdata = s; }
00191 
00192   StringImp* copy() const;
00193 
00194   const ObjectImpType* type() const;
00195   void visit( ObjectImpVisitor* vtor ) const;
00196 
00197   bool canFillInNextEscape() const;
00198   void fillInNextEscape( QString& s, const KigDocument& ) const;
00199 
00200   bool equals( const ObjectImp& rhs ) const;
00201 };
00202 
00203 class HierarchyImp
00204   : public BogusImp
00205 {
00206   ObjectHierarchy mdata;
00207 public:
00208   static const ObjectImpType* stype();
00209   typedef BogusImp Parent;
00210 
00211   HierarchyImp( const ObjectHierarchy& h );
00212 
00213   const ObjectHierarchy& data() const { return mdata; }
00214   void setData( const ObjectHierarchy& h ) { mdata = h; }
00215 
00216   HierarchyImp* copy() const;
00217   const char* baseName() const;
00218 
00219   const ObjectImpType* type() const;
00220   void visit( ObjectImpVisitor* vtor ) const;
00221 
00222   bool equals( const ObjectImp& rhs ) const;
00223 };
00224 
00232 class TransformationImp
00233   : public BogusImp
00234 {
00235   Transformation mdata;
00236 public:
00237   static const ObjectImpType* stype();
00238   typedef BogusImp Parent;
00239 
00240   TransformationImp( const Transformation& h );
00241 
00242   const Transformation& data() const { return mdata; }
00243   void setData( const Transformation& h ) { mdata = h; }
00244 
00245   TransformationImp* copy() const;
00246 
00247   const ObjectImpType* type() const;
00248   void visit( ObjectImpVisitor* vtor ) const;
00249 
00250   bool equals( const ObjectImp& rhs ) const;
00251 };
00252 
00253 class TestResultImp
00254   : public BogusImp
00255 {
00256   const QString mdata;
00257 public:
00258   static const ObjectImpType* stype();
00259   typedef BogusImp Parent;
00260 
00261   TestResultImp( const QString& s );
00262 
00263   TestResultImp* copy() const;
00264 
00265   const QString& data() const { return mdata; }
00266 
00267   const ObjectImpType* type() const;
00268   void visit( ObjectImpVisitor* vtor ) const;
00269 
00270   const uint numberOfProperties() const;
00271   const QCStringList properties() const;
00272   const QCStringList propertiesInternalNames() const;
00273   ObjectImp* property( uint which, const KigDocument& d ) const;
00274   const char* iconForProperty( uint which ) const;
00275   const ObjectImpType* impRequirementForProperty( uint which ) const;
00276   bool isPropertyDefinedOnOrThroughThisImp( uint which ) const;
00277 
00278   bool equals( const ObjectImp& rhs ) const;
00279 };
00280 
00281 #endif
KDE Logo
This file is part of the documentation for kdelibs 0.10.7.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Jun 29 18:05:21 2008 by doxygen 1.5.6 written by Dimitri van Heesch, © 1997-2001