Eneboo - Documentación para desarrolladores
|
00001 /**************************************************************************** 00002 ** $Id: quickcolorobject.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 QUICKCOLOROBJECT_H 00030 #define QUICKCOLOROBJECT_H 00031 00032 #include "qsclass.h" 00033 00034 class QColor; 00035 class QPalette; 00036 class QColorGroup; 00037 00038 class QUICKCORE_EXPORT QSColorClass : public QSSharedClass { 00039 public: 00040 QSColorClass( QSClass *b ); 00041 QString name() const { return QString::fromLatin1("Color"); } 00042 00043 virtual QSObject fetchValue( const QSObject *objPtr, const QSMember &mem ) const; 00044 virtual void write( QSObject *objPtr, const QSMember &mem, const QSObject &val ) const; 00045 00046 double toNumber( const QSObject * ) const; 00047 00048 QString toString( const QSObject * ) const; 00049 QVariant toVariant( const QSObject *obj, QVariant::Type ) const; 00050 QString debugString( const QSObject *obj ) const; 00051 00052 QSObject construct( const QSList &args ) const; 00053 QSObject construct( const QColor &c ) const; 00054 00055 static QColor *color( const QSObject *obj ); 00056 00057 static void setRgb( QSEnv *env ); 00058 static QSObject light( QSEnv *env ); 00059 static QSObject dark( QSEnv *env ); 00060 }; 00061 00062 class QUICKCORE_EXPORT QSPaletteClass : public QSSharedClass 00063 { 00064 public: 00065 enum Properties { Disabled, Active, Inactive }; 00066 QSPaletteClass(QSClass *b); 00067 QString name() const { return QString::fromLatin1("Palette"); } 00068 00069 virtual QSObject fetchValue(const QSObject *objPtr, const QSMember &mem) const; 00070 virtual void write(QSObject *objPtr, const QSMember &mem, const QSObject &val) const; 00071 00072 QSObject construct(const QSList &args) const; 00073 QSObject construct(const QPalette &p) const; 00074 00075 QVariant toVariant( const QSObject *obj, QVariant::Type ) const; 00076 00077 static QPalette *palette(const QSObject *obj); 00078 }; 00079 00080 class QUICKCORE_EXPORT QSColorGroupClass : public QSSharedClass 00081 { 00082 public: 00083 QSColorGroupClass(QSClass *b); 00084 QString name() const { return QString::fromLatin1("ColorGroup"); } 00085 00086 virtual QSObject fetchValue(const QSObject *objPtr, const QSMember &mem) const; 00087 virtual void write(QSObject *objPtr, const QSMember &mem, const QSObject &val) const; 00088 00089 QSObject construct(const QSList &args) const; 00090 QSObject construct(const QColorGroup &cg) const; 00091 00092 QVariant toVariant( const QSObject *obj, QVariant::Type ) const; 00093 00094 static QColorGroup *colorGroup(const QSObject *obj); 00095 }; 00096 00097 #endif