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/qpixmap.h

    r342 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**
     
    4747#include <QtCore/qnamespace.h>
    4848#include <QtCore/qstring.h> // char*->QString conversion
     49#include <QtCore/qsharedpointer.h>
    4950#include <QtGui/qimage.h>
    5051#include <QtGui/qtransform.h>
    5152
    5253QT_BEGIN_HEADER
     54
     55#if defined(Q_OS_SYMBIAN)
     56class CFbsBitmap;
     57class RSgImage;
     58#endif
    5359
    5460QT_BEGIN_NAMESPACE
     
    6066class QVariant;
    6167class QX11Info;
     68
     69#if defined(Q_WS_PM)
    6270class QIcon;
     71#endif
    6372
    6473class QPixmapData;
     
    8190    operator QVariant() const;
    8291
    83     bool isNull() const;
     92    bool isNull() const; // ### Qt 5: make inline
    8493    int devType() const;
    8594
    86     int width() const;
    87     int height() const;
     95    int width() const; // ### Qt 5: make inline
     96    int height() const; // ### Qt 5: make inline
    8897    QSize size() const;
    8998    QRect rect() const;
     
    146155
    147156    HBITMAP toWinHBITMAP(HBitmapFormat format = NoAlpha) const;
     157    HICON toWinHICON() const;
     158
    148159    static QPixmap fromWinHBITMAP(HBITMAP hbitmap, HBitmapFormat format = NoAlpha);
     160    static QPixmap fromWinHICON(HICON hicon);
    149161#endif
    150162
     
    162174#endif
    163175
     176#if defined(Q_OS_SYMBIAN)
     177    CFbsBitmap *toSymbianCFbsBitmap() const;
     178    static QPixmap fromSymbianCFbsBitmap(CFbsBitmap *bitmap);
     179    RSgImage* toSymbianRSgImage() const;
     180    static QPixmap fromSymbianRSgImage(RSgImage *sgImage);
     181#endif
     182
    164183    inline QPixmap copy(int x, int y, int width, int height) const;
    165184    QPixmap copy(const QRect &rect = QRect()) const;
     185
     186    inline void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed = 0);
     187    void scroll(int dx, int dy, const QRect &rect, QRegion *exposed = 0);
    166188
    167189    int serialNumber() const;
     
    177199    int qwsBytesPerLine() const;
    178200    QRgb *clut() const;
    179     int numCols() const;
     201#ifdef QT_DEPRECATED
     202    QT_DEPRECATED int numCols() const;
     203#endif
     204    int colorCount() const;
    180205#elif defined(Q_WS_MAC)
    181206    Qt::HANDLE macQDHandle() const;
     
    226251
    227252private:
    228     QPixmapData *data;
     253    QExplicitlySharedDataPointer<QPixmapData> data;
    229254
    230255    bool doImageIO(QImageWriter *io, int quality) const;
     
    252277    friend class QX11PixmapData;
    253278    friend class QMacPixmapData;
     279    friend class QS60PixmapData;
    254280    friend class QBitmap;
    255281    friend class QPaintDevice;
     
    261287    friend class QRasterPaintEngine;
    262288    friend class QRasterBuffer;
    263     friend class QDirect3DPaintEngine;
    264     friend class QDirect3DPaintEnginePrivate;
    265     friend class QDetachedPixmap;
     289    friend class QPixmapCacheEntry;
    266290#if !defined(QT_NO_DATASTREAM)
    267291    friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPixmap &);
     
    273297
    274298public:
    275     typedef QPixmapData * DataPtr;
     299    typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr;
    276300    inline DataPtr &data_ptr() { return data; }
    277301};
     
    282306{
    283307    return copy(QRect(ax, ay, awidth, aheight));
     308}
     309
     310inline void QPixmap::scroll(int dx, int dy, int ax, int ay, int awidth, int aheight, QRegion *exposed)
     311{
     312    scroll(dx, dy, QRect(ax, ay, awidth, aheight), exposed);
    284313}
    285314
Note: See TracChangeset for help on using the changeset viewer.