comparison src/services/services.cpp @ 47:d8eb763e6661

information.cpp: add widgets to the list tab, and add an "optional date" widget like taiga has so users can specify whether to set the date or not
author Paper <mrpapersonic@gmail.com>
date Mon, 25 Sep 2023 00:43:38 -0400
parents 619cbd6e69f9
children 0c4138de2ea7
comparison
equal deleted inserted replaced
46:d0adc4aedfc8 47:d8eb763e6661
1 #include "services/services.h" 1 #include "services/services.h"
2 #include "core/session.h" 2 #include "core/session.h"
3 #include "services/anilist.h" 3 #include "services/anilist.h"
4 #include "gui/dialog/settings.h"
5 #include <QMessageBox>
4 6
5 namespace Services { 7 namespace Services {
6 8
7 void Synchronize() { 9 void Synchronize() {
8 switch (session.config.service) { 10 switch (session.config.service) {
9 case Anime::Services::ANILIST: AniList::GetAnimeList(); break; 11 case Anime::Services::ANILIST: AniList::GetAnimeList(); break;
10 default: break; 12 default: {
13 QMessageBox msg;
14 msg.setInformativeText("It seems you haven't yet selected a service to use.");
15 msg.setText("Would you like to select one now?");
16 msg.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
17 msg.setDefaultButton(QMessageBox::Yes);
18 int ret = msg.exec();
19 if (ret == QMessageBox::Yes) {
20 SettingsDialog dialog;
21 dialog.exec();
22 }
23 break;
24 }
11 } 25 }
12 } 26 }
13 27
14 bool Authorize() { 28 bool Authorize() {
15 switch (session.config.service) { 29 switch (session.config.service) {