Changeset View
Changeset View
Standalone View
Standalone View
src/viewmanager.cpp
Show All 11 Lines | |||||
12 | * Lesser General Public License for more details. | 12 | * Lesser General Public License for more details. | ||
13 | * | 13 | * | ||
14 | * You should have received a copy of the GNU Lesser General Public License | 14 | * You should have received a copy of the GNU Lesser General Public License | ||
15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | 15 | * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
16 | */ | 16 | */ | ||
17 | 17 | | |||
18 | #include "viewmanager.h" | 18 | #include "viewmanager.h" | ||
19 | 19 | | |||
20 | #include "databaseinterface.h" | 20 | #include "datatypes.h" | ||
21 | 21 | | |||
22 | ViewManager::ViewManager(QObject *parent) : QObject(parent) | 22 | ViewManager::ViewManager(QObject *parent) : QObject(parent) | ||
23 | { | 23 | { | ||
24 | } | 24 | } | ||
25 | 25 | | |||
26 | void ViewManager::openParentView(ViewManager::ViewsType viewType, const QString &mainTitle, const QUrl &mainImage) | 26 | void ViewManager::openParentView(ViewManager::ViewsType viewType, const QString &mainTitle, const QUrl &mainImage) | ||
27 | { | 27 | { | ||
28 | switch(viewType) | 28 | switch(viewType) | ||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Line(s) | |||||
142 | } | 142 | } | ||
143 | 143 | | |||
144 | void ViewManager::openRecentlyPlayedTracks(const QString &mainTitle, const QUrl &imageUrl) | 144 | void ViewManager::openRecentlyPlayedTracks(const QString &mainTitle, const QUrl &imageUrl) | ||
145 | { | 145 | { | ||
146 | mTargetView = ViewsType::RecentlyPlayedTracks; | 146 | mTargetView = ViewsType::RecentlyPlayedTracks; | ||
147 | 147 | | |||
148 | if (mCurrentView != mTargetView) { | 148 | if (mCurrentView != mTargetView) { | ||
149 | Q_EMIT openListView(mTargetView, ElisaUtils::FilterByRecentlyPlayed, 1, mainTitle, {}, | 149 | Q_EMIT openListView(mTargetView, ElisaUtils::FilterByRecentlyPlayed, 1, mainTitle, {}, | ||
150 | 0, imageUrl, ElisaUtils::Track, DatabaseInterface::LastPlayDate, | 150 | 0, imageUrl, ElisaUtils::Track, DataTypes::LastPlayDate, | ||
151 | SortOrder::SortDescending, MultipleAlbum, NoDiscHeaders, IsTrack); | 151 | SortOrder::SortDescending, MultipleAlbum, NoDiscHeaders, IsTrack); | ||
152 | } | 152 | } | ||
153 | } | 153 | } | ||
154 | 154 | | |||
155 | void ViewManager::openFrequentlyPlayedTracks(const QString &mainTitle, const QUrl &imageUrl) | 155 | void ViewManager::openFrequentlyPlayedTracks(const QString &mainTitle, const QUrl &imageUrl) | ||
156 | { | 156 | { | ||
157 | mTargetView = ViewsType::FrequentlyPlayedTracks; | 157 | mTargetView = ViewsType::FrequentlyPlayedTracks; | ||
158 | 158 | | |||
159 | if (mCurrentView != mTargetView) { | 159 | if (mCurrentView != mTargetView) { | ||
160 | Q_EMIT openListView(mTargetView, ElisaUtils::FilterByFrequentlyPlayed, 1, mainTitle, {}, | 160 | Q_EMIT openListView(mTargetView, ElisaUtils::FilterByFrequentlyPlayed, 1, mainTitle, {}, | ||
161 | 0, imageUrl, ElisaUtils::Track, DatabaseInterface::PlayFrequency, | 161 | 0, imageUrl, ElisaUtils::Track, DataTypes::PlayFrequency, | ||
162 | SortOrder::SortDescending, MultipleAlbum, NoDiscHeaders, IsTrack); | 162 | SortOrder::SortDescending, MultipleAlbum, NoDiscHeaders, IsTrack); | ||
163 | } | 163 | } | ||
164 | } | 164 | } | ||
165 | 165 | | |||
166 | void ViewManager::openAllAlbums(const QString &mainTitle, const QUrl &imageUrl) | 166 | void ViewManager::openAllAlbums(const QString &mainTitle, const QUrl &imageUrl) | ||
167 | { | 167 | { | ||
168 | mTargetView = ViewsType::AllAlbums; | 168 | mTargetView = ViewsType::AllAlbums; | ||
169 | 169 | | |||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |