summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qplatformdialoghelper.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-02 23:17:57 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-12-09 19:00:03 +0000
commitb8922c35ba9090b0d030baca4f38c5f468440098 (patch)
tree265ec3dbca905c3dfd4ee7c17d0e0f815966d2b5 /src/gui/kernel/qplatformdialoghelper.h
parente8c7f77854c23b962cae1018feccc8842c92b954 (diff)
Register QPA Menu, Dialog & SysTray enums & flags
This allows QML Menu, Dialog & SystemTrayIcon to use the same enums without having to duplicate them. Change-Id: I1401583d3ae2ef07cdc795d2765fba07c9b30f2f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel/qplatformdialoghelper.h')
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index 936dbdfa89..5b2f4ece77 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -104,6 +104,7 @@ public:
};
Q_DECLARE_FLAGS(StandardButtons, StandardButton)
+ Q_FLAG(StandardButtons)
enum ButtonRole {
// keep this in sync with QDialogButtonBox::ButtonRole and QMessageBox::ButtonRole
@@ -128,6 +129,7 @@ public:
Reverse = 0x40000000,
EOL = InvalidRole
};
+ Q_ENUM(ButtonRole)
enum ButtonLayout {
// keep this in sync with QDialogButtonBox::ButtonLayout and QMessageBox::ButtonLayout
@@ -167,6 +169,7 @@ QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QColorDialogOptions
{
+ Q_GADGET
public:
enum ColorDialogOption {
ShowAlphaChannel = 0x00000001,
@@ -175,6 +178,7 @@ public:
};
Q_DECLARE_FLAGS(ColorDialogOptions, ColorDialogOption)
+ Q_FLAG(ColorDialogOptions)
QColorDialogOptions();
QColorDialogOptions(const QColorDialogOptions &rhs);
@@ -226,6 +230,7 @@ private:
class Q_GUI_EXPORT QFontDialogOptions
{
+ Q_GADGET
public:
enum FontDialogOption {
NoButtons = 0x00000001,
@@ -237,6 +242,7 @@ public:
};
Q_DECLARE_FLAGS(FontDialogOptions, FontDialogOption)
+ Q_FLAG(FontDialogOptions)
QFontDialogOptions();
QFontDialogOptions(const QFontDialogOptions &rhs);
@@ -279,11 +285,19 @@ private:
class Q_GUI_EXPORT QFileDialogOptions
{
+ Q_GADGET
public:
enum ViewMode { Detail, List };
+ Q_ENUM(ViewMode)
+
enum FileMode { AnyFile, ExistingFile, Directory, ExistingFiles, DirectoryOnly };
+ Q_ENUM(FileMode)
+
enum AcceptMode { AcceptOpen, AcceptSave };
+ Q_ENUM(AcceptMode)
+
enum DialogLabel { LookIn, FileName, FileType, Accept, Reject, DialogLabelCount };
+ Q_ENUM(DialogLabel)
enum FileDialogOption
{
@@ -297,6 +311,7 @@ public:
DontUseCustomDirectoryIcons = 0x00000080
};
Q_DECLARE_FLAGS(FileDialogOptions, FileDialogOption)
+ Q_FLAG(FileDialogOptions)
QFileDialogOptions();
QFileDialogOptions(const QFileDialogOptions &rhs);
@@ -396,9 +411,11 @@ private:
class Q_GUI_EXPORT QMessageDialogOptions
{
+ Q_GADGET
public:
// Keep in sync with QMessageBox::Icon
enum Icon { NoIcon, Information, Warning, Critical, Question };
+ Q_ENUM(Icon)
QMessageDialogOptions();
QMessageDialogOptions(const QMessageDialogOptions &rhs);