12 : QDialog(parent)
16{
17 setupUi(this);
18
19#ifdef Q_OS_ANDROID
22 m_explanationLabel->setText(
23 QStringLiteral("%1 <a href=\"#\">%2</a>")
24 .arg(i18n("Become a supporter to change the splash screen.").toHtmlEscaped(), i18n("Support Krita")));
25
26 connect(m_explanationLabel, &QLabel::linkActivated, this, &KisSplashSourceDialog::slotShowDonationDialog);
27
28 connect(androidDonations,
30 this,
32 } else {
33 m_explanationLabel->setText(
34 i18n("Changing the splash screen is only available for supporters through the Play Store."));
35 }
36#else
37 QString explanationText = i18n("Purchase Krita to change the splash screen and receive automatic updates.");
38
41#ifdef Q_OS_WINDOWS
42 makePurchaseOption(QStringLiteral(
"epicgamesstore"), i18n(
"Get Krita on the Epic Games Store")),
43 makePurchaseOption(QStringLiteral(
"microsoftstore"), i18n(
"Get Krita on the Microsoft Store")),
44#endif
45#ifdef Q_OS_MACOS
46 makePurchaseOption(QStringLiteral(
"appleappstore"), i18n(
"Get Krita on the App Store")),
47#endif
48 };
49
50 m_explanationLabel->setOpenExternalLinks(true);
51 m_explanationLabel->setText(
52 QStringLiteral("%1<ul>%2</ul>").arg(explanationText.toHtmlEscaped(), purchaseOptions.join(QString())));
53#endif
54
55 connect(m_sourceCombo,
56 QOverload<int>::of(&QComboBox::currentIndexChanged),
57 this,
60 connect(m_buttons, &QDialogButtonBox::accepted, this, &KisSplashSourceDialog::accept);
61 connect(m_buttons, &QDialogButtonBox::rejected, this, &KisSplashSourceDialog::reject);
62
64}
static KisAndroidDonations * instance()
static QVector< Source > getSources()
KisSignalCompressor * m_updatePreviewCompressor
void slotSourceSelected()
static QString makePurchaseOption(const QString &key, const QString &text)
QVector< KisSplashScreen::Source > m_sources
void initSources(const QString &key)
void slotRefreshSources()