Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/image/qpixmapdata_p.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information (qt-info@nokia.com)
     4** All rights reserved.
     5** Contact: Nokia Corporation (qt-info@nokia.com)
    56**
    67** This file is part of the QtGui module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you have questions regarding the use of this file, please contact
     37** Nokia at qt-info@nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    6767        PixmapType, BitmapType
    6868    };
     69#if defined(Q_OS_SYMBIAN)
     70    enum NativeType {
     71        FbsBitmap,
     72        SgImage
     73    };
     74#endif
    6975    enum ClassId { RasterClass, X11Class, MacClass, DirectFBClass,
    7076                   OpenGLClass, OpenVGClass, CustomClass = 1024 };
    7177
    72     QPixmapData(PixelType pixelpType, int classId);
     78    QPixmapData(PixelType pixelType, int classId);
    7379    virtual ~QPixmapData();
     80
     81    virtual QPixmapData *createCompatiblePixmapData() const;
    7482
    7583    virtual void resize(int width, int height) = 0;
    7684    virtual void fromImage(const QImage &image,
    7785                           Qt::ImageConversionFlags flags) = 0;
    78     virtual void fromFile(const QString &filename, const char *format,
     86
     87    virtual bool fromFile(const QString &filename, const char *format,
    7988                          Qt::ImageConversionFlags flags);
     89    virtual bool fromData(const uchar *buffer, uint len, const char *format,
     90                          Qt::ImageConversionFlags flags);
     91
    8092    virtual void copy(const QPixmapData *data, const QRect &rect);
     93    virtual bool scroll(int dx, int dy, const QRect &rect);
    8194
    8295    virtual int metric(QPaintDevice::PaintDeviceMetric metric) const = 0;
     
    99112    virtual QImage* buffer();
    100113
    101     int width() const { return metric(QPaintDevice::PdmWidth); }
    102     int height() const { return metric(QPaintDevice::PdmHeight); }
    103     int numColors() const { return metric(QPaintDevice::PdmNumColors); }
    104     int depth() const { return metric(QPaintDevice::PdmDepth); }
     114    inline int width() const { return w; }
     115    inline int height() const { return h; }
     116    QT_DEPRECATED inline int numColors() const { return metric(QPaintDevice::PdmNumColors); }
     117    inline int colorCount() const { return metric(QPaintDevice::PdmNumColors); }
     118    inline int depth() const { return d; }
     119    inline bool isNull() const { return is_null; }
     120
     121#if defined(Q_OS_SYMBIAN)
     122    virtual void* toNativeType(NativeType type);
     123    virtual void fromNativeType(void* pixmap, NativeType type);
     124#endif
     125
     126    static QPixmapData *create(int w, int h, PixelType type);
    105127
    106128protected:
    107129    void setSerialNumber(int serNo);
     130    int w;
     131    int h;
     132    int d;
     133    bool is_null;
    108134
    109135private:
    110136    friend class QPixmap;
    111     friend class QGLContextPrivate;
    112137    friend class QX11PixmapData;
     138    friend class QS60PixmapData;
     139    friend class QImagePixmapCleanupHooks; // Needs to set is_cached
     140    friend class QGLTextureCache; //Needs to check the reference count
     141    friend class QExplicitlySharedDataPointer<QPixmapData>;
    113142
    114143    QAtomicInt ref;
     
    120149    uint is_cached;
    121150};
    122 
    123 #ifdef Q_WS_WIN
    124 #ifndef Q_OS_WINCE
    125 QPixmap convertHIconToPixmap( const HICON icon);
    126 #else
    127 QPixmap convertHIconToPixmap( const HICON icon, bool large = false);
    128 #endif
    129 QPixmap loadIconFromShell32( int resourceId, int size );
    130 #endif
    131151
    132152#  define QT_XFORM_TYPE_MSBFIRST 0
Note: See TracChangeset for help on using the changeset viewer.