|
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 <QTimer> |
|
29 |
|
30 #include "hbcontact.h" |
|
31 |
|
32 class HbLineEdit; |
|
33 class HbLabel; |
|
34 class DialerService; |
|
35 class XQServiceRequest; |
|
36 |
|
37 class HbDialerView : public HbView |
|
38 { |
|
39 Q_OBJECT |
|
40 |
|
41 public: |
|
42 HbDialerView(DialerService* service,QGraphicsItem *parent = 0); |
|
43 ~HbDialerView(); |
|
44 |
|
45 signals: |
|
46 |
|
47 public slots: |
|
48 void setNumber(const QString& number); |
|
49 void embed(); |
|
50 void requestCompleted(const QVariant& value); |
|
51 |
|
52 protected slots: |
|
53 void quit(); |
|
54 |
|
55 void tick(); |
|
56 |
|
57 private: |
|
58 HbLineEdit* mTextEdit; |
|
59 HbLineEdit* mRetValue; |
|
60 HbLabel* timerLabel; |
|
61 DialerService* mService; |
|
62 XQServiceRequest* sndEmbedded; |
|
63 QTimer doomsdayTimer; |
|
64 int doomsdayCounter; |
|
65 }; |
|
66 |
|
67 class DialerService : public XQServiceProvider |
|
68 { |
|
69 Q_OBJECT |
|
70 public: |
|
71 DialerService( QObject *parent = 0 ); |
|
72 ~DialerService(); |
|
73 |
|
74 void complete(); |
|
75 |
|
76 Q_SIGNALS: |
|
77 void setNumber(const QString& number); |
|
78 void showView(const QString& name); |
|
79 |
|
80 public slots: |
|
81 QString dial(const QString& number); |
|
82 QString dial(const QString& number, bool async); |
|
83 |
|
84 private: |
|
85 QString mNumber; |
|
86 }; |
|
87 |
|
88 #endif // HBSERVICEPROVIDERVIEW_H |