From 5a919255146e15da8a99262a155a9a4b75e6cfdc Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 3 May 2011 20:20:44 +0200 Subject: QGuiApplication is not QPA specific Rename files to reflect that QGuiApplication is going to be used everywhere. --- src/gui/kernel/qguiapplication_p.h | 134 +++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 src/gui/kernel/qguiapplication_p.h (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h new file mode 100644 index 0000000000..64e0cc1675 --- /dev/null +++ b/src/gui/kernel/qguiapplication_p.h @@ -0,0 +1,134 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QGUIAPPLICATION_QPA_P_H +#define QGUIAPPLICATION_QPA_P_H + +#include + +#include + +#include + +#include +#include "private/qwindowsysteminterface_qpa_p.h" +#include "QtGui/qplatformintegration_qpa.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + +class QPlatformIntegration; + +class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate +{ + Q_DECLARE_PUBLIC(QGuiApplication) +public: + QGuiApplicationPrivate(int &argc, char **argv, int flags); + ~QGuiApplicationPrivate(); + + void createEventDispatcher(); + + static int keyboard_input_time; + static int mouse_double_click_time; + + static Qt::KeyboardModifiers modifier_buttons; + static Qt::MouseButtons mouse_buttons; + + static QPlatformIntegration *platform_integration; + + static QPlatformIntegration *platformIntegration() + { return platform_integration; } + + static QAbstractEventDispatcher *qt_qpa_core_dispatcher() + { return QCoreApplication::instance()->d_func()->threadData->eventDispatcher; } + + static void processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e); + static void processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e); + static void processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e); + static void processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e); + + static void processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent *e); + + static void processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e); + + static void processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e); + static void processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e); + + static void processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e); + + static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e); + + static void reportScreenCount(QWindowSystemInterfacePrivate::ScreenCountEvent *e); + static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e); + static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e); + + static bool app_do_modal; + + static QPointer qt_last_mouse_receiver; + + static QWidgetList qt_modal_stack; + + static Qt::MouseButtons buttons; + static ulong mousePressTime; + static Qt::MouseButton mousePressButton; + static int mousePressX; + static int mousePressY; + static int mouse_double_click_distance; + +#ifndef QT_NO_CLIPBOARD + static QClipboard *qt_clipboard; +#endif + + static QFont *app_font; +private: + void init(); + + static QGuiApplicationPrivate *self; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QGUIAPPLICATION_QPA_P_H -- cgit v1.2.3 From 5df3d517b48db1410e16947194a32137d08b70e6 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 3 May 2011 21:06:20 +0200 Subject: move layoutDirection from QApplication to QGuiApplication The concept is needed in both QWidgets and QML, so it has to be in QGuiApplication. --- src/gui/kernel/qguiapplication_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 64e0cc1675..23b3a4b4d2 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -69,6 +69,8 @@ public: void createEventDispatcher(); + virtual void notifyLayoutDirectionChange(); + static int keyboard_input_time; static int mouse_double_click_time; -- cgit v1.2.3 From 0e3823d30c2294eb11c205ca11fca55508478151 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 4 May 2011 11:51:33 +0200 Subject: remove dependency to QStyle::visualAlignment The current position of the code in QGuiAppPrivate is a bit messy, but we can later on consider consolidating some of this in some helper namespace. --- src/gui/kernel/qguiapplication_p.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 23b3a4b4d2..2cc2e54f6c 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -105,6 +105,19 @@ public: static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e); static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e); + static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment) + { + if (!(alignment & Qt::AlignHorizontal_Mask)) + alignment |= Qt::AlignLeft; + if ((alignment & Qt::AlignAbsolute) == 0 && (alignment & (Qt::AlignLeft | Qt::AlignRight))) { + if (direction == Qt::RightToLeft) + alignment ^= (Qt::AlignLeft | Qt::AlignRight); + alignment |= Qt::AlignAbsolute; + } + return alignment; + } + + static bool app_do_modal; static QPointer qt_last_mouse_receiver; -- cgit v1.2.3 From 401f078386a8b5a87a58e237de7be9a2f9a045ba Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 4 May 2011 12:50:14 +0200 Subject: split kernel/ up according to the future library split 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. --- src/gui/kernel/qguiapplication_p.h | 149 ------------------------------------- 1 file changed, 149 deletions(-) delete mode 100644 src/gui/kernel/qguiapplication_p.h (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h deleted file mode 100644 index 2cc2e54f6c..0000000000 --- a/src/gui/kernel/qguiapplication_p.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). -** All rights reserved. -** Contact: Nokia Corporation (qt-info@nokia.com) -** -** This file is part of the QtGui module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** No Commercial Usage -** This file contains pre-release code and may not be distributed. -** You may use this file in accordance with the terms and conditions -** contained in the Technology Preview License Agreement accompanying -** this package. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Nokia gives you certain additional -** rights. These rights are described in the Nokia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** If you have questions regarding the use of this file, please contact -** Nokia at qt-info@nokia.com. -** -** -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QGUIAPPLICATION_QPA_P_H -#define QGUIAPPLICATION_QPA_P_H - -#include - -#include - -#include - -#include -#include "private/qwindowsysteminterface_qpa_p.h" -#include "QtGui/qplatformintegration_qpa.h" - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Gui) - -class QPlatformIntegration; - -class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate -{ - Q_DECLARE_PUBLIC(QGuiApplication) -public: - QGuiApplicationPrivate(int &argc, char **argv, int flags); - ~QGuiApplicationPrivate(); - - void createEventDispatcher(); - - virtual void notifyLayoutDirectionChange(); - - static int keyboard_input_time; - static int mouse_double_click_time; - - static Qt::KeyboardModifiers modifier_buttons; - static Qt::MouseButtons mouse_buttons; - - static QPlatformIntegration *platform_integration; - - static QPlatformIntegration *platformIntegration() - { return platform_integration; } - - static QAbstractEventDispatcher *qt_qpa_core_dispatcher() - { return QCoreApplication::instance()->d_func()->threadData->eventDispatcher; } - - static void processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e); - static void processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e); - static void processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e); - static void processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e); - - static void processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent *e); - - static void processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e); - - static void processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e); - static void processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e); - - static void processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e); - - static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e); - - static void reportScreenCount(QWindowSystemInterfacePrivate::ScreenCountEvent *e); - static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e); - static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e); - - static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment) - { - if (!(alignment & Qt::AlignHorizontal_Mask)) - alignment |= Qt::AlignLeft; - if ((alignment & Qt::AlignAbsolute) == 0 && (alignment & (Qt::AlignLeft | Qt::AlignRight))) { - if (direction == Qt::RightToLeft) - alignment ^= (Qt::AlignLeft | Qt::AlignRight); - alignment |= Qt::AlignAbsolute; - } - return alignment; - } - - - static bool app_do_modal; - - static QPointer qt_last_mouse_receiver; - - static QWidgetList qt_modal_stack; - - static Qt::MouseButtons buttons; - static ulong mousePressTime; - static Qt::MouseButton mousePressButton; - static int mousePressX; - static int mousePressY; - static int mouse_double_click_distance; - -#ifndef QT_NO_CLIPBOARD - static QClipboard *qt_clipboard; -#endif - - static QFont *app_font; -private: - void init(); - - static QGuiApplicationPrivate *self; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QGUIAPPLICATION_QPA_P_H -- cgit v1.2.3 From e577d02cc9cba2033cd21c23a4420a1f0d5469a4 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 8 May 2011 20:51:18 +0200 Subject: move files in src/gui into their final locations Rename the guikernel subdir to kernel and guiutil to util. --- src/gui/kernel/qguiapplication_p.h | 169 +++++++++++++++++++++++++++++++++++++ 1 file changed, 169 insertions(+) create mode 100644 src/gui/kernel/qguiapplication_p.h (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h new file mode 100644 index 0000000000..dfe73a4c69 --- /dev/null +++ b/src/gui/kernel/qguiapplication_p.h @@ -0,0 +1,169 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtGui module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QGUIAPPLICATION_QPA_P_H +#define QGUIAPPLICATION_QPA_P_H + +#include + +#include + +#include + +#include +#include "private/qwindowsysteminterface_qpa_p.h" +#include "QtGui/qplatformintegration_qpa.h" + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Gui) + +class QPlatformIntegration; + +class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate +{ + Q_DECLARE_PUBLIC(QGuiApplication) +public: + QGuiApplicationPrivate(int &argc, char **argv, int flags); + ~QGuiApplicationPrivate(); + + void createEventDispatcher(); + + virtual void notifyLayoutDirectionChange(); + + static int keyboard_input_time; + static int mouse_double_click_time; + + static Qt::KeyboardModifiers modifier_buttons; + static Qt::MouseButtons mouse_buttons; + + static QPlatformIntegration *platform_integration; + + static QPlatformIntegration *platformIntegration() + { return platform_integration; } + + enum KeyPlatform { + KB_Win = 1, + KB_Mac = 2, + KB_X11 = 4, + KB_KDE = 8, + KB_Gnome = 16, + KB_CDE = 32, + KB_S60 = 64, + KB_All = 0xffff + }; + + static uint currentKeyPlatform(); + + static QAbstractEventDispatcher *qt_qpa_core_dispatcher() + { return QCoreApplication::instance()->d_func()->threadData->eventDispatcher; } + + static void processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent *e); + static void processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent *e); + static void processWheelEvent(QWindowSystemInterfacePrivate::WheelEvent *e); + static void processTouchEvent(QWindowSystemInterfacePrivate::TouchEvent *e); + + static void processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent *e); + + static void processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent *e); + + static void processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e); + static void processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e); + + static void processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e); + + static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e); + + static void reportScreenCount(QWindowSystemInterfacePrivate::ScreenCountEvent *e); + static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e); + static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e); + + static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment) + { + if (!(alignment & Qt::AlignHorizontal_Mask)) + alignment |= Qt::AlignLeft; + if ((alignment & Qt::AlignAbsolute) == 0 && (alignment & (Qt::AlignLeft | Qt::AlignRight))) { + if (direction == Qt::RightToLeft) + alignment ^= (Qt::AlignLeft | Qt::AlignRight); + alignment |= Qt::AlignAbsolute; + } + return alignment; + } + + QPixmap getPixmapCursor(Qt::CursorShape cshape); + + static QGuiApplicationPrivate *instance() { return self; } + + static bool app_do_modal; + + static Qt::MouseButtons buttons; + static ulong mousePressTime; + static Qt::MouseButton mousePressButton; + static int mousePressX; + static int mousePressY; + static int mouse_double_click_distance; + +#ifndef QT_NO_CLIPBOARD + static QClipboard *qt_clipboard; +#endif + + static QPalette *app_pal; + + static QWindowList window_list; + +#ifndef QT_NO_CURSOR + QList cursor_list; +#endif + + static QFont *app_font; +private: + void init(); + + static QGuiApplicationPrivate *self; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QGUIAPPLICATION_QPA_P_H -- cgit v1.2.3 From af4e5576f4dcca16a3ca32bc13a948893a865f19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Fri, 20 May 2011 13:45:36 +0200 Subject: Added QGuiApplication::activeWindow(). --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index dfe73a4c69..80aa5a525a 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -150,6 +150,7 @@ public: static QPalette *app_pal; static QWindowList window_list; + static QWindow *active_window; #ifndef QT_NO_CURSOR QList cursor_list; -- cgit v1.2.3 From e277d144259ce4e440cf789c83ba095b4c4d06a6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 30 May 2011 14:16:43 +0200 Subject: Add focus and modal dialog support. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 80aa5a525a..2d0f16c2f4 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -70,6 +70,7 @@ public: void createEventDispatcher(); virtual void notifyLayoutDirectionChange(); + virtual void notifyActiveWindowChange(QWindow *previous); static int keyboard_input_time; static int mouse_double_click_time; -- cgit v1.2.3 From 078e4ef6c72bdc759b83b5f430390cdcdf7f4e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Mon, 6 Jun 2011 15:54:11 +0200 Subject: Made tst_QWidget::updateWhileMinimized() pass. 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). --- src/gui/kernel/qguiapplication_p.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 2d0f16c2f4..c80212f8f9 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -119,6 +119,11 @@ public: static void reportGeometryChange(QWindowSystemInterfacePrivate::ScreenGeometryEvent *e); static void reportAvailableGeometryChange(QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e); + static void processMapEvent(QWindowSystemInterfacePrivate::MapEvent *e); + static void processUnmapEvent(QWindowSystemInterfacePrivate::UnmapEvent *e); + + static void processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent *e); + static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment) { if (!(alignment & Qt::AlignHorizontal_Mask)) -- cgit v1.2.3 From 4efaf305f51d09e214645a18a7bfa62bc36e2c61 Mon Sep 17 00:00:00 2001 From: Morten Sorvig Date: Tue, 21 Jun 2011 13:40:57 +0200 Subject: Add lighthouse event dispatcher API. 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. --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index c80212f8f9..6d44caa35a 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -67,6 +67,7 @@ public: QGuiApplicationPrivate(int &argc, char **argv, int flags); ~QGuiApplicationPrivate(); + void createPlatformIntegration(); void createEventDispatcher(); virtual void notifyLayoutDirectionChange(); -- cgit v1.2.3 From c3da77798b876716ce038a30e9aa8517ec158c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 21 Jul 2011 13:50:28 +0200 Subject: Added workable QScreen API on top of QPlatformScreen. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Jørgen Lind --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 6d44caa35a..8391662a4a 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -162,6 +162,7 @@ public: #ifndef QT_NO_CURSOR QList cursor_list; #endif + static QList screen_list; static QFont *app_font; private: -- cgit v1.2.3 From 43f2246995faf6c6051af862cb6d2ca64d7c08c6 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 25 Jul 2011 10:09:38 +0300 Subject: Add drag and drop events to QWindowSystemInterface. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 8391662a4a..a08dbca4f1 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -125,6 +125,9 @@ public: static void processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent *e); + static Qt::DropAction processDrag(QWindow *w, QMimeData *dropData, const QPoint &p); + static Qt::DropAction processDrop(QWindow *w, QMimeData *dropData, const QPoint &p); + static inline Qt::Alignment visualAlignment(Qt::LayoutDirection direction, Qt::Alignment alignment) { if (!(alignment & Qt::AlignHorizontal_Mask)) -- cgit v1.2.3 From 86e7c36b504f7c92229229747bdc5587b298a81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Thu, 21 Jul 2011 13:11:55 +0200 Subject: Make it possible to use QSocketNotifier in Lighthouse plugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index a08dbca4f1..325c89e363 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -69,6 +69,7 @@ public: void createPlatformIntegration(); void createEventDispatcher(); + void setEventDispatcher(QAbstractEventDispatcher *eventDispatcher); virtual void notifyLayoutDirectionChange(); virtual void notifyActiveWindowChange(QWindow *previous); -- cgit v1.2.3 From 8dc2f81c9f0e6eb8cab09e5d682358fd140b49b8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 4 Aug 2011 10:36:48 +0200 Subject: Add WindowStateChanged event. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not currently considering activation state. Change-Id: Iea9265d35536947b6cc85639bd9839e9fda69bdf Reviewed-on: http://codereview.qt.nokia.com/2609 Reviewed-by: Qt Sanity Bot Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 325c89e363..fc6da6fd31 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -114,6 +114,7 @@ public: static void processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e); static void processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e); + static void processWindowStateChangedEvent(QWindowSystemInterfacePrivate::WindowStateChangedEvent *e); static void processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e); -- cgit v1.2.3 From 46c9f4c212e374f957942f1d16d66f20b0a2949a Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 10 Aug 2011 15:36:51 +0200 Subject: Implement "quit on last window closed" logic for QWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ide33578ad60796f3e267b09be76cda87eaf873d0 Reviewed-on: http://codereview.qt.nokia.com/2827 Reviewed-by: Qt Sanity Bot Reviewed-by: Jørgen Lind --- src/gui/kernel/qguiapplication_p.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index fc6da6fd31..f7fa51208d 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -142,6 +142,8 @@ public: return alignment; } + static void emitLastWindowClosed(); + QPixmap getPixmapCursor(Qt::CursorShape cshape); static QGuiApplicationPrivate *instance() { return self; } @@ -170,6 +172,8 @@ public: static QList screen_list; static QFont *app_font; + + static bool quitOnLastWindowClosed; private: void init(); -- cgit v1.2.3 From 3ed314ca46286c0e4f54b124d145704277592ddd Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 25 Aug 2011 14:19:58 +0200 Subject: Fix compilation/use correct data type for qt_lastx,y. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6fdc8dcfb19d7498a1eb8013f75113537ce7a213 Reviewed-on: http://codereview.qt.nokia.com/3594 Reviewed-by: Qt Sanity Bot Reviewed-by: Jørgen Lind --- src/gui/kernel/qguiapplication_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index f7fa51208d..1591ed8990 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -44,6 +44,7 @@ #include +#include #include #include @@ -156,6 +157,7 @@ public: static int mousePressX; static int mousePressY; static int mouse_double_click_distance; + static QPointF lastCursorPosition; #ifndef QT_NO_CLIPBOARD static QClipboard *qt_clipboard; -- cgit v1.2.3 From 0e3ac5dea62e5427aa46e8c34cc4c85554d824c9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Wed, 31 Aug 2011 11:30:45 +0300 Subject: Touch event support for QWindow. Change-Id: I83ddc48a9093856d975b25f0426db96264afeeef Reviewed-on: http://codereview.qt.nokia.com/3920 Reviewed-by: Gunnar Sletta --- src/gui/kernel/qguiapplication_p.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 1591ed8990..511d3845d3 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -180,6 +180,9 @@ private: void init(); static QGuiApplicationPrivate *self; + + QMap > windowForTouchPointId; + QMap appCurrentTouchPoints; }; QT_END_NAMESPACE -- cgit v1.2.3 From 3795e2c7bec9eb50a04d139e45ecc809c4aa37f6 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 30 Aug 2011 13:15:56 +0200 Subject: Move the qmljsdebugargument variable to QGuiApplication MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This used to reside in QApplication, but we need it here to remove a dependency of QtDeclarative onto widgets. Change-Id: I119fef1d51387087b00e08aff1ee4b00503a6cd5 Reviewed-on: http://codereview.qt.nokia.com/3926 Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication_p.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 511d3845d3..43cb21460e 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -176,6 +176,10 @@ public: static QFont *app_font; static bool quitOnLastWindowClosed; + + QString qmljs_debug_arguments; // a string containing arguments for js/qml debugging. + inline QString qmljsDebugArgumentsString() { return qmljs_debug_arguments; } + private: void init(); -- cgit v1.2.3 From 94355ca15a4d451f4a4b858240e2c1a96e26537b Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 31 Aug 2011 10:47:09 +0200 Subject: Add a QStyleHints class to QtGui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This class encapsulates platform specific style hints like doubleClickInterval or cursorFlashTime. Change-Id: I0d88c47a59d564d8d346642184e5b14e1864cf40 Reviewed-on: http://codereview.qt.nokia.com/3927 Reviewed-by: Samuel Rødal --- src/gui/kernel/qguiapplication_p.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 43cb21460e..bdf79d4394 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -75,9 +75,6 @@ public: virtual void notifyLayoutDirectionChange(); virtual void notifyActiveWindowChange(QWindow *previous); - static int keyboard_input_time; - static int mouse_double_click_time; - static Qt::KeyboardModifiers modifier_buttons; static Qt::MouseButtons mouse_buttons; @@ -175,6 +172,8 @@ public: static QFont *app_font; + QStyleHints *styleHints; + static bool quitOnLastWindowClosed; QString qmljs_debug_arguments; // a string containing arguments for js/qml debugging. -- cgit v1.2.3 From a30d4162ddb30b62b8d003b099d3ca8ae0b0ed0b Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 5 Sep 2011 12:53:33 +0200 Subject: Refactor the input framework Results of the ongoing workshop in Oslo: QInputPanel will be the application facing interface for controlling the input context as well as querying things like the position of the virtual keyboard. QInputContext is significantly cleaned up and only there as a compatibility API for existing code. Change-Id: Ie8e2ee480930763f414bfaae63247b1fb6500c82 Reviewed-on: http://codereview.qt.nokia.com/4357 Reviewed-by: Qt Sanity Bot Reviewed-by: Vesa Rantanen Reviewed-by: Joona Petrell Reviewed-by: Lars Knoll --- src/gui/kernel/qguiapplication_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index bdf79d4394..9f64911399 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -173,6 +173,7 @@ public: static QFont *app_font; QStyleHints *styleHints; + QInputPanel *inputPanel; static bool quitOnLastWindowClosed; -- cgit v1.2.3 From 8be11227100498d7098eb7f39bbbe1e7ac6b01cf Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 8 Sep 2011 17:22:55 +0300 Subject: Add plugin mechanism to load platform input contexts Change-Id: I6e74fd395325445420efce4adf13e89abe8177ee Reviewed-on: http://codereview.qt-project.org/4482 Reviewed-by: Qt Sanity Bot Reviewed-by: Lars Knoll --- src/gui/kernel/qguiapplication_p.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/gui/kernel/qguiapplication_p.h') diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index 9f64911399..97cf7d371e 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -59,8 +59,6 @@ QT_BEGIN_NAMESPACE QT_MODULE(Gui) -class QPlatformIntegration; - class Q_GUI_EXPORT QGuiApplicationPrivate : public QCoreApplicationPrivate { Q_DECLARE_PUBLIC(QGuiApplication) -- cgit v1.2.3