summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implement "quit on last window closed" logic for QWindowGunnar Sletta2011-08-111-0/+44
| | | | | | | Change-Id: Ide33578ad60796f3e267b09be76cda87eaf873d0 Reviewed-on: http://codereview.qt.nokia.com/2827 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Add WindowStateChanged event.Friedemann Kleint2011-08-051-0/+12
| | | | | | | | | Not currently considering activation state. Change-Id: Iea9265d35536947b6cc85639bd9839e9fda69bdf Reviewed-on: http://codereview.qt.nokia.com/2609 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* QPlatformFontDatabase: Add default fonts.Friedemann Kleint2011-08-031-1/+3
| | | | | | | | | | | | Add a default font accessor used to initalize QGuiApplication::font(). Add accessor for default font hash providing the defaults for QApplication::font(const char *widgetClassName). Change-Id: Ie4eb6edb251a81e81288ef480ae5550bd1125008 Reviewed-by: Samuel Rødal <sroedal@trolltech.com> Reviewed-on: http://codereview.qt.nokia.com/2567 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Make QPlatformIntegration not have a factory for eventdispatcherJørgen Lind2011-07-281-4/+4
| | | | | | | | | but rather an accessor for the guiThreadEventDispatcher Change-Id: I1b9ba14efc9f338c5a67e3e24ddb0caf76c07413 Reviewed-on: http://codereview.qt.nokia.com/2321 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Make it possible to use QSocketNotifier in Lighthouse pluginsJørgen Lind2011-07-271-4/+17
| | | | | | | | | | | | | The idea is that now the plugin can register the event dispatcher in its constructor, so it can freely use QSocketNotifier or what not. If the plugin choses not to do so, then the createFunction will be called at a later point. Change-Id: I75fb2ee4180d9619ac94e75fbcf1efd7a2deecbc Reviewed-on: http://codereview.qt.nokia.com/2287 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Lighthouse: Provide default plugin.Friedemann Kleint2011-07-251-4/+21
| | | | | | | | | Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Change-Id: I13e78c499f77ac6ad034e61488fc6ef00e2e2be8 Reviewed-on: http://codereview.qt.nokia.com/2124 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add drag and drop events to QWindowSystemInterface.Laszlo Agocs2011-07-251-0/+46
| | | | | | | | | | | For non-desktop platforms these are better suited and are more QPA style than relying purely on QDragManager/QSimpleDrag/sending drag events directly to the windows. Change-Id: Id466830cf83427b3d86925602086a858e8f713e5 Reviewed-on: http://codereview.qt.nokia.com/2084 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix for not calling QPlatformCursor's pointerEvent.Laszlo Agocs2011-07-251-0/+9
| | | | | | | | | | The code to pass mouse events to platform cursors is there in 4.8, however it went missing in refactor. This patch restores it. Change-Id: I7873c892c1ae907fc084d3f00f7d4e5a6293ba4d Reviewed-on: http://codereview.qt.nokia.com/2083 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Added workable QScreen API on top of QPlatformScreen.Samuel Rødal2011-07-251-9/+18
| | | | | | | | | | | | | | | | | | | | | QPlatformIntegration::screens() no longer has to be implemented, implementations should call QPlatformIntegration::screenAdded() for each screen instead. This is for being able to support adding screens at run-time later on, by connecting it to a signal in QGuiApplication. The QGuiGLContext API has changed a bit, by not sending in all the parameters in the constructor but instead having a create() function. The createPlatformGLContext() factory in QPlatformIntegration takes a QGuiGLContext * instead of a QSurfaceFormat and a share context, similar to how the window and backing store factory functions work. The XCB plugin has experimental support for connecting to multiple X displays simultaneously, creating one or more QScreen for each. Change-Id: I248a22a4fd3481280710110272c04a30a8021e8f Reviewed-on: http://codereview.qt.nokia.com/2103 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
* Start porting the Mac menu system to QPA.Morten Sorvig2011-07-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | Global changes: qglobal.h: remove code that sets Q_WS_MAC and Q_MAC_USE_COCOA - this is dead code now. Add qt_widget_helpers_mac_p.h/mm which will contain helper functions needed for widgets on Qt 5. Menu-related changes: Set AA_DontUseNativeMenuBar before creating the platform plugin. Change Q_WS_MAC to Q_OS_MAC in the menu code. Remove Q_MAC_USE_COCOA defines and Carbon code paths. Move some qt_mac helper functions only used by the menu system to qmenu_mac.mm. #ifdef out some code paths that require further porting. Native menus are now disabled by default but can be enabled by the QPA plugins that want them by clearing AA_DontUseNativeMenuBar. Since we at compile time don't know which plugin will be loaded the Mac menu code is always included when building on OS X. (The above is currently only relevant for the Cocoa plugin.)
* Make xcb work again after event dispatcher changes.Morten Johan Sorvig2011-06-221-1/+0
| | | | | | The platform plugin/event dispatcher creation order has now been reversed and the event dispatcher cannot be accessed during plugin construciton.
* Add lighthouse event dispatcher API.Morten Sorvig2011-06-221-33/+43
| | | | | | | | | | Platform plugin creation is now moved forward in order to have a platform plugin instance at event dispatcher creation time. Plugins are now responsible for implementing PlatformIntegration::createEventDispatcher and returning an QAbstractEventDispatcher subclass.
* QWindowContext / QWindowFormat refactor.Samuel Rødal2011-06-101-3/+5
| | | | | | | | | | | | | To enable having a single GL context used for multiple drawables we need to de-couple the context class a bit more from the window class in the plugin API. Now contexts are created stand-alone based on a GL format and a share context, and when calling makeCurrent() a desired surface is specified. This maps well to GLX, EGL, Cocoa, AGL, and WGL, which all support this use case. QWindowContext is renamed to QGuiGLContext, and QWindowFormat is renamed to QGuiGLFormat. We have the ability to introduce a pbuffer or similar other offscreen GL drawable abstraction in the future.
* Add QEventDispatcherMac.Morten Sorvig2011-06-091-1/+8
| | | | | Create it directly in QGuiApplication for now, later on we'll move it to the cocoa plugin.
* Cursor support in xcb plug-in.Laszlo Agocs2011-06-081-2/+2
| | | | | | | Custom cursor pixmaps with depth greater than 1 are not yet supported and will be converted to monochrome always. Reviewed-by: Samuel Rødal
* Avoid out of bounds writeLars Knoll2011-06-081-2/+4
| | | | Reviewed-by: Samuel
* Protect against deleted windowsLars Knoll2011-06-071-0/+24
| | | | | | | Check that the window is still there before trying to deliver an event to it. Reviewed-by: Samuel
* Made tst_QWidget::updateWhileMinimized() pass.Samuel Rødal2011-06-061-0/+27
| | | | | | | | | | This requires adding a couple of window system interface events, namely Map, Unmap, and Expose. When a widget is minimized on X11 it is unmapped, and thus update requests should not be delivered. Instead the event will delivered when the widget is mapped, which causes an Expose event to be sent. The Unmap and Expose event thus need to be handled in QWidgetWindow, and Map is also added for the purpose of API symmetry (and for future needs).
* Have a sensible default double click interval.Laszlo Agocs2011-05-311-2/+2
| | | | | | | Having 0 as default would disable double clicks completely which is not really good. Reviewed-by: Samuel Rødal
* Add focus and modal dialog support.Laszlo Agocs2011-05-301-0/+7
| | | | Reviewed-by: Samuel Rødal
* Compile fix for QtGui when configure with -qpa on WindowsOlli Werwolff2011-05-261-1/+1
| | | | Reviewed-by: Friedemann Kleint
* Compile fix for -qpa/Linux.Friedemann Kleint2011-05-231-0/+1
| | | | Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Add QGuiApp::topLevelAt and fix visibility flagLars Knoll2011-05-221-0/+21
| | | | | | | Add and remove windows to the list of top level windows. Correctly set the visibility flag for windows and implement a QGuiApplication::topLevelAt() method that uses the QPlatformScreen.
* Added QGuiApplication::activeWindow().Samuel Rødal2011-05-201-2/+8
|
* move files in src/gui into their final locationsLars Knoll2011-05-111-0/+1059
| | | | | Rename the guikernel subdir to kernel and guiutil to util.
* split kernel/ up according to the future library splitLars Knoll2011-05-041-925/+0
| | | | | | | Create a guikernel/ directory that contains the files that'll go into libQtGui. What remains in kernel/ will go into QtWidgets. In addition to that image/, painting/ and text will end up int QtGui.
* move keyboardInputLocale and keyboardInputDirection into QGuiApplicationLars Knoll2011-05-041-0/+25
|
* Remove more QApp dependenciesLars Knoll2011-05-041-0/+11
| | | | | | platformIntegration() lives in QGuiApplication QFont and QFontDatabase can live with QGuiApp only as well.
* move layoutDirection from QApplication to QGuiApplicationLars Knoll2011-05-031-0/+70
| | | | | The concept is needed in both QWidgets and QML, so it has to be in QGuiApplication.
* rename qwindow_qpa to qwindowLars Knoll2011-05-031-1/+1
|
* QGuiApplication is not QPA specificLars Knoll2011-05-031-0/+819
Rename files to reflect that QGuiApplication is going to be used everywhere.