Qt 4.8
Public Types | Public Functions | Protected Functions | Protected Variables | Private Functions | List of all members
QBlittable Class Referenceabstract

#include <qblittable_p.h>

Inheritance diagram for QBlittable:
QDirectFbBlitter

Public Types

enum  Capability {
  SolidRectCapability = 0x0001, SourcePixmapCapability = 0x0002, SourceOverPixmapCapability = 0x0004, SourceOverScaledPixmapCapability = 0x0008,
  AlphaFillRectCapability = 0x0010, OpacityPixmapCapability = 0x0020, OutlineCapability = 0x0001000
}
 

Public Functions

virtual void alphaFillRect (const QRectF &rect, const QColor &color, QPainter::CompositionMode cmode)
 
Capabilities capabilities () const
 
virtual void drawPixmap (const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect)=0
 
virtual void drawPixmapOpacity (const QRectF &rect, const QPixmap &pixmap, const QRectF &subrect, QPainter::CompositionMode cmode, qreal opacity)
 
virtual void fillRect (const QRectF &rect, const QColor &color)=0
 
bool isLocked () const
 
QImagelock ()
 
 Q_DECLARE_FLAGS (Capabilities, Capability)
 
 QBlittable (const QSize &size, Capabilities caps)
 
QSize size () const
 
void unlock ()
 
virtual ~QBlittable ()
 

Protected Functions

virtual QImagedoLock ()=0
 
virtual void doUnlock ()=0
 

Protected Variables

QBlittablePrivated_ptr
 

Private Functions

 Q_DECLARE_PRIVATE (QBlittable)
 

Detailed Description

Definition at line 55 of file qblittable_p.h.

Enumerations

◆ Capability

Enumerator
SolidRectCapability 
SourcePixmapCapability 
SourceOverPixmapCapability 
SourceOverScaledPixmapCapability 
AlphaFillRectCapability 
OpacityPixmapCapability 
OutlineCapability 

Definition at line 59 of file qblittable_p.h.

Constructors and Destructors

◆ QBlittable()

QBlittable::QBlittable ( const QSize size,
Capabilities  caps 
)

Definition at line 60 of file qblittable.cpp.

61  : d_ptr(new QBlittablePrivate(size,caps))
62 {
63 }
QBlittablePrivate * d_ptr
Definition: qblittable_p.h:105

◆ ~QBlittable()

QBlittable::~QBlittable ( )
virtual

Definition at line 65 of file qblittable.cpp.

66 {
67  delete d_ptr;
68 }
QBlittablePrivate * d_ptr
Definition: qblittable_p.h:105

Functions

◆ alphaFillRect()

virtual void QBlittable::alphaFillRect ( const QRectF rect,
const QColor color,
QPainter::CompositionMode  cmode 
)
inlinevirtual

Reimplemented in QDirectFbBlitter.

Definition at line 81 of file qblittable_p.h.

Referenced by QBlittablePixmapData::fill().

81  {
82  Q_UNUSED(rect);
83  Q_UNUSED(color);
84  Q_UNUSED(cmode);
85  qWarning("Please implement alphaFillRect function in your platform or remove AlphaFillRectCapability from it");
86  }
Q_CORE_EXPORT void qWarning(const char *,...)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ capabilities()

QBlittable::Capabilities QBlittable::capabilities ( ) const

Definition at line 71 of file qblittable.cpp.

Referenced by QBlittablePixmapData::fill().

72 {
73  Q_D(const QBlittable);
74  return d->caps;
75 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482

◆ doLock()

virtual QImage* QBlittable::doLock ( )
protectedpure virtual

Implemented in QDirectFbBlitter.

Referenced by lock().

◆ doUnlock()

virtual void QBlittable::doUnlock ( )
protectedpure virtual

Implemented in QDirectFbBlitter.

Referenced by unlock().

◆ drawPixmap()

virtual void QBlittable::drawPixmap ( const QRectF rect,
const QPixmap pixmap,
const QRectF subrect 
)
pure virtual

Implemented in QDirectFbBlitter.

◆ drawPixmapOpacity()

virtual void QBlittable::drawPixmapOpacity ( const QRectF rect,
const QPixmap pixmap,
const QRectF subrect,
QPainter::CompositionMode  cmode,
qreal  opacity 
)
inlinevirtual

Reimplemented in QDirectFbBlitter.

Definition at line 87 of file qblittable_p.h.

87  {
88  Q_UNUSED(rect);
89  Q_UNUSED(pixmap);
90  Q_UNUSED(subrect);
91  Q_UNUSED(cmode);
92  Q_UNUSED(opacity);
93  qWarning("Please implement drawPixmapOpacity function in your platform or remove OpacityPixmapCapability from it");
94  }
Q_CORE_EXPORT void qWarning(const char *,...)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729

◆ fillRect()

virtual void QBlittable::fillRect ( const QRectF rect,
const QColor color 
)
pure virtual

Implemented in QDirectFbBlitter.

Referenced by QBlittablePixmapData::fill().

◆ isLocked()

bool QBlittable::isLocked ( ) const

Definition at line 83 of file qblittable.cpp.

84 {
85  Q_D(const QBlittable);
86  return d->locked;
87 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482

◆ lock()

QImage * QBlittable::lock ( )

Definition at line 89 of file qblittable.cpp.

Referenced by QBlittablePixmapData::buffer(), QBlittablePixmapData::fill(), QBlittablePixmapData::hasAlphaChannel(), and QBlittablePixmapData::toImage().

90 {
91  Q_D(QBlittable);
92  if (!d->locked) {
93  d->cachedImg = doLock();
94  d->locked = true;
95  }
96 
97  return d->cachedImg;
98 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
virtual QImage * doLock()=0

◆ Q_DECLARE_FLAGS()

QBlittable::Q_DECLARE_FLAGS ( Capabilities  ,
Capability   
)

◆ Q_DECLARE_PRIVATE()

QBlittable::Q_DECLARE_PRIVATE ( QBlittable  )
private

◆ size()

QSize QBlittable::size ( ) const

Definition at line 77 of file qblittable.cpp.

Referenced by QDirectFbBlitter::doLock(), and QBlittablePixmapData::setBlittable().

78 {
79  Q_D(const QBlittable);
80  return d->m_size;
81 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482

◆ unlock()

void QBlittable::unlock ( )

Definition at line 100 of file qblittable.cpp.

Referenced by QDirectFbBlitter::drawPixmapOpacity(), QBlittablePixmapData::fill(), QDirectFbWindowSurface::flush(), QDirectFbWindowSurface::scroll(), and QDirectFbBlitter::~QDirectFbBlitter().

101 {
102  Q_D(QBlittable);
103  if (d->locked) {
104  doUnlock();
105  d->locked = false;
106  }
107 }
double d
Definition: qnumeric_p.h:62
#define Q_D(Class)
Definition: qglobal.h:2482
virtual void doUnlock()=0

Properties

◆ d_ptr

QBlittablePrivate* QBlittable::d_ptr
protected

Definition at line 105 of file qblittable_p.h.

Referenced by ~QBlittable().


The documentation for this class was generated from the following files: