44 #include <QtCore/qdebug.h> 46 #include <QtGui/QPainter> 54 QRect flippedRect = sourceRect;
55 flippedRect.
moveTop(height - sourceRect.
y());
95 QWindowSurface::resize(size);
98 NSSize newSize = NSMakeSize(size.
width(),size.
height());
QPaintDevice * paintDevice()
Implement this function to return the appropriate paint device.
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
QRect rect(const QWidget *widget) const
Returns the rectangle for widget in the coordinates of this window surface.
int width() const
Returns the width of the rectangle.
virtual QPoint offset(const QWidget *widget) const
Returns the offset of widget in the coordinates of this window surface.
QRect boundingRect() const
Returns the bounding rectangle of this region.
int height() const
Returns the height of the rectangle.
int width() const
Returns the width.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QRegion class specifies a clip region for a painter.
QRect flipedRect(const QRect &sourceRect, int height)
QCocoaWindow * m_cocoaWindow
The QWindowSurface class provides the drawing area for top-level windows.
int y() const
Returns the y-coordinate of the rectangle's top edge.
int x() const
Returns the x-coordinate of the rectangle's left edge.
void flush(QWidget *widget, const QRegion ®ion, const QPoint &offset)
Flushes the given region from the specified widget onto the screen.
The QPoint class defines a point in the plane using integer precision.
int height() const
Returns the height.
The QRect class defines a rectangle in the plane using integer precision.
QCocoaWindowSurface(QWidget *window, WId wid)
The QSize class defines the size of a two-dimensional object using integer point precision.
void moveTop(int pos)
Moves the rectangle vertically, leaving the rectangle's top edge at the given y coordinate.
bool isValid() const
Returns true if the rectangle is valid, otherwise returns false.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
QWidget * window() const
Returns a pointer to the top-level window associated with this surface.
void setContentView(NSView *contentView)
void resize(const QSize &size)