35
|
1 |
/*
|
|
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: stub hbinputdialog
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#include "hbinputdialog.h"
|
|
19 |
|
|
20 |
bool HbInputDialog::mGetTextFails = false;
|
36
|
21 |
QString HbInputDialog::mGetTextReturnValue = QString();
|
|
22 |
int HbInputDialog::mGetTextCallCount = 0;
|
35
|
23 |
|
|
24 |
|
|
25 |
QString HbInputDialog::getText(const QString &label,const QString &text,
|
|
26 |
bool *ok, QGraphicsScene *scene, QGraphicsItem *parent)
|
|
27 |
{
|
|
28 |
Q_UNUSED(label);
|
|
29 |
Q_UNUSED(scene);
|
|
30 |
Q_UNUSED(parent);
|
36
|
31 |
mGetTextCallCount++;
|
|
32 |
QString textReturn;
|
|
33 |
if(HbInputDialog::mGetTextReturnValue.isNull())
|
|
34 |
{
|
|
35 |
textReturn = text;
|
|
36 |
}
|
|
37 |
else
|
|
38 |
{
|
|
39 |
textReturn = mGetTextReturnValue;
|
|
40 |
}
|
35
|
41 |
if(mGetTextFails)
|
|
42 |
{
|
|
43 |
*ok = false;
|
|
44 |
textReturn = "";
|
|
45 |
}
|
|
46 |
else
|
|
47 |
{
|
|
48 |
*ok = true;
|
|
49 |
}
|
|
50 |
return textReturn;
|
|
51 |
}
|
|
52 |
|