logsui/logsapp/tsrc/ut_logsapp/stubs/hbstubs.cpp
changeset 25 76a2435edfd4
parent 24 0ba2181d7c28
--- a/logsui/logsapp/tsrc/ut_logsapp/stubs/hbstubs.cpp	Fri Mar 19 09:27:18 2010 +0200
+++ b/logsui/logsapp/tsrc/ut_logsapp/stubs/hbstubs.cpp	Fri Apr 16 14:53:18 2010 +0300
@@ -24,6 +24,7 @@
 #include <hbapplication.h>
 #include <QCoreApplication>
 #include <QTimer>
+#include <QGesture>
 
 int actionCount = 0;
 Qt::Orientation windowOrientation = Qt::Vertical;
@@ -35,6 +36,7 @@
 QString selectedActionString = "none";
 bool testSingleShotTimer = false;
 bool testQuitCalled = false;
+Qt::GestureState testState = Qt::NoGesture;
 
 void HbStubHelper::reset()
 {
@@ -64,6 +66,17 @@
     return testQuitCalled;
 }
 
+void HbStubHelper::setGestureState(int state)
+{
+    testState = static_cast<Qt::GestureState> (state);
+}
+
+
+Qt::GestureState QGesture::state() const
+{
+    return testState;
+}
+
 // -----------------------------------------------------------------------------
 //
 // -----------------------------------------------------------------------------
@@ -128,8 +141,9 @@
     testWindow = 0;
 }
     
-void HbMainWindow::setOrientation(Qt::Orientation orientation)
+void HbMainWindow::setOrientation(Qt::Orientation orientation, bool animate)
 {
+		Q_UNUSED(animate)
     windowOrientation = orientation; 
 }
 
@@ -169,9 +183,10 @@
     testViewCount++;
 }
 
-void HbMainWindow::setCurrentView(HbView *view, bool animate)
+void HbMainWindow::setCurrentView(HbView *view, bool animate, Hb::ViewSwitchFlags flags)
 {
     Q_UNUSED(animate)
+    Q_UNUSED(flags)
     testView = view;
 }
 
@@ -216,7 +231,7 @@
     
     if (string == "Ok") {
     	selectedActionString = "primary";
-    	} else if (string == "Cancel") {
+    } else if (string == "Cancel") {
     	selectedActionString = "secondary";
     }
    
@@ -225,10 +240,10 @@
 
 HbAction *HbDialog::exec()
 {
-   if (selectedActionString == "primary")	{
-   	  return primaryAction();
-   	} else {
-   	return 0;
+    if (selectedActionString == "primary")	{
+        return primaryAction();
+    } else {
+        return 0;
     }
 }