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.)
10 #include <X11/extensions/Xrandr.h>
13 class QMaemo5Rotator : private QObject
22 AutomaticBehavior = 0,
23 LandscapeBehavior = 1,
36 LandscapeOrientation = 0,
37 PortraitOrientation = 1
43 RotationBehavior _currentBehavior;
44 Orientation _currentOrientation;
45 bool setRotation(direction);
49 explicit QMaemo5Rotator(RotationBehavior behavior = LandscapeBehavior, QWidget *parent = NULL);
52 const RotationBehavior currentBehavior();
53 const Orientation currentOrientation();
54 void setCurrentBehavior(RotationBehavior value);
55 void setCurrentOrientation(Orientation value);
60 void on_orientation_changed(const QString& newOrienation);
64 void orientationChanged(Orientation orientation);
67 #endif // QMAEMO5ROTATOR_H