mpviewplugins/mpcollectionviewplugin/inc/mpcollectionview.h
changeset 34 2c5162224003
parent 22 ecf06a08d4d9
child 29 8192e5b5c935
equal deleted inserted replaced
22:ecf06a08d4d9 34:2c5162224003
    36 class MpCollectionDataModel;
    36 class MpCollectionDataModel;
    37 class MpEngine;
    37 class MpEngine;
    38 class MpMpxCollectionData;
    38 class MpMpxCollectionData;
    39 class MpNowPlayingWidget;
    39 class MpNowPlayingWidget;
    40 class MpSnapshotWidget;
    40 class MpSnapshotWidget;
       
    41 class MpCollectionPopupHandler;
    41 class QTranslator;
    42 class QTranslator;
    42 class HbPopup;
       
    43 
    43 
    44 class MpCollectionView : public MpViewBase
    44 class MpCollectionView : public MpViewBase
    45 {
    45 {
    46     Q_OBJECT
    46     Q_OBJECT
    47 
    47 
    52 
    52 
    53     void initializeView();
    53     void initializeView();
    54     void activateView();
    54     void activateView();
    55     void deactivateView();
    55     void deactivateView();
    56     void setDefaultView();
    56     void setDefaultView();
       
    57     bool isActivated();    
       
    58     void openItem( int index );
    57 
    59 
    58 signals:
    60 signals:
    59 
    61 
    60     void command( int command );
    62     void command( int command );
    61 
    63 
    63 
    65 
    64     void setContext( TCollectionContext context );
    66     void setContext( TCollectionContext context );
    65 
    67 
    66     void openSongs();
    68     void openSongs();
    67     void openArtists();
    69     void openArtists();
       
    70     void openAlbums();
    68     void openPlaylists();
    71     void openPlaylists();
    69     void openGenres();
    72     void openGenres();
    70     void find();
    73     void find();
    71     void openMusicStore();
    74     void openMusicStore();
    72 
    75 
    89     void songsDeleted( bool success );
    92     void songsDeleted( bool success );
    90     void playlistsRenamed( bool success );
    93     void playlistsRenamed( bool success );
    91 
    94 
    92     void prepareToAddToPlaylist();
    95     void prepareToAddToPlaylist();
    93     void handleIsolatedCollectionOpened( MpMpxCollectionData* collectionData );
    96     void handleIsolatedCollectionOpened( MpMpxCollectionData* collectionData );
    94     void addToCurrentPlaylist( MpMpxCollectionData* collectionData );
       
    95     void createNewPlaylist( MpMpxCollectionData* collectionData );
       
    96     void arrangeSongs();
    97     void arrangeSongs();
    97     void openContextMenu( int index, const QPointF &coords );
    98     void openContextMenu( int index, const QPointF &coords );
    98     void outstandingPopupClosing();
       
    99 
    99 
   100     void handleUsbBlocked( bool blocked );
   100     void handleUsbBlocked( bool blocked );
   101     void handleLibraryAboutToUpdate();
   101     void handleLibraryAboutToUpdate();
   102     void handleLibraryUpdated();
   102     void handleLibraryUpdated();
   103 
   103 
   104 private:
   104 private:
   105 
       
   106     void openDefaultViewContextMenu( int index, const QPointF &coords );
       
   107     void openFetchViewContextMenu( int index, const QPointF &coords );
       
   108 
   105 
   109     void setMainToolBar();
   106     void setMainToolBar();
   110     void setPlaylistToolBar();
   107     void setPlaylistToolBar();
   111 
   108 
   112     HbAction *createToolBarAction( QActionGroup *actionsGroup,
   109     HbAction *createToolBarAction( QActionGroup *actionsGroup,
   116     void updateToolBar();
   113     void updateToolBar();
   117     void setSoftkey();
   114     void setSoftkey();
   118 
   115 
   119     void setBannerVisibility( bool visible );
   116     void setBannerVisibility( bool visible );
   120     int generateShuffleIndex();
   117     int generateShuffleIndex();
   121     void launchAddToPlaylistDialog( QList<int> &selection );
       
   122     void startContainerTransition( TCollectionContext contextFrom, TCollectionContext contextTo );
   118     void startContainerTransition( TCollectionContext contextFrom, TCollectionContext contextTo );
   123     void requestDelete( QList<int> &selection );
   119     void cancelOngoingOperation();
   124     QModelIndexList getModelIndexes( const QString &label, QAbstractItemModel* model, bool &ok );
       
   125     QString getText(const QString &label,const QString &text, bool &ok);
       
   126     void setOutstandingPopup(HbPopup *popup);
       
   127     bool queryNewPlaylistName(QString &newPlaylistName , const QStringList &playlists );
       
   128 
   120 
   129 private:
   121 private:
   130 
   122 
   131     TCollectionContext              mCollectionContext;
   123     TCollectionContext              mCollectionContext;
   132 
   124 
   140     bool                            mActivated;
   132     bool                            mActivated;
   141     MpNowPlayingWidget              *mNowPlayingBanner;     // Own
   133     MpNowPlayingWidget              *mNowPlayingBanner;     // Own
   142     bool                            mBannerAttached;
   134     bool                            mBannerAttached;
   143 
   135 
   144     HbMainWindow                    *mWindow;               // Not own
   136     HbMainWindow                    *mWindow;               // Not own
   145     HbAction                        *mSoftKeyQuit;          // Not own
   137     HbAction                        *mNavigationQuit;       // Not own
   146     HbAction                        *mSoftKeyBack;          // Not own
   138     HbAction                        *mNavigationBack;       // Not own
   147 
   139 
   148     MpCollectionDocumentLoader      *mDocumentLoader;       // Own
   140     MpCollectionDocumentLoader      *mDocumentLoader;       // Own
   149     HbWidget                        *mMainContainer;        // Own
   141     HbWidget                        *mMainContainer;        // Own
   150 
   142 
   151     HbToolBar                       *mMainToolBar;
   143     HbToolBar                       *mMainToolBar;
   155 
   147 
   156     QTranslator                     *mMpTranslator;         // Own
   148     QTranslator                     *mMpTranslator;         // Own
   157     QTranslator                     *mCommonTranslator;     // Own
   149     QTranslator                     *mCommonTranslator;     // Own
   158 
   150 
   159     bool                            mActivationWaiting;
   151     bool                            mActivationWaiting;
   160     HbPopup                         *mOutstandingPopup;     // Not own
   152     MpCollectionPopupHandler        *mMpPopupHandler;       // Own
   161 
   153 
   162     bool                            mUsbBlocked;
   154     bool                            mUsbBlocked;
   163 
   155 
   164 };
   156 };
   165 
   157