Eneboo - Documentación para desarrolladores
src/qsa/src/engine/qsdate_object.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qsdate_object.h  1.1.5   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 QSDATE_OBJECT_H
00030 #define QSDATE_OBJECT_H
00031 
00032 #include "qsclass.h"
00033 #include "qsobject.h"
00034 #include "qsfunction.h"
00035 
00036 class QSDateShared;
00037 
00038 class QSDateClass : public QSSharedClass {
00039 public:
00040     QSDateClass( QSClass *b );
00041     QString name() const { return QString::fromLatin1("Date"); }
00042 
00043     bool toBoolean( const QSObject *obj ) const;
00044     double toNumber( const QSObject *obj ) const;
00045     QString toString( const QSObject * ) const;
00046     QVariant toVariant( const QSObject *obj, QVariant::Type ) const;
00047 
00048     QSObject construct( const QSList &args ) const;
00049     QSObject cast( const QSList &args ) const;
00050     QSEqualsResult isEqual( const QSObject &a, const QSObject &b ) const;
00051 
00052     QSObject construct(const QDateTime &) const;
00053 
00054     // static Date functions
00055     static QSObject parse( QSEnv *env );
00056     static QSObject utc( QSEnv *env );
00057     static QSObject toStringStatic( QSEnv *env );
00058     static QSObject toDateString( QSEnv *env );
00059     static QSObject toTimeString( QSEnv *env );
00060     static QSObject toGMTString( QSEnv *env );
00061     static QSObject valueOf( QSEnv *env );
00062     static QSObject getTime( QSEnv *env );
00063     static QSObject getYear( QSEnv *env );
00064 //     static QSObject getFullYear( QSEnv *env );
00065     static QSObject getMonth( QSEnv *env );
00066     static QSObject getDate( QSEnv *env );
00067     static QSObject getDay( QSEnv *env );
00068     static QSObject getHours( QSEnv *env );
00069     static QSObject getMinutes( QSEnv *env );
00070     static QSObject getSeconds( QSEnv *env );
00071     static QSObject getMilliSeconds( QSEnv *env );
00072 //     static QSObject getTimezoneOffset( QSEnv *env );
00073     static QSObject setTime( QSEnv *env );
00074     static QSObject setMilliseconds( QSEnv *env );
00075     static QSObject setSeconds( QSEnv *env );
00076     static QSObject setMinutes( QSEnv *env );
00077     static QSObject setHours( QSEnv *env );
00078     static QSObject setDate( QSEnv *env );
00079     static QSObject setMonth( QSEnv *env );
00080 //     static QSObject setFullYear( QSEnv *env );
00081     static QSObject setYear( QSEnv *env );
00082 
00083 protected:
00084     static QSObject invokeS( QSEnv *env, int id );
00085 
00086     static QSDateShared *dateShared( const QSObject *date );
00087 };
00088 
00089 #endif
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'