Enable using the new Qt::ScreenOrientation enum as flags

Going to be useful later on in multiple places...

- Respecified Qt::ScreenOrientation as bit values
- Added Qt::ScreenOrientations QFlags definitions

Change-Id: Ib7648d23de79ea5f88d617015bc98efcf903a8f3
Signed-off-by: Jani Uusi-Rantala <jani.uusi-rantala@nokia.com>
Reviewed-on: http://codereview.qt-project.org/6268
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Jani Uusi-Rantala 2011-10-08 19:45:22 +03:00 committed by Qt by Nokia
parent 2374bf3915
commit 38e4fa0a04

View File

@ -86,8 +86,10 @@ Qt {
Q_FLAGS(MatchFlags)
Q_FLAGS(KeyboardModifiers MouseButtons)
Q_ENUMS(WindowType WindowState WindowModality WidgetAttribute ApplicationAttribute)
Q_ENUMS(ScreenOrientation)
Q_ENUMS(InputMethodHint)
Q_FLAGS(WindowFlags WindowStates InputMethodHints)
Q_FLAGS(ScreenOrientations)
Q_ENUMS(ConnectionType)
#ifndef QT_NO_GESTURES
Q_ENUMS(GestureState)
@ -284,13 +286,15 @@ public:
Q_DECLARE_FLAGS(WindowStates, WindowState)
enum ScreenOrientation {
UnknownOrientation,
LandscapeOrientation,
PortraitOrientation,
InvertedLandscapeOrientation,
InvertedPortraitOrientation
UnknownOrientation = 0x00000000,
PortraitOrientation = 0x00000001,
LandscapeOrientation = 0x00000002,
InvertedPortraitOrientation = 0x00000004,
InvertedLandscapeOrientation = 0x00000008
};
Q_DECLARE_FLAGS(ScreenOrientations, ScreenOrientation)
enum WidgetAttribute {
WA_Disabled = 0,
WA_UnderMouse = 1,
@ -1529,6 +1533,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ImageConversionFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DockWidgetAreas)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ToolBarAreas)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::WindowStates)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ScreenOrientations)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::DropActions)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::ItemFlags)
Q_DECLARE_OPERATORS_FOR_FLAGS(Qt::MatchFlags)