1 #ifndef QMAEMO5ROTATOR_H
2 #define QMAEMO5ROTATOR_H
4 // Provides a means of WORKING automatic rotation for Maemo 5 apps. (The default Qt solution is buggy.)
6 #include <X11/extensions/Xrandr.h>
11 class QMaemo5Rotator : private QObject
20 AutomaticBehavior = 0,
21 LandscapeBehavior = 1,
34 LandscapeOrientation = 0,
35 PortraitOrientation = 1
41 RotationBehavior _currentBehavior;
42 Orientation _currentOrientation;
43 static bool setRotation(direction);
47 explicit QMaemo5Rotator(RotationBehavior behavior = LandscapeBehavior, QWidget *parent = NULL);
50 const RotationBehavior currentBehavior();
51 const Orientation currentOrientation();
52 void setCurrentBehavior(RotationBehavior value);
53 void setCurrentOrientation(Orientation value);
58 void on_orientation_changed(const QString& newOrienation);
62 void orientationChanged(Orientation orientation);
65 #endif // QMAEMO5ROTATOR_H