|
1 /* |
|
2 * Copyright (c) 2010 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 * The header file for messaging's audio fetcher widget. |
|
16 * |
|
17 */ |
|
18 #ifndef MSGAUDIOFETCHERWIDGET_H |
|
19 #define MSGAUDIOFETCHERWIDGET_H |
|
20 |
|
21 // SYSTEM INCLUDES |
|
22 #include <HbWidget> |
|
23 |
|
24 // USER INCLUDES |
|
25 class HbListView; |
|
26 class QGraphicsLinearLayout; |
|
27 class MsgAudioFetcherView; |
|
28 class MsgAudioFetcherModel; |
|
29 class HbLabel; |
|
30 class MsgAudioPreview; |
|
31 |
|
32 /** |
|
33 * @class MsgAudioFetcherWidget |
|
34 * @brief This class is messaging's audio fetcher view's mainwidget |
|
35 */ |
|
36 class MsgAudioFetcherWidget : public HbWidget |
|
37 { |
|
38 Q_OBJECT |
|
39 |
|
40 public: |
|
41 /** |
|
42 * Constructor |
|
43 */ |
|
44 explicit MsgAudioFetcherWidget(); |
|
45 |
|
46 /** |
|
47 * Destructor |
|
48 */ |
|
49 ~MsgAudioFetcherWidget(); |
|
50 |
|
51 /** |
|
52 * Get the path of item selected in the list |
|
53 */ |
|
54 QString getCurrentItemPath(); |
|
55 |
|
56 /** |
|
57 * Play or pause the audio file |
|
58 */ |
|
59 void playOrPause(); |
|
60 |
|
61 signals: |
|
62 /** |
|
63 * Signal to enable/disable the toolbar |
|
64 */ |
|
65 void triggerToolBar(bool enable); |
|
66 |
|
67 private slots: |
|
68 /** |
|
69 * Handles selection of a list item |
|
70 */ |
|
71 void on_list_activated(const QModelIndex &index); |
|
72 private: |
|
73 /** |
|
74 * initializes widget |
|
75 */ |
|
76 void init(); |
|
77 |
|
78 private: |
|
79 /** |
|
80 * label of the list view |
|
81 * owned |
|
82 */ |
|
83 HbLabel *mLabel; |
|
84 |
|
85 /** |
|
86 * list view |
|
87 * owned |
|
88 */ |
|
89 HbListView *mListView; |
|
90 |
|
91 /** |
|
92 * list's layout |
|
93 * owned |
|
94 */ |
|
95 QGraphicsLinearLayout *mLayout; |
|
96 |
|
97 /** |
|
98 * populating model |
|
99 * owned |
|
100 */ |
|
101 MsgAudioFetcherModel *mFetcherModel; |
|
102 |
|
103 /** |
|
104 * For previewing audio files |
|
105 * owned |
|
106 */ |
|
107 MsgAudioPreview* mAudioPreview; |
|
108 |
|
109 /** |
|
110 * selection state |
|
111 */ |
|
112 bool mSelected; |
|
113 |
|
114 /** |
|
115 * last selected item |
|
116 */ |
|
117 QModelIndex mOldSeletedItem; |
|
118 }; |
|
119 |
|
120 #endif /* MSGAUDIOFETCHERWIDGET_H_ */ |