47 #include <QtGui/QApplication> 49 #include <QWindowSystemInterface> 58 NSRect frame = NSMakeRect(geo.
x(), geo.
y(), geo.
width(), geo.
height());
61 styleMask:NSTitledWindowMask|NSClosableWindowMask|NSMiniaturizableWindowMask|NSResizableWindowMask
62 backing:NSBackingStoreBuffered
66 [m_nsWindow setDelegate:delegate];
68 [m_nsWindow makeKeyAndOrderFront:nil];
69 [m_nsWindow setAcceptsMouseMovedEvents:YES];
71 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 72 if ([m_nsWindow respondsToSelector:
@selector(setRestorable:)])
73 [m_nsWindow setRestorable: NO];
85 NSRect bounds = NSMakeRect(rect.
x(), rect.
y(), rect.
width(), rect.
height());
113 QRect geo(rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);
void setVisible(bool visible)
Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false...
int width() const
Returns the width of the rectangle.
int height() const
Returns the height of the rectangle.
NSView * contentView() const
void setGeometry(const QRect &rect)
This function is called by Qt whenever a window is moved or the window is resized.
QCocoaWindow(QWidget *tlw)
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.
static void handleGeometryChange(QWidget *w, const QRect &newRect)
The QRect class defines a rectangle in the plane using integer precision.
WId winId() const
Reimplement in subclasses to return a handle to the native window.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
void setContentView(NSView *contentView)