1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * |
|
5 * This program is free software: you can redistribute it and/or modify |
|
6 * it under the terms of the GNU Lesser General Public License as published by |
|
7 * the Free Software Foundation, version 2.1 of the License. |
|
8 * |
|
9 * This program is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 * GNU Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public License |
|
15 * along with this program. If not, |
|
16 * see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/". |
|
17 * |
|
18 * Description: |
|
19 * |
|
20 */ |
|
21 |
|
22 #ifndef HBSERVICEPROVIDERVIEW_H |
|
23 #define HBSERVICEPROVIDERVIEW_H |
|
24 |
|
25 #include <hbview.h> |
|
26 #include <xqserviceprovider.h> |
|
27 |
|
28 #include "hbcontact.h" |
|
29 |
|
30 class HbLineEdit; |
|
31 class MapService; |
|
32 class DialerService; |
|
33 class XQServiceRequest; |
|
34 |
|
35 class HbDialerView : public HbView |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: |
|
40 HbDialerView(DialerService* service,QGraphicsItem *parent = 0); |
|
41 ~HbDialerView(); |
|
42 |
|
43 signals: |
|
44 |
|
45 public slots: |
|
46 void setNumber(const QString& number); |
|
47 void embed(); |
|
48 void requestCompleted(const QVariant& value); |
|
49 |
|
50 protected slots: |
|
51 void quit(); |
|
52 |
|
53 private: |
|
54 HbLineEdit* mTextEdit; |
|
55 HbLineEdit* mRetValue; |
|
56 DialerService* mService; |
|
57 XQServiceRequest* sndEmbedded; |
|
58 }; |
|
59 |
|
60 class HbMapView : public HbView |
|
61 { |
|
62 Q_OBJECT |
|
63 |
|
64 public: |
|
65 HbMapView(MapService * service, QGraphicsItem *parent = 0); |
|
66 ~HbMapView(); |
|
67 |
|
68 signals: |
|
69 |
|
70 public slots: |
|
71 void addAddress(); |
|
72 void setAddress(const QString& address,const QString& city,const QString& country); |
|
73 |
|
74 protected slots: |
|
75 void quit(); |
|
76 void embed(); |
|
77 |
|
78 private: |
|
79 HbLineEdit* mTextAddress; |
|
80 HbLineEdit* mTextCity; |
|
81 HbLineEdit* mTextCountry; |
|
82 HbLineEdit* mTextLabel; |
|
83 HbLineEdit* mTextNumber; |
|
84 HbLineEdit* mRetValue; |
|
85 |
|
86 MapService* mMapService ; |
|
87 }; |
|
88 |
|
89 class DialerService : public XQServiceProvider |
|
90 { |
|
91 Q_OBJECT |
|
92 public: |
|
93 DialerService( QObject *parent = 0 ); |
|
94 ~DialerService(); |
|
95 |
|
96 void complete(); |
|
97 |
|
98 Q_SIGNALS: |
|
99 void setNumber(const QString& number); |
|
100 void showView(const QString& name); |
|
101 |
|
102 public slots: |
|
103 QString dial(const QString& number); |
|
104 QString dial(const QString& number, bool async); |
|
105 |
|
106 private: |
|
107 QString mNumber; |
|
108 }; |
|
109 |
|
110 class MapService : public XQServiceProvider |
|
111 { |
|
112 Q_OBJECT |
|
113 public: |
|
114 MapService( QObject *parent = 0 ); |
|
115 ~MapService(); |
|
116 |
|
117 void complete(); |
|
118 void addContact(const HbContact& cnt); |
|
119 |
|
120 Q_SIGNALS: |
|
121 void setAddress(const QString& address,const QString& city,const QString& country); |
|
122 void showView(const QString& name); |
|
123 |
|
124 public slots: |
|
125 HbContactList showAddresses(const QString& address,const QString& city,const QString& country); |
|
126 |
|
127 private: |
|
128 HbContactList contactList; |
|
129 QString mNumber; |
|
130 int mCurrentRequestIndex; |
|
131 }; |
|
132 |
|
133 #endif // HBSERVICEPROVIDERVIEW_H |
|