Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquicklabsplatformdialog_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKLABSPLATFORMDIALOG_P_H
6
#
define
QQUICKLABSPLATFORMDIALOG_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qobject
.
h
>
20
#
include
<
QtGui
/
qpa
/
qplatformtheme
.
h
>
21
#
include
<
QtGui
/
qpa
/
qplatformdialoghelper
.
h
>
22
#
include
<
QtQml
/
qqmlparserstatus
.
h
>
23
#
include
<
QtQml
/
qqmllist
.
h
>
24
#
include
<
QtQml
/
qqml
.
h
>
25
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
26
27
QT_BEGIN_NAMESPACE
28
29
class
QWindow;
30
class
QPlatformDialogHelper;
31
32
class
QQuickLabsPlatformDialog
:
public
QObject
,
public
QQmlParserStatus
33
{
34
Q_OBJECT
35
Q_INTERFACES(QQmlParserStatus)
36
QML_NAMED_ELEMENT
(
Dialog
)
37
QML_ADDED_IN_VERSION
(1, 0)
38
QML_UNCREATABLE
(
"Dialog is an abstract base class"
)
39
Q_PROPERTY
(
QQmlListProperty
<
QObject
>
data
READ
data
FINAL
)
40
Q_PROPERTY
(
QWindow
*
parentWindow
READ
parentWindow
WRITE
setParentWindow
NOTIFY
parentWindowChanged
FINAL
)
41
Q_PROPERTY
(
QString
title
READ
title
WRITE
setTitle
NOTIFY
titleChanged
FINAL
)
42
Q_PROPERTY
(
Qt
::
WindowFlags
flags
READ
flags
WRITE
setFlags
NOTIFY
flagsChanged
FINAL
)
43
Q_PROPERTY
(
Qt
::
WindowModality
modality
READ
modality
WRITE
setModality
NOTIFY
modalityChanged
FINAL
)
44
Q_PROPERTY
(
bool
visible
READ
isVisible
WRITE
setVisible
NOTIFY
visibleChanged
FINAL
)
45
Q_PROPERTY
(
int
result
READ
result
WRITE
setResult
NOTIFY
resultChanged
FINAL
)
46
Q_CLASSINFO
(
"DefaultProperty"
,
"data"
)
47
48
public
:
49
explicit
QQuickLabsPlatformDialog
(
QPlatformTheme
::
DialogType
type
,
QObject
*
parent
=
nullptr
);
50
~
QQuickLabsPlatformDialog
();
51
52
QPlatformDialogHelper *
handle
()
const
;
53
54
QQmlListProperty
<
QObject
>
data
();
55
56
QWindow *
parentWindow
()
const
;
57
void
setParentWindow
(QWindow *window);
58
59
QString
title
()
const
;
60
void
setTitle
(
const
QString &title);
61
62
Qt
::
WindowFlags
flags
()
const
;
63
void
setFlags
(Qt::WindowFlags flags);
64
65
Qt
::
WindowModality
modality
()
const
;
66
void
setModality
(Qt::WindowModality modality);
67
68
bool
isVisible
()
const
;
69
void
setVisible
(
bool
visible);
70
71
enum
StandardCode
{
Rejected
,
Accepted
};
72
Q_ENUM
(
StandardCode
)
73
74
int
result
()
const
;
75
void
setResult
(
int
result);
76
77
public
Q_SLOTS
:
78
void
open
();
79
void
close
();
80
virtual
void
accept
();
81
virtual
void
reject
();
82
virtual
void
done
(
int
result);
83
84
Q_SIGNALS
:
85
void
accepted
();
86
void
rejected
();
87
void
parentWindowChanged
();
88
void
titleChanged
();
89
void
flagsChanged
();
90
void
modalityChanged
();
91
void
visibleChanged
();
92
void
resultChanged
();
93
94
protected
:
95
void
classBegin
()
override
;
96
void
componentComplete
()
override
;
97
98
bool
create
();
99
void
destroy
();
100
101
virtual
bool
useNativeDialog
()
const
;
102
virtual
void
onCreate
(QPlatformDialogHelper *dialog);
103
virtual
void
onShow
(QPlatformDialogHelper *dialog);
104
virtual
void
onHide
(QPlatformDialogHelper *dialog);
105
106
QWindow *
findParentWindow
()
const
;
107
108
private
:
109
bool
m_visible;
110
bool
m_complete;
111
int
m_result;
112
QWindow *m_parentWindow;
113
QString m_title;
114
Qt::WindowFlags m_flags;
115
Qt::WindowModality m_modality;
116
QPlatformTheme::DialogType m_type;
117
QList<QObject *> m_data;
118
QPlatformDialogHelper *m_handle;
119
};
120
121
QT_END_NAMESPACE
122
123
#
endif
// QQUICKLABSPLATFORMDIALOG_P_H
QQuickLabsPlatformDialog
Definition
qquicklabsplatformdialog_p.h:33
QQuickLabsPlatformDialog::data
QQmlListProperty< QObject > data()
QQuickLabsPlatformDialog::reject
virtual void reject()
\qmlmethod void Qt.labs.platform::Dialog::reject()
Definition
qquicklabsplatformdialog.cpp:280
QQuickLabsPlatformDialog::destroy
void destroy()
Definition
qquicklabsplatformdialog.cpp:336
QQuickLabsPlatformDialog::result
int result() const
\qmlproperty int Qt.labs.platform::Dialog::result
Definition
qquicklabsplatformdialog.cpp:211
QQuickLabsPlatformDialog::parentWindowChanged
void parentWindowChanged()
QQuickLabsPlatformDialog::close
void close()
\qmlmethod void Qt.labs.platform::Dialog::close()
Definition
qquicklabsplatformdialog.cpp:250
QQuickLabsPlatformDialog::rejected
void rejected()
QQuickLabsPlatformDialog::setResult
void setResult(int result)
Definition
qquicklabsplatformdialog.cpp:216
QQuickLabsPlatformDialog::resultChanged
void resultChanged()
QQuickLabsPlatformDialog::visibleChanged
void visibleChanged()
QQuickLabsPlatformDialog::isVisible
bool isVisible() const
\qmlproperty bool Qt.labs.platform::Dialog::visible
Definition
qquicklabsplatformdialog.cpp:186
QQuickLabsPlatformDialog::~QQuickLabsPlatformDialog
~QQuickLabsPlatformDialog()
Definition
qquicklabsplatformdialog.cpp:72
QQuickLabsPlatformDialog::titleChanged
void titleChanged()
QQuickLabsPlatformDialog::classBegin
void classBegin() override
Invoked after class creation, but before any properties have been set.
Definition
qquicklabsplatformdialog.cpp:303
QQuickLabsPlatformDialog::parentWindow
QWindow * parentWindow() const
\qmlproperty Window Qt.labs.platform::Dialog::parentWindow
Definition
qquicklabsplatformdialog.cpp:103
QQuickLabsPlatformDialog::onShow
virtual void onShow(QPlatformDialogHelper *dialog)
Definition
qquicklabsplatformdialog.cpp:353
QQuickLabsPlatformDialog::setParentWindow
void setParentWindow(QWindow *window)
Definition
qquicklabsplatformdialog.cpp:108
QQuickLabsPlatformDialog::setVisible
void setVisible(bool visible)
Definition
qquicklabsplatformdialog.cpp:191
QQuickLabsPlatformDialog::onHide
virtual void onHide(QPlatformDialogHelper *dialog)
Definition
qquicklabsplatformdialog.cpp:358
QQuickLabsPlatformDialog::create
bool create()
Definition
qquicklabsplatformdialog.cpp:319
QQuickLabsPlatformDialog::handle
QPlatformDialogHelper * handle() const
Definition
qquicklabsplatformdialog.cpp:77
QQuickLabsPlatformDialog::findParentWindow
QWindow * findParentWindow() const
Definition
qquicklabsplatformdialog.cpp:363
QQuickLabsPlatformDialog::flagsChanged
void flagsChanged()
QQuickLabsPlatformDialog::title
QString title() const
\qmlproperty string Qt.labs.platform::Dialog::title
Definition
qquicklabsplatformdialog.cpp:122
QQuickLabsPlatformDialog::modality
Qt::WindowModality modality() const
\qmlproperty Qt::WindowModality Qt.labs.platform::Dialog::modality
Definition
qquicklabsplatformdialog.cpp:165
QQuickLabsPlatformDialog::done
virtual void done(int result)
\qmlmethod void Qt.labs.platform::Dialog::done(int result)
Definition
qquicklabsplatformdialog.cpp:292
QQuickLabsPlatformDialog::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qquicklabsplatformdialog.cpp:307
QQuickLabsPlatformDialog::setTitle
void setTitle(const QString &title)
Definition
qquicklabsplatformdialog.cpp:127
QQuickLabsPlatformDialog::onCreate
virtual void onCreate(QPlatformDialogHelper *dialog)
Definition
qquicklabsplatformdialog.cpp:348
QQuickLabsPlatformDialog::accept
virtual void accept()
\qmlmethod void Qt.labs.platform::Dialog::accept()
Definition
qquicklabsplatformdialog.cpp:268
QQuickLabsPlatformDialog::setFlags
void setFlags(Qt::WindowFlags flags)
Definition
qquicklabsplatformdialog.cpp:146
QQuickLabsPlatformDialog::modalityChanged
void modalityChanged()
QQuickLabsPlatformDialog::flags
Qt::WindowFlags flags() const
\qmlproperty Qt::WindowFlags Qt.labs.platform::Dialog::flags
Definition
qquicklabsplatformdialog.cpp:141
QQuickLabsPlatformDialog::setModality
void setModality(Qt::WindowModality modality)
Definition
qquicklabsplatformdialog.cpp:170
QQuickLabsPlatformDialog::StandardCode
StandardCode
Definition
qquicklabsplatformdialog_p.h:71
QQuickLabsPlatformDialog::Rejected
@ Rejected
Definition
qquicklabsplatformdialog_p.h:71
QQuickLabsPlatformDialog::Accepted
@ Accepted
Definition
qquicklabsplatformdialog_p.h:71
QQuickLabsPlatformDialog::useNativeDialog
virtual bool useNativeDialog() const
Definition
qquicklabsplatformdialog.cpp:342
qtdeclarative
src
labs
platform
qquicklabsplatformdialog_p.h
Generated on
for Qt by
1.18.0