mpviewplugins/mpcollectionviewplugin/inc/mpcollectionview.h
changeset 20 82baf59ce8dd
parent 19 4e84c994a771
child 22 ecf06a08d4d9
equal deleted inserted replaced
19:4e84c994a771 20:82baf59ce8dd
    33 class HbToolBar;
    33 class HbToolBar;
    34 class MpCollectionDocumentLoader;
    34 class MpCollectionDocumentLoader;
    35 class MpCollectionContainerFactory;
    35 class MpCollectionContainerFactory;
    36 class MpCollectionContainer;
    36 class MpCollectionContainer;
    37 class MpCollectionDataModel;
    37 class MpCollectionDataModel;
       
    38 class MpEngine;
    38 class MpMpxFrameworkWrapper;
    39 class MpMpxFrameworkWrapper;
    39 class MpMpxCollectionData;
    40 class MpMpxCollectionData;
    40 class MpNowPlayingWidget;
    41 class MpNowPlayingWidget;
    41 class MpSnapshotWidget;
    42 class MpSnapshotWidget;
    42 class MpCollectionSongScanner;
    43 class QTranslator;
       
    44 class HbPopup;
    43 
    45 
    44 class MpCollectionView : public MpViewBase
    46 class MpCollectionView : public MpViewBase
    45 {
    47 {
    46     Q_OBJECT
    48     Q_OBJECT
    47 
    49 
    51     virtual ~MpCollectionView();
    53     virtual ~MpCollectionView();
    52 
    54 
    53     void initializeView();
    55     void initializeView();
    54     void activateView();
    56     void activateView();
    55     void deactivateView();
    57     void deactivateView();
       
    58     void setDefaultView();
    56 
    59 
    57     void orientationChange( Qt::Orientation orientation );
    60     void orientationChange( Qt::Orientation orientation );
    58 
    61 
    59 signals:
    62 signals:
    60 
    63 
    76     void back();
    79     void back();
    77     void exit();
    80     void exit();
    78 
    81 
    79     void startPlaybackView();
    82     void startPlaybackView();
    80     void attachNowPlayingBanner( bool active );
    83     void attachNowPlayingBanner( bool active );
    81     void nowPlayingBannerActivated();
       
    82     void nowPlayingBannerChosenFxComplete1( const HbEffect::EffectStatus &status );
       
    83     void nowPlayingBannerChosenFxComplete2( const HbEffect::EffectStatus &status );
       
    84     void containerTransitionComplete( const HbEffect::EffectStatus &status );
    84     void containerTransitionComplete( const HbEffect::EffectStatus &status );
    85 
    85 
    86     void shufflePlayAll();
    86     void shufflePlayAll();
    87     void refreshLibrary();
    87     void refreshLibrary();
    88     void addToPlaylist();
    88     void addToPlaylist();
    91 
    91 
    92     void playlistSaved( bool success );
    92     void playlistSaved( bool success );
    93     void songsDeleted( bool success );
    93     void songsDeleted( bool success );
    94     void playlistsRenamed( bool success );
    94     void playlistsRenamed( bool success );
    95 
    95 
    96     void handleScanningComplete();
    96     void prepareToAddToPlaylist();
       
    97     void handleIsolatedCollectionOpened( MpMpxCollectionData* collectionData );
       
    98     void addToCurrentPlaylist( MpMpxCollectionData* collectionData );
       
    99     void createNewPlaylist( MpMpxCollectionData* collectionData );
       
   100     void arrangeSongs();
       
   101     void openContextMenu( int index, const QPointF &coords );
       
   102     void outstandingPopupClosing();
    97 
   103 
    98     void openContextMenu( int index, const QPointF &coords );
   104     void handleUsbBlocked( bool blocked );
       
   105     void handleLibraryAboutToUpdate();
       
   106     void handleLibraryUpdated();
    99 
   107 
   100 private:
   108 private:
   101 
   109 
   102     void openDefaultViewContextMenu( int index, const QPointF &coords );
   110     void openDefaultViewContextMenu( int index, const QPointF &coords );
   103     void openFetchViewContextMenu( int index, const QPointF &coords );
   111     void openFetchViewContextMenu( int index, const QPointF &coords );
   104 
   112 
   105     void setMainToolBar();
   113     void setMainToolBar();
   106     void setPlaylistToolBar();
   114     void setPlaylistToolBar();
   107 
   115 
   108     HbAction *createToolBarAction( QActionGroup *actionsGroup,
   116     HbAction *createToolBarAction( QActionGroup *actionsGroup,
   109         const QString& iconOn,
   117         const QString& icon );
   110         const QString& iconOff,
       
   111         const QString& toolTip );
       
   112 
   118 
   113     void updateMenu();
   119     void updateMenu();
   114     void updateToolBar();
   120     void updateToolBar();
   115     void setSoftkey();
   121     void setSoftkey();
   116     void clearSoftkey();
       
   117 
   122 
   118     void setBannerVisibility( bool visible );
   123     void setBannerVisibility( bool visible );
   119     int generateShuffleIndex();
   124     int generateShuffleIndex();
   120     void launchAddToPlaylistDialog( QList<int> selection );
   125     void launchAddToPlaylistDialog( QList<int> &selection );
   121     void startContainerTransition( TCollectionContext contextFrom, TCollectionContext contextTo );
   126     void startContainerTransition( TCollectionContext contextFrom, TCollectionContext contextTo );
   122     void requestDelete(QList<int> selection);
   127     void requestDelete( QList<int> &selection );
       
   128     QModelIndexList getModelIndexes( const QString &label, QAbstractItemModel* model, bool &ok );
       
   129     QString getText(const QString &label,const QString &text, bool &ok);
       
   130     void setOutstandingPopup(HbPopup *popup);
       
   131     bool queryNewPlaylistName(QString &newPlaylistName , const QStringList &playlists );
   123 
   132 
   124 private:
   133 private:
   125 
   134 
   126     TCollectionContext              mCollectionContext;
   135     TCollectionContext              mCollectionContext;
   127 
   136 
   128     MpMpxFrameworkWrapper           *mMpxWrapper;           // Own
   137     MpMpxFrameworkWrapper           *mMpxWrapper;           // Own
       
   138     MpEngine                        *mMpEngine;             // Not own
   129     MpMpxCollectionData             *mCollectionData;       // Not own
   139     MpMpxCollectionData             *mCollectionData;       // Not own
   130 
   140 
   131     MpCollectionContainerFactory    *mContainerFactory;     // Own
   141     MpCollectionContainerFactory    *mContainerFactory;     // Own
   132     MpCollectionContainer           *mCollectionContainer;  // Not own
   142     MpCollectionContainer           *mCollectionContainer;  // Not own
   133     MpCollectionDataModel           *mCollectionDataModel;  // Own
   143     MpCollectionDataModel           *mCollectionDataModel;  // Own
   134 
   144 
   135     bool                            mActivated;
   145     bool                            mActivated;
   136     MpNowPlayingWidget              *mNowPlayingBanner;     // Own
   146     MpNowPlayingWidget              *mNowPlayingBanner;     // Own
   137     bool                            mBannerAttached;
   147     bool                            mBannerAttached;
   138     bool                            mEffectOnGoing;
       
   139 
   148 
   140     HbMainWindow                    *mWindow;               // Not own
   149     HbMainWindow                    *mWindow;               // Not own
   141     HbAction                        *mSoftKeyQuit;          // Not own
   150     HbAction                        *mSoftKeyQuit;          // Not own
   142     HbAction                        *mSoftKeyBack;          // Not own
   151     HbAction                        *mSoftKeyBack;          // Not own
   143 
   152 
   146 
   155 
   147     HbToolBar                       *mMainToolBar;
   156     HbToolBar                       *mMainToolBar;
   148     HbToolBar                       *mPlaylistToolBar;
   157     HbToolBar                       *mPlaylistToolBar;
   149 
   158 
   150     MpSnapshotWidget                *mSnapshot;
   159     MpSnapshotWidget                *mSnapshot;
   151     MpCollectionSongScanner         *mSongScanner;          // Own
   160 
   152     bool                            mScanning;
   161     QTranslator                     *mMpTranslator;         // Own
       
   162     QTranslator                     *mCommonTranslator;     // Own
       
   163 
       
   164     bool                            mActivationWaiting;
       
   165     HbPopup                         *mOutstandingPopup;     // Not own
       
   166 
       
   167     bool                            mUsbBlocked;
   153 
   168 
   154 };
   169 };
   155 
   170 
   156 #endif  // MPCOLLECTIONVIEW_H
   171 #endif  // MPCOLLECTIONVIEW_H
   157 
   172