1 #ifndef QMAEMO5ROTATOR_H
2 #define QMAEMO5ROTATOR_H
5 // Provides a means of WORKING automatic rotation for Maemo 5 apps. (The default Qt solution is buggy.)
12 class QMaemo5Rotator : private QObject
21 AutomaticBehavior = 0,
22 LandscapeBehavior = 1,
28 LandscapeOrientation = 0,
29 PortraitOrientation = 1
35 RotationBehavior _currentBehavior;
36 Orientation _currentOrientation;
40 explicit QMaemo5Rotator(RotationBehavior behavior = LandscapeBehavior, QWidget *parent = NULL);
43 const RotationBehavior currentBehavior();
44 const Orientation currentOrientation();
45 void setCurrentBehavior(RotationBehavior value);
46 void setCurrentOrientation(Orientation value);
50 void on_orientation_changed(const QString& newOrienation);
54 void orientationChanged(Orientation orientation);
58 #endif // QMAEMO5ROTATOR_H