Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohoswindowutils_p.h
Go to the documentation of this file.
1// Copyright (C) 2026 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QOHOSWINDOWUTILS_P_H
5#define QOHOSWINDOWUTILS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtHarmonyExtras/private/qtharmonyextrasglobal_p.h>
19
20#include <QtGui/qcolor.h>
21#include <QtGui/qscreen.h>
22#include <QtGui/qwindow.h>
23#include <QtWidgets/qwidget.h>
24#include <QtCore/qtypes.h>
25
26#include <optional>
27
28QT_BEGIN_NAMESPACE
29
30namespace QtHarmonyExtras {
31
32namespace Window {
33
34Q_NAMESPACE
35
42Q_ENUM_NS(WindowGeometryPersistenceHint)
43
44Q_HARMONYEXTRAS_EXPORT void setShowWindowAsFloatWindowHint(QWindow *window, bool showAsFloatWindow);
45Q_HARMONYEXTRAS_EXPORT void setShowWindowAsFloatWindowHint(QWidget *widget, bool showAsFloatWindow);
46
47Q_HARMONYEXTRAS_EXPORT void setWindowPrivacyMode(QWindow *window, bool privacyModeEnabled);
48
49Q_HARMONYEXTRAS_EXPORT void setSurfaceBackgroundColor(QWindow *window, const QColor &color);
50Q_HARMONYEXTRAS_EXPORT void setSurfaceBackgroundColor(QWidget *widget, const QColor &color);
51
52Q_HARMONYEXTRAS_EXPORT void setWindowCornerRadius(QWindow *window, double radius);
53Q_HARMONYEXTRAS_EXPORT void setWindowCornerRadius(QWidget *widget, double radius);
54
55Q_HARMONYEXTRAS_EXPORT void setWindowKeepScreenOn(QWindow *window, bool keepScreenOn);
56Q_HARMONYEXTRAS_EXPORT void setWindowKeepScreenOn(QWidget *widget, bool keepScreenOn);
57
58Q_HARMONYEXTRAS_EXPORT void setWindowDragResizable(QWindow *window, bool dragResizable);
59Q_HARMONYEXTRAS_EXPORT void setWindowDragResizable(QWidget *widget, bool dragResizable);
60
62
63}
64
66
68
69}
70
71QT_END_NAMESPACE
72
73#endif // QOHOSWINDOWUTILS_P_H
Combined button and popup list for selecting options.
void setWindowKeepScreenOn(QWindow *window, bool keepScreenOn)
Sets or unsets a given window to keep the screen on according to keepScreenOn.
void setWindowCornerRadius(QWindow *window, double radius)
Sets the corner radius of a window.
void setShowWindowAsFloatWindowHint(QWindow *window, bool showAsFloatWindow)
Sets or unsets a given window as a floating window according to showAsFloatWindow.
void setSurfaceBackgroundColor(QWindow *window, const QColor &color)
Sets a given color as the background color of the window inner native layer.
void setWindowDragResizable(QWindow *window, bool dragResizable)
Enables or disables resizing of window by dragging its edges according to dragResizable.
void setWindowPrivacyMode(QWindow *window, bool privacyModeEnabled)
Changes the privacy mode of window according to privacyModeEnabled.
void setMainWindowGeometryPersistenceHint(WindowGeometryPersistenceHint hint)
Sets whether the application's main window restores its last geometry on startup according to hint.
std::optional< qint64 > tryGetNativeWindowId(QWindow *window)
std::optional< qint64 > tryGetScreenDisplayId(QScreen *screen)