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
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
10Q_FORWARD_DECLARE_OBJC_CLASS(NSAlert);
11typedef long NSInteger;
12typedef NSInteger NSModalResponse;
13
14QT_BEGIN_NAMESPACE
15
16class QEventLoop;
17
19{
20public:
23
24 void exec() override;
25 bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override;
26 void hide() override;
27
28private:
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
36QT_END_NAMESPACE
37
38#endif // QCOCOAMESSAGEDIALOG_H
static void clearCurrentThreadCocoaEventDispatcherInterruptFlag()
QCocoaMessageDialog()=default
bool show(Qt::WindowFlags windowFlags, Qt::WindowModality windowModality, QWindow *parent) override
NSInteger NSModalResponse
static const NSInteger kModalResponseDialogHidden
static NSControlStateValue controlStateFor(Qt::CheckState state)
static QString toPlainText(const QString &text)
static Qt::CheckState checkStateFor(NSControlStateValue state)
long NSInteger