26 #include <hbpopup.h> |
26 #include <hbpopup.h> |
27 #include <hbdocumentloader.h> |
27 #include <hbdocumentloader.h> |
28 #include <qstandarditemmodel.h> |
28 #include <qstandarditemmodel.h> |
29 #include <hbradiobuttonlist.h> |
29 #include <hbradiobuttonlist.h> |
30 #include <hblistwidget.h> |
30 #include <hblistwidget.h> |
31 #include <hbpushbutton.h> |
|
32 #include <hblabel.h> |
31 #include <hblabel.h> |
|
32 #include <hbaction.h> |
|
33 |
33 |
34 |
34 struct device |
35 struct device |
35 { |
36 { |
36 QString mDeviceName; |
37 QString mDeviceName; |
37 QString mDeviceType; |
38 QString mDeviceType; |
38 int mDeviceIdx; |
39 int mDeviceIdx; |
39 }; |
40 }; |
40 |
41 |
41 class BTDeviceSearchDialogWidget : public HbDialog, |
42 |
|
43 class BTDeviceSearchDialogWidget : public QObject, |
42 public HbDeviceDialogInterface |
44 public HbDeviceDialogInterface |
43 { |
45 { |
44 Q_OBJECT |
46 Q_OBJECT |
45 |
47 |
46 public: |
48 public: |
50 public: // from HbDeviceDialogInterface |
52 public: // from HbDeviceDialogInterface |
51 bool setDeviceDialogParameters(const QVariantMap ¶meters); |
53 bool setDeviceDialogParameters(const QVariantMap ¶meters); |
52 int deviceDialogError() const; |
54 int deviceDialogError() const; |
53 void closeDeviceDialog(bool byClient); |
55 void closeDeviceDialog(bool byClient); |
54 HbPopup *deviceDialogWidget() const; |
56 HbPopup *deviceDialogWidget() const; |
|
57 virtual QObject *signalSender() const; |
55 |
58 |
56 public slots: |
59 public slots: |
57 void stopRetryClicked(); |
60 void stopRetryClicked(); |
58 void retryClicked(); |
61 void retryClicked(); |
59 void viewByClicked(); |
62 void viewByClicked(); |
60 void deviceSelected(const QModelIndex& modelIndex); |
63 void deviceSelected(const QModelIndex& modelIndex); |
61 // void viewByItemSelected(int index); |
64 // void viewByItemSelected(int index); |
62 void selectionDialogClosed(HbAction*); |
65 void selectionDialogClosed(HbAction *action); |
|
66 void searchDialogClosed(); |
63 |
67 |
64 private: |
68 private: |
65 bool constructDialog(const QVariantMap ¶meters); |
69 bool constructDialog(const QVariantMap ¶meters); |
66 void hideEvent(QHideEvent *event); |
70 void hideEvent(QHideEvent *event); |
67 void showEvent(QShowEvent *event); |
71 void showEvent(QShowEvent *event); |
85 HbDialog* mViewByDialog; |
89 HbDialog* mViewByDialog; |
86 HbRadioButtonList* mRbl; |
90 HbRadioButtonList* mRbl; |
87 QList<QString> mDeviceTypeList; |
91 QList<QString> mDeviceTypeList; |
88 QList<device> mDeviceList; |
92 QList<device> mDeviceList; |
89 HbListView* mListView; |
93 HbListView* mListView; |
90 HbPushButton* mStopRetryBtn; |
|
91 HbPushButton* mViewByBtn; |
|
92 HbLabel* mSearchLabel; |
94 HbLabel* mSearchLabel; |
93 HbLabel* mSearchIconLabel; |
95 HbLabel* mSearchIconLabel; |
94 HbLabel* mSearchDoneLabel; |
96 HbLabel* mSearchDoneLabel; |
95 bool mViewByChosen; |
97 bool mViewByChosen; |
96 QList<device> mDeviceLstOfType; |
98 QList<device> mDeviceLstOfType; |
97 int mDeviceLstIdx; |
99 int mDeviceLstIdx; |
98 int mSelectedType; |
100 int mSelectedType; |
99 int mDeviceDialogData; |
101 int mDeviceDialogData; |
|
102 HbDialog *mSearchDevicesDialog; |
|
103 HbAction *mStopRetryAction; |
|
104 HbAction *mViewByAction; |
|
105 |
|
106 int mStopRetryFlag; |
100 |
107 |
101 Q_DISABLE_COPY(BTDeviceSearchDialogWidget) |
108 Q_DISABLE_COPY(BTDeviceSearchDialogWidget) |
102 }; |
109 }; |
103 |
110 |
104 #endif /* BTDEVICESEARCHDIALOGWIDGET_H */ |
111 #endif /* BTDEVICESEARCHDIALOGWIDGET_H */ |