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
qcocoamessagedialog.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
QCOCOAMESSAGEDIALOG_H
6
#
define
QCOCOAMESSAGEDIALOG_H
7
8
#
include
<
qpa
/
qplatformdialoghelper
.
h
>
9
10
Q_FORWARD_DECLARE_OBJC_CLASS
(
NSAlert
);
11
typedef
long
NSInteger;
12
typedef
NSInteger
NSModalResponse
;
13
14
QT_BEGIN_NAMESPACE
15
16
class
QEventLoop;
17
18
class
QCocoaMessageDialog
:
public
QPlatformMessageDialogHelper
19
{
20
public
:
21
QCocoaMessageDialog
() =
default
;
22
~
QCocoaMessageDialog
();
23
24
void
exec
()
override
;
25
bool
show
(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent)
override
;
26
void
hide
()
override
;
27
28
private
:
29
Qt::WindowModality modality()
const
;
30
NSAlert *m_alert =
nullptr
;
31
QEventLoop *m_eventLoop =
nullptr
;
32
NSModalResponse
runModal()
const
;
33
void
processResponse(
NSModalResponse
response);
34
};
35
36
QT_END_NAMESPACE
37
38
#
endif
// QCOCOAMESSAGEDIALOG_H
QCocoaEventDispatcher
Definition
qcocoaeventdispatcher.h:46
QCocoaEventDispatcher::clearCurrentThreadCocoaEventDispatcherInterruptFlag
static void clearCurrentThreadCocoaEventDispatcherInterruptFlag()
Definition
qcocoaeventdispatcher.mm:936
QCocoaMessageDialog
Definition
qcocoamessagedialog.h:19
QCocoaMessageDialog::hide
void hide() override
Definition
qcocoamessagedialog.mm:395
QCocoaMessageDialog::exec
void exec() override
Definition
qcocoamessagedialog.mm:311
QCocoaMessageDialog::~QCocoaMessageDialog
~QCocoaMessageDialog()
Definition
qcocoamessagedialog.mm:29
QCocoaMessageDialog::QCocoaMessageDialog
QCocoaMessageDialog()=default
QCocoaMessageDialog::show
bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override
Definition
qcocoamessagedialog.mm:70
QCocoaWindow
Definition
qcocoawindow.h:74
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
NSModalResponse
NSInteger NSModalResponse
Definition
qcocoamessagedialog.h:12
Q_FORWARD_DECLARE_OBJC_CLASS
Q_FORWARD_DECLARE_OBJC_CLASS(NSAlert)
kModalResponseDialogHidden
static const NSInteger kModalResponseDialogHidden
Definition
qcocoamessagedialog.mm:328
controlStateFor
static NSControlStateValue controlStateFor(Qt::CheckState state)
Definition
qcocoamessagedialog.mm:51
toPlainText
static QString toPlainText(const QString &text)
Definition
qcocoamessagedialog.mm:35
checkStateFor
static Qt::CheckState checkStateFor(NSControlStateValue state)
Definition
qcocoamessagedialog.mm:330
NSInteger
long NSInteger
Definition
qcocoawindow.h:33
qtbase
src
plugins
platforms
cocoa
qcocoamessagedialog.h
Generated on
for Qt by
1.18.0