diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-04 11:22:28 +1000 |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-04 14:06:25 +1000 |
commit | ecff296323a81059810a91709f502921bc9277c2 (patch) | |
tree | 7208937647145b2e18234aae2d163ee68d92c1fa /tools/qml/qmlruntime.cpp | |
parent | f6d3753892353e6064fa1fc3c4bf0ba2fad900a6 (diff) | |
download | qt4-tools-ecff296323a81059810a91709f502921bc9277c2.tar.gz |
Revert to Portrait/Landscape terminology for Orientation enum, with
additional PortraitInverted and LandscapeInverted values. TopUp etc.
only indicates rotation which makes it difficult to resize the window
according to whether the device is in Portrait or Landscape orientation.
Diffstat (limited to 'tools/qml/qmlruntime.cpp')
-rw-r--r-- | tools/qml/qmlruntime.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index f68130332d..5b0139f689 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -581,10 +581,10 @@ void QDeclarativeViewer::createMenu(QMenuBar *menu, QMenu *flatmenu) orientation->setExclusive(true); connect(orientation, SIGNAL(triggered(QAction*)), this, SLOT(changeOrientation(QAction*))); - orientation->addAction(tr("orientation: TopUp")); - orientation->addAction(tr("orientation: LeftUp")); - orientation->addAction(tr("orientation: TopDown")); - orientation->addAction(tr("orientation: RightUp")); + orientation->addAction(tr("orientation: Portrait")); + orientation->addAction(tr("orientation: Landscape")); + orientation->addAction(tr("orientation: Portrait (Inverted)")); + orientation->addAction(tr("orientation: Landscape (Inverted)")); QList<QAction *> actions = orientation->actions(); for (int i=0; i<actions.count(); i++) { propertiesMenu->addAction(actions[i]); @@ -1177,14 +1177,14 @@ void QDeclarativeViewer::changeOrientation(QAction *action) action->setChecked(true); QString o = action->text().split(QLatin1Char(':')).value(1).trimmed(); - if (o == QLatin1String("TopUp")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopUp); - else if (o == QLatin1String("TopDown")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::TopDown); - else if (o == QLatin1String("LeftUp")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::LeftUp); - else if (o == QLatin1String("RightUp")) - DeviceOrientation::instance()->setOrientation(DeviceOrientation::RightUp); + if (o == QLatin1String("Portrait")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::Portrait); + else if (o == QLatin1String("Landscape")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::Landscape); + else if (o == QLatin1String("Portrait (Inverted)")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::PortraitInverted); + else if (o == QLatin1String("Landscape (Inverted)")) + DeviceOrientation::instance()->setOrientation(DeviceOrientation::LandscapeInverted); } void QDeclarativeViewer::orientationChanged() |