14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 #include "irapplication.h" |
17 #include "irapplication.h" |
18 #include "irbaseview.h" |
18 #include "irbaseview.h" |
19 #include "irabstractviewmanager.h" |
19 #include "irviewmanager.h" |
20 |
20 |
21 /* |
21 /* |
22 * Description : constructor |
22 * Description : constructor |
23 * Parameters : aApplication : the pointer to the internet radio application object |
23 * Parameters : aApplication : the pointer to the internet radio application object |
24 * aViewId : the id of the view |
24 * aViewId : the id of the view |
25 * Return : None |
25 * Return : None |
26 */ |
26 */ |
27 IRBaseView::IRBaseView(IRApplication* aApplication, TIRViewId aViewId) : iApplication(aApplication), |
27 IRBaseView::IRBaseView(IRApplication* aApplication, TIRViewId aViewId) : iApplication(aApplication), |
28 iLoader(aApplication->getViewManager()), |
|
29 iViewId(aViewId), |
28 iViewId(aViewId), |
30 iFlag(0), |
29 iFlag(0), |
31 iUseNetworkReason(EIR_UseNetwork_NoReason) |
30 iUseNetworkReason(EIR_UseNetwork_NoReason), |
|
31 iInitCompleted(false) |
32 { |
32 { |
33 setTitle(hbTrId("txt_irad_title_internet_radio")); |
|
34 |
|
35 iPlayController = iApplication->getPlayController(); |
|
36 iIsdsClient = iApplication->getIsdsClient(); |
|
37 iNetworkController = iApplication->getNetworkController(); |
|
38 iFavorites = iApplication->getFavoritesDB(); |
|
39 iSettings = iApplication->getSettings(); |
|
40 } |
33 } |
41 |
34 |
42 TIRViewId IRBaseView::id() const |
35 TIRViewId IRBaseView::id() const |
43 { |
36 { |
44 return iViewId; |
37 return iViewId; |
49 * to handle such system events, it must override this function. |
42 * to handle such system events, it must override this function. |
50 * Parameters : aEvent : TIRSystemEventType |
43 * Parameters : aEvent : TIRSystemEventType |
51 * Return : EIR_DoDefault : caller does default handling |
44 * Return : EIR_DoDefault : caller does default handling |
52 * EIR_NoDefault : caller doesn't do default handling |
45 * EIR_NoDefault : caller doesn't do default handling |
53 */ |
46 */ |
54 TIRHandleResult IRBaseView::handleSystemEvent(TIRSystemEventType aEvent) |
47 TIRHandleResult IRBaseView::handleSystemEvent(int aEvent) |
55 { |
48 { |
56 Q_UNUSED(aEvent); |
49 Q_UNUSED(aEvent); |
57 |
50 |
58 return EIR_DoDefault; |
51 return EIR_DoDefault; |
59 } |
52 } |
106 |
99 |
107 TIRUseNetworkReason IRBaseView::getUseNetworkReason() const |
100 TIRUseNetworkReason IRBaseView::getUseNetworkReason() const |
108 { |
101 { |
109 return iUseNetworkReason; |
102 return iUseNetworkReason; |
110 } |
103 } |
111 |
104 |
|
105 void IRBaseView::lazyInit() |
|
106 { |
|
107 if (!initCompleted()) |
|
108 { |
|
109 iNetworkController = iApplication->getNetworkController(); |
|
110 iPlayController = iApplication->getPlayController(); |
|
111 iIsdsClient = iApplication->getIsdsClient(); |
|
112 iFavorites = iApplication->getFavoritesDB(); |
|
113 iSettings = iApplication->getSettings(); |
|
114 } |
|
115 } |
|
116 |
112 /* |
117 /* |
113 * Description : return the pointer to the view manager object owned by application |
118 * Description : return the pointer to the view manager object owned by application |
114 * Parameters : None |
119 * Parameters : None |
115 * Return : the pointer to the view manager object owned by application |
120 * Return : the pointer to the view manager object owned by application |
116 */ |
121 */ |
117 IRAbstractViewManager* IRBaseView::getViewManager() const |
122 IRViewManager* IRBaseView::getViewManager() const |
118 { |
123 { |
119 return iApplication->getViewManager(); |
124 return iApplication->getViewManager(); |
120 } |
125 } |
121 |
126 |
122 void IRBaseView::popupNote(const QString &aNote, const HbMessageBox::MessageBoxType &aNoteType) const |
127 void IRBaseView::popupNote(const QString &aNote, const HbMessageBox::MessageBoxType &aNoteType) const |