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.)
11 class QMaemo5Rotator : private QObject
20 AutomaticBehavior = 0,
21 LandscapeBehavior = 1,
27 LandscapeOrientation = 0,
28 PortraitOrientation = 1
34 RotationBehavior _currentBehavior;
35 Orientation _currentOrientation;
39 explicit QMaemo5Rotator(RotationBehavior behavior = LandscapeBehavior, QWidget *parent = NULL);
42 const RotationBehavior currentBehavior();
43 const Orientation currentOrientation();
44 void setCurrentBehavior(RotationBehavior value);
45 void setCurrentOrientation(Orientation value);
49 void on_orientation_changed(const QString& newOrienation);
53 void orientationChanged(Orientation orientation);
56 #endif // QMAEMO5ROTATOR_H