summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformdialoghelper.h
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-29 01:00:09 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-29 01:00:10 +0200
commit0e1866017fd389629629b150ce252820592506cd (patch)
tree681142ae0e610ef7af2a43ca2d62c3ea5ed5f91a /src/gui/kernel/qplatformdialoghelper.h
parent9567a34bc0d9be87d3b0d6cbcb841837ca1d5659 (diff)
parent9a8175a13124e156948914854d2fda7436065b08 (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/gui/kernel/qplatformdialoghelper.h')
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index 3000bd1af1..2c050535d8 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2016 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
@@ -460,6 +460,26 @@ public:
void setStandardButtons(QPlatformDialogHelper::StandardButtons buttons);
QPlatformDialogHelper::StandardButtons standardButtons() const;
+ struct CustomButton {
+ explicit CustomButton(
+ int id = -1, const QString &label = QString(),
+ QPlatformDialogHelper::ButtonRole role = QPlatformDialogHelper::InvalidRole,
+ void *button = nullptr) :
+ label(label), role(role), id(id), button(button)
+ {}
+
+ QString label;
+ QPlatformDialogHelper::ButtonRole role;
+ int id;
+ void *button; // strictly internal use only
+ };
+
+ int addButton(const QString &label, QPlatformDialogHelper::ButtonRole role,
+ void *buttonImpl = nullptr);
+ void removeButton(int id);
+ const QVector<CustomButton> &customButtons();
+ const CustomButton *customButton(int id);
+
private:
QMessageDialogOptionsPrivate *d;
};