diff options
Diffstat (limited to 'src/gui/kernel/qguiapplication_p.h')
-rw-r--r-- | src/gui/kernel/qguiapplication_p.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h index ec63876058..81f616e773 100644 --- a/src/gui/kernel/qguiapplication_p.h +++ b/src/gui/kernel/qguiapplication_p.h @@ -34,6 +34,8 @@ # include "private/qshortcutmap_p.h" #endif +#include <QtCore/qpointer.h> + #include <memory> QT_BEGIN_NAMESPACE @@ -113,7 +115,8 @@ public: static void processEnterEvent(QWindowSystemInterfacePrivate::EnterEvent *e); static void processLeaveEvent(QWindowSystemInterfacePrivate::LeaveEvent *e); - static void processActivatedEvent(QWindowSystemInterfacePrivate::ActivatedWindowEvent *e); + static void processFocusWindowEvent(QWindowSystemInterfacePrivate::FocusWindowEvent *e); + static void processWindowStateChangedEvent(QWindowSystemInterfacePrivate::WindowStateChangedEvent *e); static void processWindowScreenChangedEvent(QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e); static void processWindowDevicePixelRatioChangedEvent(QWindowSystemInterfacePrivate::WindowDevicePixelRatioChangedEvent *e); @@ -193,8 +196,11 @@ public: virtual Qt::WindowModality defaultModality() const; virtual bool windowNeverBlocked(QWindow *window) const; bool isWindowBlocked(QWindow *window, QWindow **blockingWindow = nullptr) const; - virtual bool popupActive() { return false; } - virtual bool closeAllPopups() { return false; } + static qsizetype popupCount() { return QGuiApplicationPrivate::popup_list.size(); } + static QWindow *activePopupWindow(); + static void activatePopup(QWindow *popup); + static bool closePopup(QWindow *popup); + static bool closeAllPopups(); static Qt::MouseButton mousePressButton; static struct QLastCursorPosition { @@ -255,6 +261,8 @@ public: static QPalette *app_pal; static QWindowList window_list; + static QWindowList popup_list; + static const QWindow *active_popup_on_press; static QWindow *focus_window; #ifndef QT_NO_CURSOR @@ -267,6 +275,7 @@ public: static QString styleOverride; static QStyleHints *styleHints; static bool obey_desktop_settings; + static bool popup_closed_on_press; QInputMethod *inputMethod; QString firstWindowTitle; @@ -320,6 +329,8 @@ public: static void updatePalette(); + static QEvent::Type contextMenuEventType(); + protected: virtual void handleThemeChanged(); @@ -335,8 +346,7 @@ private: static void clearPalette(); friend class QDragManager; - - static Qt::ColorScheme colorScheme(); + friend class QWindowPrivate; static QGuiApplicationPrivate *self; static int m_fakeMouseSourcePointId; @@ -400,8 +410,6 @@ struct Q_GUI_EXPORT QWindowsApplication virtual bool isWinTabEnabled() const = 0; virtual bool setWinTabEnabled(bool enabled) = 0; - virtual bool isDarkMode() const = 0; - virtual DarkModeHandling darkModeHandling() const = 0; virtual void setDarkModeHandling(DarkModeHandling handling) = 0; @@ -420,7 +428,7 @@ struct Q_GUI_EXPORT QWindowsApplication virtual QVariant gpu() const = 0; // internal, used by qtdiag virtual QVariant gpuList() const = 0; - virtual void lightSystemPalette(QPalette &pal) const = 0; + virtual void populateLightSystemPalette(QPalette &pal) const = 0; }; #endif // Q_OS_WIN |