Commit c6757817d5708170bfb6fcb5a019403d48835e79
Fixed setting initial orientation listening mode
| |   |
| 14 | 14 | |
| 15 | 15 | class QOrientationCapabilityPrivate; |
| 16 | 16 | |
| QOrientationCapability::QOrientationCapability(QWidget* parent, bool updateCurrentOrientation): |
| QOrientationCapability::QOrientationCapability(QWidget* parent, bool automaticOrientationUpdate): |
| 18 | 18 | QObject(parent) |
| 19 | 19 | { |
| 20 | 20 | MAEMO_INITIALIZE(QOrientationCapability); |
|
| priv->setListeningOrientationChanges(automaticOrientationUpdate); |
| 21 | 23 | } |
| 22 | 24 | |
| 23 | 25 | QOrientationCapability::~QOrientationCapability() |
| |   |
| 29 | 29 | |
| 30 | 30 | public: |
| 31 | 31 | |
| QOrientationCapability(QWidget* parent, bool updateCurrentOrientation = false); |
| QOrientationCapability(QWidget* parent, bool automaticOrientationUpdate = false); |
| 33 | 33 | ~QOrientationCapability(); |
| 34 | 34 | |
| 35 | 35 | QOrientation orientation() const; |
| |   |
| 29 | 29 | MAEMO_DECLARE_PUBLIC(QOrientationCapability); |
| 30 | 30 | |
| 31 | 31 | public: |
| QOrientationCapabilityPrivate(bool updateCurrentOrientation = false); |
| QOrientationCapabilityPrivate(); |
| 33 | 33 | ~QOrientationCapabilityPrivate(); |
| 34 | 34 | |
| 35 | 35 | inline bool islisteningOrientationChanges() const; |
| … | … | |
| 50 | 50 | |
| 51 | 51 | /* begin private class implementation */ |
| 52 | 52 | |
| QOrientationCapabilityPrivate::QOrientationCapabilityPrivate(bool updateCurrentOrientation) |
| QOrientationCapabilityPrivate::QOrientationCapabilityPrivate() |
| 54 | 54 | { |
| 55 | 55 | // Set application to support portrait mode |
| 56 | 56 | MAEMO_PUBLIC(QOrientationCapability); |
| 57 | 57 | Maemo::setIntXProperty(qobject_cast<QWidget *>(pub->parent()), PORTRAIT_MODE_SUPPORT, 1); |
| 58 | 58 | |
| /* |
| 59 | 60 | // Update current orientation to portrait/landscape if desired |
| 60 | 61 | if (updateCurrentOrientation) |
| 61 | 62 | { |
| … | … | |
| 69 | 69 | // Ignore the last three arguments of the orientation information (x, y and z axis) |
| 70 | 70 | QDBusConnection::systemBus().callWithCallback(msg, pub, SLOT(orientationUpdate(QString, QString, QString))); |
| 71 | 71 | } |
| */ |
| 72 | 73 | } |
| 73 | 74 | |
| 74 | 75 | QOrientationCapabilityPrivate::~QOrientationCapabilityPrivate() |