Eneboo - Documentación para desarrolladores
src/qsa/src/kernel/quickcoordobjects.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: quickcoordobjects.h  1.1.4   edited 2006-02-23T15:39:57$
00003 **
00004 ** Copyright (C) 2001-2006 Trolltech AS.  All rights reserved.
00005 **
00006 ** This file is part of the Qt Script for Applications framework (QSA).
00007 **
00008 ** This file may be distributed and/or modified under the terms of the
00009 ** GNU General Public License version 2 as published by the Free Software
00010 ** Foundation and appearing in the file LICENSE.GPL included in the
00011 ** packaging of this file.
00012 **
00013 ** Licensees holding a valid Qt Script for Applications license may use
00014 ** this file in accordance with the Qt Script for Applications License
00015 ** Agreement provided with the Software.
00016 **
00017 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00018 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00019 **
00020 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00021 **   information about QSA Commercial License Agreements.
00022 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00023 **
00024 ** Contact info@trolltech.com if any conditions of this licensing are
00025 ** not clear to you.
00026 **
00027 *****************************************************************************/
00028 
00029 #ifndef QUICKCOORDOBJECTS_H
00030 #define QUICKCOORDOBJECTS_H
00031 
00032 #include "qsclass.h"
00033 #include "quickenv.h"
00034 
00035 class QPoint;
00036 class QSize;
00037 class QRect;
00038 
00039 class QUICKCORE_EXPORT QSPointClass : public QSSharedClass, public QuickEnvClass {
00040 public:
00041     QSPointClass( QSClass *b, QuickInterpreter *i );
00042     QString name() const { return QString::fromLatin1("Point"); }
00043 
00044     virtual QSObject fetchValue( const QSObject *o,
00045                                  const QSMember &mem ) const;
00046     virtual void write( QSObject *objPtr, const QSMember &mem,
00047                         const QSObject &val ) const;
00048 
00049     QString toString( const QSObject * ) const;
00050     QVariant toVariant( const QSObject *obj, QVariant::Type ) const;
00051     QString debugString( const QSObject *obj ) const;
00052 
00053     QSObject construct( const QSList &args ) const;
00054     QSObject construct( const QPoint &p ) const;
00055 
00056     QPoint *point( const QSObject *obj ) const;
00057 
00058 protected:
00059     virtual QSEqualsResult isEqual( const QSObject &a, const QSObject &b ) const;
00060 };
00061 
00062 class QUICKCORE_EXPORT QSSizeClass : public QSSharedClass, public QuickEnvClass {
00063 public:
00064     QSSizeClass( QSClass *b, QuickInterpreter *i );
00065     QString name() const { return QString::fromLatin1("Size"); }
00066 
00067     virtual QSObject fetchValue( const QSObject *o,
00068                                  const QSMember &mem ) const;
00069     virtual void write( QSObject *objPtr, const QSMember &mem,
00070                         const QSObject &val ) const;
00071 
00072 /*     virtual QSObject invoke( QSObject * objPtr, const QSMember &mem, */
00073 /*                           const QSList &args ) const; */
00074 
00075 
00076     QString toString( const QSObject * ) const;
00077     QVariant toVariant( const QSObject *obj, QVariant::Type ) const;
00078     QString debugString( const QSObject *obj ) const;
00079 
00080     QSObject construct( const QSList &args ) const;
00081     QSObject construct( const QSize &s ) const;
00082 
00083     QSize *size( const QSObject *obj ) const;
00084 };
00085 
00086 class  QUICKCORE_EXPORT QSRectClass : public QSSharedClass, public QuickEnvClass {
00087 public:
00088     QSRectClass( QSClass *b, QuickInterpreter *i );
00089     QString name() const { return QString::fromLatin1("Rect"); }
00090 
00091     virtual QSObject fetchValue( const QSObject *o,
00092                                  const QSMember &mem ) const;
00093     virtual void write( QSObject *objPtr, const QSMember &mem,
00094                         const QSObject &val ) const;
00095 
00096     QString toString( const QSObject * ) const;
00097     QVariant toVariant( const QSObject *obj, QVariant::Type ) const;
00098     QString debugString( const QSObject *obj ) const;
00099 
00100     QSObject construct( const QSList &args ) const;
00101     QSObject construct( const QRect &r ) const;
00102 
00103     QRect *rect( const QSObject *obj ) const;
00104 
00105     static QSObject isNull( QSEnv *env );
00106     static QSObject isEmpty( QSEnv *env );
00107     static QSObject contains( QSEnv *env );
00108     static QSObject intersection( QSEnv *env );
00109     static QSObject union_( QSEnv *env );
00110     static QSObject intersects( QSEnv *env );
00111     static QSObject normalize( QSEnv *env );
00112     static void moveLeft( QSEnv *env );
00113     static void moveRight( QSEnv *env );
00114     static void moveTop( QSEnv *env );
00115     static void moveBottom( QSEnv *env );
00116     static void moveBy( QSEnv *env );
00117 
00118 protected:
00119     virtual QSEqualsResult isEqual( const QSObject &a, const QSObject &b ) const;
00120 
00121 private:
00122     static QRect *rect( QSEnv *e );
00123 };
00124 
00125 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'