summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriano Rezende <adriano.rezende@openbossa.org>2009-11-17 13:25:23 -0300
committerAdriano Rezende <adriano.rezende@openbossa.org>2009-11-17 13:43:24 -0300
commit2ecd7d8f4e2abed38607676a600cf47b407674c8 (patch)
tree7388eaa0f6e3a7bd140019bc700881e6b4b5770b
parent361c0d9a506628875d239df4d6e1701a24ffe6f6 (diff)
HyperUI: Changed code to use System class from shared
Signed-off-by: Adriano Rezende <adriano.rezende@openbossa.org>
-rw-r--r--hyperui/hyperui.pro2
-rw-r--r--hyperui/main.cpp2
-rw-r--r--hyperui/mainwindow.cpp27
-rw-r--r--hyperui/mainwindow.h4
4 files changed, 4 insertions, 31 deletions
diff --git a/hyperui/hyperui.pro b/hyperui/hyperui.pro
index 63a21c6..e6da0dc 100644
--- a/hyperui/hyperui.pro
+++ b/hyperui/hyperui.pro
@@ -25,6 +25,7 @@ HEADERS += mainwindow.h \
clockwidget.h \
../shared/button.h \
../shared/label.h \
+ ../shared/system.h \
../shared/resource.h
SOURCES += main.cpp \
@@ -38,6 +39,7 @@ SOURCES += main.cpp \
clockwidget.cpp \
../shared/button.cpp \
../shared/label.cpp \
+ ../shared/system.cpp \
../shared/resource.cpp
isEmpty(RESOLUTION) {
diff --git a/hyperui/main.cpp b/hyperui/main.cpp
index afeb479..21ab3e4 100644
--- a/hyperui/main.cpp
+++ b/hyperui/main.cpp
@@ -33,6 +33,7 @@
#include <QGraphicsScene>
#include <QGraphicsView>
+#include "system.h"
#include "resource.h"
#include "mainwindow.h"
@@ -69,6 +70,7 @@ int main(int argc, char **argv)
#ifdef Q_OS_SYMBIAN
view.showFullScreen();
+ System::setViewMode(System::PortraitMode);
#else
view.setFixedSize(width, height);
view.show();
diff --git a/hyperui/mainwindow.cpp b/hyperui/mainwindow.cpp
index e759003..0449168 100644
--- a/hyperui/mainwindow.cpp
+++ b/hyperui/mainwindow.cpp
@@ -40,12 +40,6 @@
#include "clockwidget.h"
#include "draggablepreview.h"
-#ifdef Q_OS_SYMBIAN
-#include <eikenv.h>
-#include <coemain.h>
-#include <aknappui.h>
-#endif
-
MainWindow::MainWindow(QGraphicsItem *parent)
: QGraphicsWidget(parent),
@@ -96,12 +90,6 @@ MainWindow::MainWindow(QGraphicsItem *parent)
iconBattery->setPos(Resource::value("topbar/icon-battery-pos").toPoint());
createDummyDailyEvents();
-
-#ifdef Q_OS_SYMBIAN
- // The line below is necessary, since CAknAppUi object is only
- // available in the main loop.
- QTimer::singleShot(0, this, SLOT(lockPortraitMode()));
-#endif
}
void MainWindow::onDragModeIn()
@@ -156,18 +144,3 @@ void MainWindow::paint(QPainter *painter, const QStyleOptionGraphicsItem *option
painter->drawPixmap(0, 0, m_background);
}
-
-/*!
- Lock the screen in portrait mode.
-
- \todo Add support to maemo portrait mode.
-*/
-#ifdef Q_OS_SYMBIAN
-void MainWindow::lockPortraitMode()
-{
- CAknAppUi *aknAppUi = dynamic_cast<CAknAppUi *>(CEikonEnv::Static()->AppUi());
-
- if (aknAppUi)
- aknAppUi->SetOrientationL(CAknAppUi::EAppUiOrientationPortrait);
-}
-#endif
diff --git a/hyperui/mainwindow.h b/hyperui/mainwindow.h
index f8c7756..e085214 100644
--- a/hyperui/mainwindow.h
+++ b/hyperui/mainwindow.h
@@ -60,10 +60,6 @@ private slots:
void onDragModeOut();
void onMaximizeFinished();
-#ifdef Q_OS_SYMBIAN
- void lockPortraitMode();
-#endif
-
private:
void createDummyDailyEvents();