71 case ECollectionContextAllSongs: |
71 case ECollectionContextAllSongs: |
72 deleteCurrentContainer(); |
72 deleteCurrentContainer(); |
73 mCurrentContainer = new MpCollectionContainerAllSongs(mDocumentLoader); |
73 mCurrentContainer = new MpCollectionContainerAllSongs(mDocumentLoader); |
74 mCurrentContainer->initialize(); |
74 mCurrentContainer->initialize(); |
75 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
75 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
76 connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); |
76 connect( mCurrentContainer, SIGNAL(itemLongPressed(QModelIndex, QPointF)), mView, SLOT(openContextMenu(QModelIndex, QPointF)) ); |
77 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
77 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
78 break; |
78 break; |
79 case ECollectionContextArtists: |
79 case ECollectionContextArtists: |
80 if ( ( mCurrentContext != ECollectionContextArtistAlbums ) |
80 if ( ( mCurrentContext != ECollectionContextArtistAlbums ) |
81 && ( mCurrentContext != ECollectionContextArtistAlbumsTBone) |
81 && ( mCurrentContext != ECollectionContextArtistAlbumsTBone) |
83 { |
83 { |
84 deleteCurrentContainer(); |
84 deleteCurrentContainer(); |
85 mCurrentContainer = new MpCollectionContainerArtists(mDocumentLoader); |
85 mCurrentContainer = new MpCollectionContainerArtists(mDocumentLoader); |
86 mCurrentContainer->initialize(); |
86 mCurrentContainer->initialize(); |
87 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
87 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
88 connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); |
88 connect( mCurrentContainer, SIGNAL(itemLongPressed(QModelIndex, QPointF)), mView, SLOT(openContextMenu(QModelIndex, QPointF)) ); |
89 connect( mCurrentContainer, SIGNAL(findAlbumSongs(int)), mView, SLOT(findAlbumSongs(int)) ); |
89 connect( mCurrentContainer, SIGNAL(findAlbumSongs(int)), mView, SLOT(findAlbumSongs(int)) ); |
90 connect( mCurrentContainer, SIGNAL(playAlbumSongs(int, int)), mView, SLOT(playAlbumSongs(int, int)) ); |
90 connect( mCurrentContainer, SIGNAL(playAlbumSongs(int, int)), mView, SLOT(playAlbumSongs(int, int)) ); |
91 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
91 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
92 } |
92 } |
93 break; |
93 break; |
95 if ( mCurrentContext != ECollectionContextAlbumsTBone ) { |
95 if ( mCurrentContext != ECollectionContextAlbumsTBone ) { |
96 deleteCurrentContainer(); |
96 deleteCurrentContainer(); |
97 mCurrentContainer = new MpCollectionContainerAlbums(mDocumentLoader); |
97 mCurrentContainer = new MpCollectionContainerAlbums(mDocumentLoader); |
98 mCurrentContainer->initialize(); |
98 mCurrentContainer->initialize(); |
99 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
99 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
100 connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); |
100 connect( mCurrentContainer, SIGNAL(itemLongPressed(QModelIndex, QPointF)), mView, SLOT(openContextMenu(QModelIndex, QPointF)) ); |
101 connect( mCurrentContainer, SIGNAL(findAlbumSongs(int)), mView, SLOT(findAlbumSongs(int)) ); |
101 connect( mCurrentContainer, SIGNAL(findAlbumSongs(int)), mView, SLOT(findAlbumSongs(int)) ); |
102 connect( mCurrentContainer, SIGNAL(playAlbumSongs(int, int)), mView, SLOT(playAlbumSongs(int, int)) ); |
102 connect( mCurrentContainer, SIGNAL(playAlbumSongs(int, int)), mView, SLOT(playAlbumSongs(int, int)) ); |
103 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
103 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
104 } |
104 } |
105 break; |
105 break; |
107 if ( mCurrentContext != ECollectionContextPlaylistSongs ) { |
107 if ( mCurrentContext != ECollectionContextPlaylistSongs ) { |
108 deleteCurrentContainer(); |
108 deleteCurrentContainer(); |
109 mCurrentContainer = new MpCollectionContainerPlaylists(mDocumentLoader); |
109 mCurrentContainer = new MpCollectionContainerPlaylists(mDocumentLoader); |
110 mCurrentContainer->initialize(); |
110 mCurrentContainer->initialize(); |
111 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
111 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
112 connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); |
112 connect( mCurrentContainer, SIGNAL(itemLongPressed(QModelIndex, QPointF)), mView, SLOT(openContextMenu(QModelIndex, QPointF)) ); |
113 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
113 connect( mCurrentContainer, SIGNAL(shuffleEnabled(bool)), mView, SLOT(setShuffleAction(bool)) ); |
114 } |
114 } |
115 break; |
115 break; |
116 case ECollectionContextArtistAlbums: |
116 case ECollectionContextArtistAlbums: |
117 case ECollectionContextArtistAlbumsTBone: |
117 case ECollectionContextArtistAlbumsTBone: |