Add Q_ENUM to enum classes

This commit is contained in:
Aleix Pol 2021-06-08 22:22:39 +02:00
parent 09f99df1a3
commit 059b78337f

View file

@ -42,12 +42,14 @@ public:
Flipped180, Flipped180,
Flipped270 Flipped270
}; };
Q_ENUM(Transform)
enum class ModeFlag : uint { enum class ModeFlag : uint {
Current = 0x1, Current = 0x1,
Preferred = 0x2, Preferred = 0x2,
}; };
Q_DECLARE_FLAGS(ModeFlags, ModeFlag) Q_DECLARE_FLAGS(ModeFlags, ModeFlag)
Q_ENUM(ModeFlag)
struct Mode struct Mode
{ {
@ -63,6 +65,7 @@ public:
Suspend, Suspend,
Off, Off,
}; };
Q_ENUM(DpmsMode)
enum class Capability : uint { enum class Capability : uint {
Dpms = 0x1, Dpms = 0x1,
@ -79,6 +82,7 @@ public:
Vertical_RGB, Vertical_RGB,
Vertical_BGR, Vertical_BGR,
}; };
Q_ENUM(SubPixel)
explicit AbstractWaylandOutput(QObject *parent = nullptr); explicit AbstractWaylandOutput(QObject *parent = nullptr);