logsui/logsengine/tsrc/hbstubs/hbstubs.cpp
changeset 0 4a5361db8937
child 2 7119b73b84d6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/logsui/logsengine/tsrc/hbstubs/hbstubs.cpp	Tue May 04 12:39:37 2010 +0300
@@ -0,0 +1,185 @@
+/*
+* 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:  
+*
+*/
+
+// Orbit classes
+#include <hbicon.h>
+#include <hblineedit.h>
+#include <QVariant>
+
+
+QString mUTClipboard;
+
+// -----------------------------------------------------------------------------
+// HbIcon::HbIcon
+// -----------------------------------------------------------------------------
+//
+HbIcon::HbIcon()
+{   
+    mName = QString();
+    mTestIcon = new QIcon;
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::HbIcon
+// -----------------------------------------------------------------------------
+//
+HbIcon::HbIcon(const QString &iconName)
+{
+    mName = iconName;
+    mTestIcon = new QIcon;
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::HbIcon
+// -----------------------------------------------------------------------------
+//
+HbIcon::HbIcon(const QIcon &icon)
+{
+    mName = "c:\\data\\images\\designer.png";
+    mTestIcon = new QIcon;
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::HbIcon
+// -----------------------------------------------------------------------------
+//
+HbIcon::HbIcon(const HbIcon &icon)
+{
+    mName = "c:\\data\\images\\designer.png";
+    mTestIcon = new QIcon;
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::~HbIcon
+// -----------------------------------------------------------------------------
+//
+HbIcon::~HbIcon()
+{
+    delete mTestIcon;
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::isNull
+// -----------------------------------------------------------------------------
+//
+bool HbIcon::isNull() const
+{
+	return false;
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::qicon
+// -----------------------------------------------------------------------------
+//
+QIcon &HbIcon::qicon() const
+{
+    return *mTestIcon;
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::operator==
+// -----------------------------------------------------------------------------
+//
+bool HbIcon::operator==(const HbIcon &other) const
+{
+    return (other.mName == mName);
+}
+
+// -----------------------------------------------------------------------------
+// HbIcon::operator QVariant
+// Returns the icon as a QVariant.
+// -----------------------------------------------------------------------------
+//
+HbIcon::operator QVariant() const
+{
+    return QVariant::fromValue(*this);
+}
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::HbLineEdit
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::HbLineEdit()
+{   
+    //mName = QString();
+}
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::HbLineEdit
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::HbLineEdit(const QString &lineEditText)
+{
+    //mName = iconName;
+}
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::~HbLineEdit
+// -----------------------------------------------------------------------------
+//
+HbLineEdit::~HbLineEdit()
+{
+}
+
+// -----------------------------------------------------------------------------
+// HbLineEdit::setText
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setText(const QString &text)
+{
+	mText = text;
+}
+// -----------------------------------------------------------------------------
+// HbLineEdit::selectAll
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::selectAll()
+{
+}
+// -----------------------------------------------------------------------------
+// HbLineEdit::selectAll
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::setSelection(int start, int length)
+{
+    Q_UNUSED(start);
+    Q_UNUSED(length);
+}
+// -----------------------------------------------------------------------------
+// HbLineEdit::copy
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::copy()
+{
+	 mUTClipboard = mText;
+}
+// -----------------------------------------------------------------------------
+// HbLineEdit::paste
+// -----------------------------------------------------------------------------
+//
+void HbLineEdit::paste()
+{
+	mText = mUTClipboard;
+}
+// -----------------------------------------------------------------------------
+// HbLineEdit::text
+// -----------------------------------------------------------------------------
+//
+QString HbLineEdit::text() const
+{
+	return mText;
+}