|
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: BtDeviceDialogWidget class declaration. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef BTDEVICEDIALOGINPUTWIDGET_H |
|
20 #define BTDEVICEDIALOGINPUTWIDGET_H |
|
21 |
|
22 #include <QVariantMap> |
|
23 |
|
24 #include <hbdevicedialoginterface.h> |
|
25 #include <hbdevicedialog.h> |
|
26 #include <hbinputdialog.h> |
|
27 |
|
28 /*! |
|
29 \class BtDeviceDialogInputWidget |
|
30 \brief Widget class with properties setting. |
|
31 |
|
32 BtDeviceDialogInputWidget, inherited from HbInputDialog, |
|
33 implements interface HbDeviceDialogInterface. The Q_Properties |
|
34 here are interfaces for caller of HbDeviceDialog to configue |
|
35 what to be shown in the widget. |
|
36 |
|
37 */ |
|
38 class BtDeviceDialogInputWidget : |
|
39 public QObject, public HbDeviceDialogInterface |
|
40 { |
|
41 Q_OBJECT |
|
42 |
|
43 public: |
|
44 BtDeviceDialogInputWidget(const QVariantMap ¶meters); |
|
45 |
|
46 // From base class HbDeviceDialogInterface |
|
47 virtual bool setDeviceDialogParameters(const QVariantMap ¶meters); |
|
48 virtual int deviceDialogError() const; |
|
49 virtual void closeDeviceDialog(bool byClient); |
|
50 virtual HbDialog *deviceDialogWidget() const; |
|
51 virtual QObject *signalSender() const; |
|
52 |
|
53 signals: |
|
54 // Required by the framework |
|
55 void deviceDialogClosed(); |
|
56 void deviceDialogData(QVariantMap data); |
|
57 |
|
58 public slots: |
|
59 void inputClosed(HbAction *action); |
|
60 |
|
61 private: |
|
62 void processParam(const QVariantMap ¶meters); |
|
63 bool constructInputDialog(const QVariantMap ¶meters); |
|
64 void resetProperties(); |
|
65 |
|
66 private: |
|
67 Q_DISABLE_COPY(BtDeviceDialogInputWidget) |
|
68 |
|
69 int mLastError; |
|
70 int mSendAction; |
|
71 bool mShowEventReceived; |
|
72 HbInputDialog *mInputDialog; |
|
73 }; |
|
74 |
|
75 #endif // BTDEVICEDIALOGINPUTWIDGET_H |