|
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: Playback widget for Music Player playback view. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef MPPLAYBACKWIDGET_H |
|
19 #define MPPLAYBACKWIDGET_H |
|
20 |
|
21 #include <hbwidget.h> |
|
22 |
|
23 class MpPlaybackData; |
|
24 class HbStackedLayout; |
|
25 class QString; |
|
26 class HbTextItem; |
|
27 class HbProgressSlider; |
|
28 class HbLabel; |
|
29 class MpPlaybackDocumentLoader; |
|
30 class MpAlbumCoverWidget; |
|
31 |
|
32 class MpPlaybackWidget : public HbWidget |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public: |
|
37 |
|
38 MpPlaybackWidget( MpPlaybackData *data, QGraphicsItem *parent=0 ); |
|
39 virtual ~MpPlaybackWidget(); |
|
40 void repeatChanged( bool value ); |
|
41 |
|
42 signals: |
|
43 |
|
44 void setPlaybackPosition( int value ); |
|
45 void signalPlaybackInfoChanged(); |
|
46 |
|
47 public slots: |
|
48 |
|
49 void playbackInfoChanged(); |
|
50 void durationChanged(); |
|
51 void positionChanged(); |
|
52 void albumArtChanged(); |
|
53 |
|
54 private slots: |
|
55 |
|
56 void handleSliderPressed(); |
|
57 void handleSliderReleased(); |
|
58 void handleSliderMoved(int value); |
|
59 |
|
60 private: |
|
61 |
|
62 QString formatDuration( int seconds ); |
|
63 |
|
64 private: |
|
65 |
|
66 MpPlaybackData *mPlaybackData; // Not own |
|
67 MpPlaybackDocumentLoader *mDocumentLoader; // Own |
|
68 |
|
69 HbStackedLayout *mLayout; // Not own |
|
70 HbLabel *mSongTitle; // Not own |
|
71 HbLabel *mArtistName; // Not own |
|
72 HbLabel *mAlbumName; // Not own |
|
73 MpAlbumCoverWidget *mAlbumArt; // Not own |
|
74 HbProgressSlider *mProgressBar; // Not own |
|
75 HbLabel *mRealAudioIndicator; // Not own |
|
76 HbLabel *mRepeatIndicator; // Not own |
|
77 bool mProgreesBarDragging; |
|
78 int mDuration; |
|
79 |
|
80 Q_DISABLE_COPY(MpPlaybackWidget) |
|
81 }; |
|
82 |
|
83 #endif // MPPLAYBACKWIDGET_H |