utilities/mpnowplayingbanner/tsrc/unittest_mpnowplayingwidget/stub/src/hbcolorscheme.cpp
changeset 20 82baf59ce8dd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/utilities/mpnowplayingbanner/tsrc/unittest_mpnowplayingwidget/stub/src/hbcolorscheme.cpp	Fri Apr 16 14:56:30 2010 +0300
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: HbColorScheme stub for testing MpNowPlayingWidget
+*
+*/
+
+
+#include "stub/inc/hbcolorscheme.h"
+
+/*!
+ *  Stub function
+ */
+HbColorTheme *HbColorTheme::global ()
+{
+    static HbColorTheme instance;
+    return &instance;
+}
+
+/*!
+ *  Stub function
+ */
+QColor HbColorTheme::color( const QString &colorRole )
+{
+    if ( mTheme == 1 ) {
+        if ( colorRole == QString("foreground") ) {
+            return QColor(255,0,255);
+        }
+        else{
+            return QColor(0,255,0);
+        }
+    }
+    else {
+        if ( colorRole == QString("foreground") ) {
+            return QColor(255,255,0);
+        }
+        else{
+            return QColor(0,255,255);
+        }
+    }
+}
+
+/*!
+ *  Stub function
+ */
+void HbColorTheme::setCurrentTheme ( int theme )
+{
+    mTheme = theme;
+    
+}
+
+/*!
+ *  Stub function
+ */
+HbColorTheme::HbColorTheme (): mTheme(0)
+{
+    
+}
+/*!
+ *  Stub function
+ */
+HbColorTheme::~HbColorTheme ()
+{
+  
+}
+
+/*!
+ *  Stub function
+ */
+QColor HbColorScheme::color( const QString &colorRole )
+{
+    QColor normalColor(255,255,255);
+    return HbColorTheme::global()->color(colorRole);
+}
+