summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJani Uusi-Rantala <jani.uusi-rantala@nokia.com>2011-10-08 19:45:22 +0300
committerQt by Nokia <qt-info@nokia.com>2011-10-10 13:17:44 +0200
commit38e4fa0a043fbb2e85b33bfdfe458f8d77c073a9 (patch)
treec7dd5d6b4ddcf4be2b4b8fb6215c5a86f441c121 /src
parent2374bf3915c165235c73ccd47524d7bdc80b4611 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qnamespace.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 4c1cff8eee..01de6807ed 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -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)