19 |
19 |
20 #include "mpcollectioncontainerfactory.h" |
20 #include "mpcollectioncontainerfactory.h" |
21 #include "mpcollectionview.h" |
21 #include "mpcollectionview.h" |
22 #include "mpcollectioncontainer.h" |
22 #include "mpcollectioncontainer.h" |
23 #include "mpcollectioncontainerallsongs.h" |
23 #include "mpcollectioncontainerallsongs.h" |
24 #include "mpcollectioncontainerartists.h" |
24 #include "mpcollectioncontaineralbums.h" |
25 #include "mpcollectioncontainerplaylists.h" |
25 #include "mpcollectioncontainerplaylists.h" |
26 #include "mpcollectioncontainergenres.h" |
26 #include "mpcollectioncontainergenres.h" |
27 #include "mptrace.h" |
27 #include "mptrace.h" |
28 |
28 |
29 /*! |
29 /*! |
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(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); |
77 break; |
77 break; |
78 case ECollectionContextArtistAlbums: |
78 case ECollectionContextAlbums: |
79 if ( mCurrentContext != ECollectionContextAlbumSongs ) { |
79 if ( mCurrentContext != ECollectionContextAlbumSongs ) { |
80 deleteCurrentContainer(); |
80 deleteCurrentContainer(); |
81 mCurrentContainer = new MpCollectionContainerArtists(mDocumentLoader); |
81 mCurrentContainer = new MpCollectionContainerAlbums(mDocumentLoader); |
82 mCurrentContainer->initialize(); |
82 mCurrentContainer->initialize(); |
83 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
83 connect( mCurrentContainer, SIGNAL(itemActivated(int)), mView, SLOT(openIndex(int)) ); |
84 connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); |
84 connect( mCurrentContainer, SIGNAL(itemLongPressed(int, QPointF)), mView, SLOT(openContextMenu(int, QPointF)) ); |
85 } |
85 } |
86 break; |
86 break; |
121 TX_ENTRY_ARGS("mCurrentContext=" << mCurrentContext); |
121 TX_ENTRY_ARGS("mCurrentContext=" << mCurrentContext); |
122 switch ( mCurrentContext ) { |
122 switch ( mCurrentContext ) { |
123 case ECollectionContextAllSongs: |
123 case ECollectionContextAllSongs: |
124 delete static_cast<MpCollectionContainerAllSongs *>(mCurrentContainer); |
124 delete static_cast<MpCollectionContainerAllSongs *>(mCurrentContainer); |
125 break; |
125 break; |
126 case ECollectionContextArtistAlbums: |
126 case ECollectionContextAlbums: |
127 case ECollectionContextAlbumSongs: |
127 case ECollectionContextAlbumSongs: |
128 delete static_cast<MpCollectionContainerArtists *>(mCurrentContainer); |
128 delete static_cast<MpCollectionContainerAlbums *>(mCurrentContainer); |
129 break; |
129 break; |
130 case ECollectionContextPlaylists: |
130 case ECollectionContextPlaylists: |
131 case ECollectionContextPlaylistSongs: |
131 case ECollectionContextPlaylistSongs: |
132 delete static_cast<MpCollectionContainerPlaylists *>(mCurrentContainer); |
132 delete static_cast<MpCollectionContainerPlaylists *>(mCurrentContainer); |
133 break; |
133 break; |