|
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: Music Player Playback view. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPPLAYBACKVIEW_H |
|
19 #define MPPLAYBACKVIEW_H |
|
20 |
|
21 #include "mpviewbase.h" |
|
22 |
|
23 class HbAction; |
|
24 class HbIcon; |
|
25 class HbMainWindow; |
|
26 class MpEngine; |
|
27 class MpPlaybackData; |
|
28 class MpPlaybackWidget; |
|
29 class MpEqualizerWidget; |
|
30 |
|
31 |
|
32 class MpPlaybackView : public MpViewBase |
|
33 { |
|
34 Q_OBJECT |
|
35 Q_PROPERTY(QString PlaybackStatus READ playbackStatus) |
|
36 Q_PROPERTY(bool Shuffle READ shuffleEnabled) |
|
37 Q_PROPERTY(bool Repeat READ repeatEnabled) |
|
38 |
|
39 public: |
|
40 |
|
41 explicit MpPlaybackView(); |
|
42 virtual ~MpPlaybackView(); |
|
43 |
|
44 void initializeView(); |
|
45 void activateView(); |
|
46 void deactivateView(); |
|
47 |
|
48 QString playbackStatus(); |
|
49 bool shuffleEnabled(); |
|
50 bool repeatEnabled(); |
|
51 |
|
52 signals: |
|
53 |
|
54 void command( int aCommand ); |
|
55 |
|
56 public slots: |
|
57 |
|
58 void startSettingsView(); |
|
59 void back(); |
|
60 void exit(); |
|
61 |
|
62 void playbackStateChanged(); |
|
63 |
|
64 void flip(); |
|
65 |
|
66 void toggleShuffle(); |
|
67 void shuffleChanged( bool shuffle ); |
|
68 void toggleRepeat(); |
|
69 void repeatChanged( bool repeat ); |
|
70 |
|
71 void handleSongSelected(); |
|
72 void showEqualizerDialog(); |
|
73 void closeEqualizerDialog(); |
|
74 |
|
75 void startRewindTimer(); |
|
76 void startForwardTimer(); |
|
77 void startSeekRewind(); |
|
78 void startSeekForward(); |
|
79 void endRewind(); |
|
80 void endForward(); |
|
81 |
|
82 void connectButtons(); |
|
83 void showCorruptedNote(); |
|
84 |
|
85 private: |
|
86 |
|
87 void setupMenu(); |
|
88 void setupToolbar(); |
|
89 void updatePlayPauseIcon(); |
|
90 |
|
91 private: |
|
92 |
|
93 MpEngine *mMpEngine; // Own |
|
94 MpPlaybackData *mPlaybackData; // Not own |
|
95 MpPlaybackWidget *mPlaybackWidget; // Not own |
|
96 MpEqualizerWidget *mEqualizerWidget; // Own |
|
97 |
|
98 HbMainWindow *mWindow; // Not own |
|
99 HbAction *mSoftKeyBack; // Own |
|
100 bool mActivated; |
|
101 |
|
102 HbIcon *mPlayIcon; // Own |
|
103 HbIcon *mPauseIcon; // Own |
|
104 HbIcon *mShuffleOnIcon; // Own |
|
105 HbIcon *mShuffleOffIcon; // Own |
|
106 |
|
107 HbAction *mPlayPauseAction; // Not own |
|
108 HbAction *mRepeatAction; // Not own |
|
109 HbAction *mShuffleAction; // Not own |
|
110 |
|
111 QTimer *mTimer; |
|
112 |
|
113 bool mShuffle; |
|
114 bool mRepeat; |
|
115 bool mSeeking; |
|
116 |
|
117 Q_DISABLE_COPY(MpPlaybackView) |
|
118 }; |
|
119 |
|
120 #endif // MPPLAYBACKVIEW_H |