34
|
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: hbinputdialog stub
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef HBINPUT_DIALOG_H
|
|
20 |
#define HBINPUT_DIALOG_H
|
|
21 |
|
|
22 |
#include "hbwidget.h"
|
38
|
23 |
#include "hbaction.h"
|
|
24 |
#include <qvariant.h>
|
34
|
25 |
#include <qgraphicsitem.h>
|
|
26 |
|
|
27 |
class HbInputDialog : public HbWidget
|
|
28 |
{
|
|
29 |
Q_OBJECT
|
|
30 |
|
|
31 |
public:
|
38
|
32 |
HbInputDialog(QGraphicsItem *parent= 0);
|
|
33 |
~HbInputDialog();
|
34
|
34 |
|
36
|
35 |
/**
|
39
|
36 |
* Create new HbMessageBox and call emitDialogFinished after this one to finish the sequence.
|
36
|
37 |
*/
|
39
|
38 |
void open( QObject* receiver = 0, const char* member = 0 );
|
38
|
39 |
|
|
40 |
/**
|
|
41 |
* Create new HbInputDialog after call to this and call emitDialogFinished to finish the sequence.
|
|
42 |
*/
|
|
43 |
void getText(const QString &heading
|
|
44 |
,QObject *receiver
|
|
45 |
,const char *member
|
|
46 |
,const QString &text=QString()
|
|
47 |
,QGraphicsScene *scene=0
|
|
48 |
,QGraphicsItem *parent=0);
|
|
49 |
|
|
50 |
void emitDialogFinished( QObject* receiver, const char* member, int actionNum );
|
|
51 |
|
|
52 |
void setAttribute(int attribute);
|
35
|
53 |
|
39
|
54 |
void setPromptText(const QString &text, int row = 0);
|
|
55 |
|
|
56 |
void setValue(const QVariant &value, int row = 0);
|
|
57 |
|
38
|
58 |
QList<HbAction*> actions() const
|
|
59 |
{
|
|
60 |
return mActions;
|
|
61 |
}
|
|
62 |
|
|
63 |
QVariant value(int row = 0) { Q_UNUSED(row); mValueCallCount++; return mValueReturnValue; }
|
|
64 |
|
|
65 |
signals:
|
|
66 |
|
|
67 |
void finished(HbAction *action);
|
36
|
68 |
|
38
|
69 |
public:
|
|
70 |
|
|
71 |
QList<HbAction*> mActions;
|
36
|
72 |
|
39
|
73 |
QList<QString> mSetPromptTexts;
|
|
74 |
QList<QVariant> mSetValues;
|
|
75 |
|
38
|
76 |
static QString mLastHeading;
|
|
77 |
static QString mLastText;
|
36
|
78 |
static int mGetTextCallCount;
|
38
|
79 |
static int mAttribute;
|
39
|
80 |
static int mOpenCallCount;
|
38
|
81 |
|
|
82 |
static QVariant mValueReturnValue;
|
|
83 |
static int mValueCallCount;
|
34
|
84 |
};
|
|
85 |
|
|
86 |
#endif //HBINPUT_DIALOG_H
|
|
87 |
|