Changeset 561 for trunk/src/gui/image/qpixmapdata_p.h
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/image/qpixmapdata_p.h
r2 r561 2 2 ** 3 3 ** 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) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 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. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** 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. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 67 67 PixmapType, BitmapType 68 68 }; 69 #if defined(Q_OS_SYMBIAN) 70 enum NativeType { 71 FbsBitmap, 72 SgImage 73 }; 74 #endif 69 75 enum ClassId { RasterClass, X11Class, MacClass, DirectFBClass, 70 76 OpenGLClass, OpenVGClass, CustomClass = 1024 }; 71 77 72 QPixmapData(PixelType pixel pType, int classId);78 QPixmapData(PixelType pixelType, int classId); 73 79 virtual ~QPixmapData(); 80 81 virtual QPixmapData *createCompatiblePixmapData() const; 74 82 75 83 virtual void resize(int width, int height) = 0; 76 84 virtual void fromImage(const QImage &image, 77 85 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, 79 88 Qt::ImageConversionFlags flags); 89 virtual bool fromData(const uchar *buffer, uint len, const char *format, 90 Qt::ImageConversionFlags flags); 91 80 92 virtual void copy(const QPixmapData *data, const QRect &rect); 93 virtual bool scroll(int dx, int dy, const QRect &rect); 81 94 82 95 virtual int metric(QPaintDevice::PaintDeviceMetric metric) const = 0; … … 99 112 virtual QImage* buffer(); 100 113 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); 105 127 106 128 protected: 107 129 void setSerialNumber(int serNo); 130 int w; 131 int h; 132 int d; 133 bool is_null; 108 134 109 135 private: 110 136 friend class QPixmap; 111 friend class QGLContextPrivate;112 137 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>; 113 142 114 143 QAtomicInt ref; … … 120 149 uint is_cached; 121 150 }; 122 123 #ifdef Q_WS_WIN124 #ifndef Q_OS_WINCE125 QPixmap convertHIconToPixmap( const HICON icon);126 #else127 QPixmap convertHIconToPixmap( const HICON icon, bool large = false);128 #endif129 QPixmap loadIconFromShell32( int resourceId, int size );130 #endif131 151 132 152 # define QT_XFORM_TYPE_MSBFIRST 0
Note:
See TracChangeset
for help on using the changeset viewer.