logsui/logsapp/tsrc/ut_logsapp/stubs/hbstubs.cpp
changeset 4 e52d42f9500c
parent 2 7119b73b84d6
child 6 41c0a814d878
--- a/logsui/logsapp/tsrc/ut_logsapp/stubs/hbstubs.cpp	Fri May 14 15:52:41 2010 +0300
+++ b/logsui/logsapp/tsrc/ut_logsapp/stubs/hbstubs.cpp	Thu May 27 12:51:53 2010 +0300
@@ -22,6 +22,7 @@
 #include "hbstubs_helper.h"
 #include <hbmessagebox.h>
 #include <hbapplication.h>
+#include <hbcolorscheme.h>
 #include <QCoreApplication>
 #include <QTimer>
 #include <QGesture>
@@ -40,6 +41,7 @@
 Qt::GestureState testState = Qt::NoGesture;
 bool testIsWidgetOpen = false;
 bool testIsWidgetRaised = false;
+QColor testColor = Qt::white;
 
 void HbStubHelper::reset()
 {
@@ -49,6 +51,7 @@
     testQuitCalled = false;
     testIsWidgetRaised = false;
     testDialogShown = false;
+    testColor = Qt::white;
 }
 
 
@@ -106,6 +109,12 @@
     testIsWidgetOpen = isOpen;
 }
 
+void HbStubHelper::setColorScheme(QColor col)
+{
+    testColor = col;
+}
+
+
 bool QGraphicsWidget::close()
 {
     testIsWidgetOpen = false;
@@ -191,7 +200,7 @@
     
 void HbMainWindow::setOrientation(Qt::Orientation orientation, bool animate)
 {
-		Q_UNUSED(animate)
+    Q_UNUSED(animate)
     windowOrientation = orientation; 
 }
 
@@ -256,13 +265,11 @@
 
 void HbMessageBox::setText(const QString &string)
 {
-    
     if (string == "Ok") {
     	selectedActionString = "primary";
     } else if (string == "Cancel") {
     	selectedActionString = "secondary";
     }
-   
 }
 
 
@@ -279,3 +286,21 @@
 {
     testSingleShotTimer = true;
 }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+bool HbStyle::parameter(const QString &parameter, qreal &value, const HbDeviceProfile &profile) const
+{
+    Q_UNUSED( profile );
+    value = parameter.length();
+    return true;
+}
+
+
+QColor HbColorScheme::color( const QString &colorRole )
+{
+    Q_UNUSED(colorRole);
+    return testColor;
+}