44 #include <private/qt_mac_p.h> 45 #include <private/qcocoaintrospection_p.h> 46 #import <AppKit/AppKit.h> 47 #import <Foundation/Foundation.h> 48 #import <objc/objc-class.h> 58 @interface QT_MANGLE_NAMESPACE(QNSPanelProxy) : NSWindow {
61 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation;
63 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation screen:(NSScreen *)screen;
64 - (id)qt_fakeInitWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle
65 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation;
66 - (id)qt_fakeInitWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle
67 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation screen:(NSScreen *)screen;
70 @implementation QT_MANGLE_NAMESPACE(QNSPanelProxy)
72 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
75 windowStyle &= ~NSUtilityWindowMask;
82 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation screen:(NSScreen *)screen
85 windowStyle &= ~NSUtilityWindowMask;
90 - (id)qt_fakeInitWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle
91 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation
100 - (id)qt_fakeInitWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)windowStyle
101 backing:(NSBackingStoreType)bufferingType defer:(BOOL)deferCreation screen:(NSScreen *)screen
114 @interface QT_MANGLE_NAMESPACE(QNSWindowProxy) : NSWindow {
116 - (void)setTitle:(NSString *)title;
117 - (void)qt_fakeSetTitle:(NSString *)title;
120 @implementation QT_MANGLE_NAMESPACE(QNSWindowProxy)
121 - (void)setTitle:(NSString *)title
126 if ([title isEqualToString:
@"Print"]
127 || [title isEqualToString:
@"Page Setup"]
128 || [[
self className] isEqualToString:
@"PMPrintingWindow"])
129 title = (NSString *)(static_cast<CFStringRef>(cftitle));
133 - (void)qt_fakeSetTitle:(NSString *)title
157 @selector(qt_fakeInitWithContentRect:styleMask:backing:defer:));
163 @selector(qt_fakeInitWithContentRect:styleMask:backing:defer:screen:));
174 @selector(qt_fakeInitWithContentRect:styleMask:backing:defer:screen:));
178 @selector(qt_fakeInitWithContentRect:styleMask:backing:defer:));
190 @selector(setTitle:),
192 @selector(setTitle:),
193 @selector(qt_fakeSetTitle:));
204 @selector(setTitle:),
205 @selector(qt_fakeSetTitle:));
213 static const NSRect buttonFrameRect = { { 0.0, 0.0 }, { 0.0, 0.0 } };
215 NSButton *button = [[NSButton alloc] initWithFrame:buttonFrameRect];
216 [button setButtonType:NSMomentaryLightButton];
217 [button setBezelStyle:NSRoundedBezelStyle];
218 [button setTitle:(NSString*)(CFStringRef)QCFString(QDialogButtonBox::tr(text)
219 .remove(QLatin1Char('&')))];
220 [[button cell] setFont:[NSFont systemFontOfSize:
221 [NSFont systemFontSizeForControlSize:NSRegularControlSize]]];
222 [superview addSubview:button];
static QWidget * currentWindow
#define QT_END_NAMESPACE
This macro expands to.
NSButton * macCreateButton(const char *text, NSView *superview)
id qt_fakeInitWithContentRect:styleMask:backing:defer:(NSRect contentRect, [styleMask] NSUInteger windowStyle, [backing] NSBackingStoreType bufferingType, [defer] BOOL deferCreation)
void qt_fakeSetTitle:(NSString *title)
#define QT_BEGIN_NAMESPACE
This macro expands to.
id qt_fakeInitWithContentRect:styleMask:backing:defer:screen:(NSRect contentRect, [styleMask] NSUInteger windowStyle, [backing] NSBackingStoreType bufferingType, [defer] BOOL deferCreation, [screen] NSScreen *screen)
void qt_cocoa_change_implementation(Class baseClass, SEL originalSel, Class proxyClass, SEL replacementSel, SEL backupSel)
void qt_cocoa_change_back_implementation(Class baseClass, SEL originalSel, SEL backupSel)
void macStartInterceptNSPanelCtor()
void macStopInterceptWindowTitle()
void macStartInterceptWindowTitle(QWidget *window)
#define QT_MANGLE_NAMESPACE(name)
void macStopInterceptNSPanelCtor()
#define QT_USE_NAMESPACE
This macro expands to using QT_NAMESPACE if QT_NAMESPACE is defined and nothing otherwise.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...