| 1 | /* |
| 2 | * Copyright (C) 2020 Damir Porobic <[email protected]> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 | * Boston, MA 02110-1301, USA. |
| 18 | */ |
| 19 | |
| 20 | #include "DonateTab.h" |
| 21 | |
| 22 | DonateTab::DonateTab() |
| 23 | { |
| 24 | mLayout = new QVBoxLayout(); |
| 25 | mContent = new QLabel(); |
| 26 | mContent->setText(QLatin1String("<b>") + tr("Donation") + QLatin1String("</b>") + |
| 27 | QLatin1String("<br/>") + |
| 28 | tr("ksnip is a non-profitable copyleft libre software project, and<br/>" |
| 29 | "still has some costs that need to be covered,<br/>" |
| 30 | "like domain costs or hardware costs for cross-platform support.") + QLatin1String("<br/>") + |
| 31 | tr("If you want to help or just want to appreciate the work being done<br/>" |
| 32 | "by treating developers to a beer or coffee, you can do that %1here%2.").arg(QLatin1String("<a href=\"https://www.paypal.me/damirporobic\">")).arg(QLatin1String("</a>")) + |
| 33 | QLatin1String("<br/><br/>") + |
| 34 | tr("Donations are always welcome") + QLatin1String(" :)") + QLatin1String("<br/><br/>") + |
| 35 | QLatin1String("<b>") + tr("Become a GitHub Sponsor?") + QLatin1String("</b>") + |
| 36 | QLatin1String("<br/>") + |
| 37 | tr("Also possible, %1here%2.").arg(QLatin1String(" <a href=\"https://github.com/sponsors/DamirPorobic\">")).arg(QLatin1String("</a>"))); |
| 38 | |
| 39 | mContent->setTextFormat(Qt::RichText); |
| 40 | mContent->setTextInteractionFlags(Qt::TextBrowserInteraction); |
| 41 | mContent->setOpenExternalLinks(true); |
| 42 | mLayout->addWidget(mContent); |
| 43 | setLayout(mLayout); |
| 44 | } |
| 45 | |
| 46 | DonateTab::~DonateTab() |
| 47 | { |
| 48 | delete mContent; |
| 49 | delete mLayout; |
| 50 | } |