35
|
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 Media Wall view.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef MPMEDIAWALLVIEW_H
|
|
19 |
#define MPMEDIAWALLVIEW_H
|
|
20 |
|
|
21 |
#include "mpviewbase.h"
|
|
22 |
#include "mpmpxcollectionviewdefs.h"
|
|
23 |
|
|
24 |
class HbMainWindow;
|
|
25 |
class MpEngine;
|
|
26 |
class HgMediawall;
|
|
27 |
class MpMpxCollectionData;
|
|
28 |
class MpCollectionDataModel;
|
|
29 |
class HbLabel;
|
|
30 |
class MpMediaWallDocumentLoader;
|
|
31 |
class HbAction;
|
|
32 |
class HbIcon;
|
|
33 |
class MpPlaybackData;
|
|
34 |
class QParallelAnimationGroup;
|
|
35 |
class QPropertyAnimation;
|
|
36 |
class MpAlbumCoverWidget;
|
|
37 |
class MpTrackListWidget;
|
|
38 |
class QModelIndex;
|
|
39 |
|
|
40 |
|
|
41 |
class MpMediaWallView : public MpViewBase
|
|
42 |
{
|
|
43 |
Q_OBJECT
|
|
44 |
|
|
45 |
public:
|
|
46 |
explicit MpMediaWallView();
|
|
47 |
virtual ~MpMediaWallView();
|
|
48 |
|
|
49 |
void initializeView();
|
|
50 |
void activateView();
|
|
51 |
void deactivateView();
|
|
52 |
|
|
53 |
signals:
|
|
54 |
void command( int aCommand );
|
|
55 |
|
|
56 |
public slots:
|
|
57 |
void contextOpened( TCollectionContext context );
|
|
58 |
void containerContentsChanged();
|
|
59 |
void libraryAboutToUpdate();
|
|
60 |
void libraryUpdated();
|
|
61 |
void sendToBackground();
|
|
62 |
void updatePlayPauseAction();
|
|
63 |
void hideTracksList();
|
|
64 |
void showTrackList();
|
|
65 |
void dismissListClosingAnimation();
|
|
66 |
void listItemActivated( const QModelIndex &index );
|
37
|
67 |
void fetchAlbumSongs(QModelIndex index);
|
35
|
68 |
|
|
69 |
private:
|
|
70 |
void setUpMediaWallWidget();
|
|
71 |
void scrollToNowPlaying();
|
|
72 |
void setUpListAnimation();
|
|
73 |
|
|
74 |
|
|
75 |
private:
|
|
76 |
MpEngine *mEngine; // not own
|
|
77 |
MpMpxCollectionData *mCollectionData; // not own
|
|
78 |
MpCollectionDataModel *mModel; // own - parented
|
|
79 |
HgMediawall *mMediaWallWidget; // own - parented
|
|
80 |
HbLabel *mNoMusic; // own - parented
|
|
81 |
MpMediaWallDocumentLoader *mDocumentLoader; // own
|
|
82 |
QGraphicsWidget *mPlayPauseContainer; // own - parented
|
|
83 |
HbIcon *mPlayIcon; // own
|
|
84 |
HbIcon *mPauseIcon; // own
|
|
85 |
HbAction *mPlayPauseAction; // own - parented
|
|
86 |
bool mLibraryUpdating;
|
|
87 |
MpPlaybackData *mPlaybackData; // not own
|
|
88 |
bool mActivated;
|
|
89 |
bool mIconUpdateNedded;
|
|
90 |
QParallelAnimationGroup *mListShowAnimationGroup; // own - parented
|
|
91 |
QPropertyAnimation *mListShowListAnimation; // own - parented
|
|
92 |
QPropertyAnimation *mCoverShowListAnimation; // own - parented
|
|
93 |
bool mShowingSongsList;
|
|
94 |
MpAlbumCoverWidget *mAlbumCover;
|
|
95 |
MpTrackListWidget *mTrackList;
|
|
96 |
|
|
97 |
Q_DISABLE_COPY(MpMediaWallView)
|
|
98 |
};
|
|
99 |
|
|
100 |
|
|
101 |
#endif //MPMEDIAWALLVIEW_H
|