summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoamenuloader.mm
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Clang Build Fix: Cocoa platform pluginTakumi ASAKI2011-09-091-1/+1
| | | | | | | | | | Fix some assignment from const values to non-const without cast. Move #import to avoid compile error. Fix type mismatch. Change-Id: I93ae5cd07827b92a91093df979992616b26b14af Reviewed-on: http://codereview.qt-project.org/4536 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: QMenu refactor.Morten Sorvig2011-09-071-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change prepares for enabling native menus on OS X. Move code from src/widgets to cocoa: - qcocoaapplicaiton - qcocoaapplicaitondelegate - qcocoamenuloader - qcocoamenu - qmenu_mac - misc helpers to qcocoahelpers Create a QNSApplication and QCocoaApplicationDelegate at application startup. New Lighthouse API: - class QPlatformMenu - class QPlatformMenuBar - QPlatformIntegration::createPlatformMenu() - QPlatformIntegration::createPlatformMenuBar() Platforms that wants a native menu integration subclasses QPlatformMenu[|Bar] and implements the create function. The default implementation returns 0, which causes QMenu to use the standard Qt menus. This API is based on the current native menu abstraction that Mac, Wince and S60 uses in Qt 4. The main difference is that the platform classes are proper standalone classes and not #ifdeffed into QMenuPrivate. Change-Id: I3da41f80b0ae903a476937908b1f9b88014b7954 Reviewed-on: http://codereview.qt.nokia.com/4068 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Cocoa: Load the standard app menu.Morten Sorvig2011-08-291-0/+310
It's now possible to quit and hide the app window using the keyboard shortcuts. The menu nib files are now stored in Qt resources, written to QDir::temp at app startup and loaded from there. This will simplify deployment compared with Qt 4 where the nibs had to be copied into the QtGui framework when deploying the app. This change also moves the mac resources (qt_menu.nib, cursors) from widgets to the cocoa plugin. Change-Id: If1d6fd353369ea4e89a9e35579906a2de7298fa2 Reviewed-on: http://codereview.qt.nokia.com/3314 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>