|
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: |
|
15 * |
|
16 */ |
|
17 #ifndef IRSTATIONSVIEW_H |
|
18 #define IRSTATIONSVIEW_H |
|
19 |
|
20 |
|
21 #include "irabstractlistviewbase.h" |
|
22 #include "irqevent.h" |
|
23 |
|
24 class IRQPreset; |
|
25 class IrChannelModel; |
|
26 class QTimer; |
|
27 |
|
28 class IRStationsView : public IrAbstractListViewBase |
|
29 { |
|
30 Q_OBJECT |
|
31 |
|
32 public: |
|
33 ~IRStationsView(); |
|
34 |
|
35 void setViewParameter(TIRViewParameter aParameter); |
|
36 TIRViewParameter getViewParameter() const; |
|
37 |
|
38 void loadCategoryStations(int aIndex, const QString &aHeadingText); |
|
39 |
|
40 void loadPopularStations(bool aShowWaitDialog); |
|
41 |
|
42 void loadSearchResult(const QString &aStr); |
|
43 |
|
44 protected: |
|
45 IRStationsView(IRApplication* aApplication, TIRViewId aViewId); |
|
46 |
|
47 //from base class IRBaseView |
|
48 TIRHandleResult handleCommand(TIRViewCommand aCommand, TIRViewCommandReason aReason); |
|
49 |
|
50 //from base class IRBaseView |
|
51 void launchAction(); |
|
52 |
|
53 private slots: |
|
54 void presetResponse(IRQPreset *aPreset); |
|
55 |
|
56 void presetLogoDownload(IRQPreset* aPreset); |
|
57 |
|
58 void presetLogoDownloadError(); |
|
59 |
|
60 void networkRequestNotified(IRQNetworkEvent aEvent); |
|
61 |
|
62 void dataChanged(); |
|
63 |
|
64 //used for connect signal from isds client |
|
65 void operationException(IRQError aError); |
|
66 |
|
67 //to start the convertion |
|
68 void convertAnother(); |
|
69 |
|
70 void connectTimeOut(); |
|
71 |
|
72 void cancelRequest(); |
|
73 |
|
74 private: |
|
75 void resetCurrentItem(); |
|
76 void storeCurrentItem(); |
|
77 void handleItemSelected(); |
|
78 |
|
79 void startConvert(int aIndex); |
|
80 |
|
81 void cleanupResource(); |
|
82 |
|
83 void connectToIsdsClient(); |
|
84 |
|
85 void disconnectIsdsClient(); |
|
86 |
|
87 void createWaitDialog(QString aStr); |
|
88 |
|
89 private: |
|
90 IRQPreset *iLogoPreset; |
|
91 IRQPreset *iPreset; //the object is created by IsdsClient, but application is responsible for free |
|
92 HbMessageBox *iWaitDialog; |
|
93 TIRViewParameter iViewParameter; |
|
94 int iLastSelectitem; |
|
95 int iLastPopularItem; |
|
96 |
|
97 //the following are used to support the img |
|
98 QList<int> iIconIndexArray; |
|
99 IrChannelModel *iChannelModel; |
|
100 QTimer *iConnectTimer; |
|
101 |
|
102 friend class IRViewManager; |
|
103 }; |
|
104 |
|
105 #endif //IRSTATIONSVIEW_H |