mpviewplugins/mpmediawallviewplugin/inc/mpmediawallview.h
changeset 35 fdb31ab341af
child 37 eb79a7c355bf
equal deleted inserted replaced
34:2c5162224003 35:fdb31ab341af
       
     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 );
       
    67 
       
    68 private:
       
    69     void setUpMediaWallWidget();
       
    70     void scrollToNowPlaying();
       
    71     void setUpListAnimation();
       
    72 
       
    73     
       
    74 private:
       
    75     MpEngine                     *mEngine;                 // not own
       
    76     MpMpxCollectionData          *mCollectionData;         // not own
       
    77     MpCollectionDataModel        *mModel;                  // own - parented
       
    78     HgMediawall                  *mMediaWallWidget;        // own - parented
       
    79     HbLabel                      *mNoMusic;                // own - parented
       
    80     MpMediaWallDocumentLoader    *mDocumentLoader;         // own
       
    81     QGraphicsWidget              *mPlayPauseContainer;     // own - parented
       
    82     HbIcon                       *mPlayIcon;               // own
       
    83     HbIcon                       *mPauseIcon;              // own
       
    84     HbAction                     *mPlayPauseAction;        // own - parented
       
    85     bool                         mLibraryUpdating;
       
    86     MpPlaybackData               *mPlaybackData;           // not own
       
    87     bool                         mActivated;
       
    88     bool                         mIconUpdateNedded;
       
    89     QParallelAnimationGroup      *mListShowAnimationGroup; // own - parented
       
    90     QPropertyAnimation           *mListShowListAnimation;  // own - parented
       
    91     QPropertyAnimation           *mCoverShowListAnimation; // own - parented
       
    92     bool                         mShowingSongsList;
       
    93     MpAlbumCoverWidget           *mAlbumCover; 
       
    94     MpTrackListWidget            *mTrackList;
       
    95     
       
    96     Q_DISABLE_COPY(MpMediaWallView)
       
    97 };
       
    98 
       
    99 
       
   100 #endif //MPMEDIAWALLVIEW_H