Refactored opening from toasts

implemented maps and map look up functions
This commit is contained in:
TranRed
2019-04-27 13:47:13 +02:00
committed by pajlada
parent 2be81aa877
commit c20629c165
4 changed files with 85 additions and 27 deletions
+10 -3
View File
@@ -4,8 +4,8 @@
#include "controllers/notifications/NotificationController.hpp"
#include "controllers/notifications/NotificationModel.hpp"
#include "singletons/Settings.hpp"
#include "singletons/Toasts.hpp"
#include "util/LayoutCreator.hpp"
#include "widgets/helper/CommonTexts.hpp"
#include "widgets/helper/EditableModelView.hpp"
#include <QCheckBox>
@@ -45,10 +45,17 @@ NotificationPage::NotificationPage()
openIn.emplace<QLabel>("Open stream from Toast: ")
->setSizePolicy(QSizePolicy::Maximum,
QSizePolicy::Preferred);
openIn
.append(this->createComboBox(
{OPEN_IN_BROWSER, OPEN_PLAYER_IN_BROWSER,
OPEN_IN_STREAMLINK, DONT_OPEN},
{Toasts::findStringFromReaction(
ToastReactions::openInBrowser),
Toasts::findStringFromReaction(
ToastReactions::openInPlayer),
Toasts::findStringFromReaction(
ToastReactions::openInStreamlink),
Toasts::findStringFromReaction(
ToastReactions::dontOpen)},
getSettings()->openFromToast))
->setSizePolicy(QSizePolicy::Maximum,
QSizePolicy::Preferred);