| 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 "ContactTab.h" |
| 21 | |
| 22 | ContactTab::ContactTab() : |
| 23 | mLayout(new QVBoxLayout()), |
| 24 | mContent(new QLabel()) |
| 25 | { |
| 26 | mContent->setText( |
| 27 | QLatin1String("<b>") + tr("Community") + QLatin1String("</b>") + |
| 28 | QLatin1String("<br>") + |
| 29 | tr("If you have general questions, ideas or just want to talk about ksnip,<br/>" |
| 30 | "please join our %1 or our %2 server.") |
| 31 | .arg(QLatin1String("<a href=\"http://discord.ksnip.org\">Discord</a>")) |
| 32 | .arg(QLatin1String("<a href=\"https://web.libera.chat/?channels=#ksnip\">IRC</a>")) + |
| 33 | QLatin1String("<br/><br/>") + |
| 34 | QLatin1String("<b>") + tr("Bug Reports") + QLatin1String("</b>") + |
| 35 | QLatin1String("<br>") + |
| 36 | tr("Please use %1 to report bugs.") |
| 37 | .arg(QLatin1String("<a href=\"https://github.com/ksnip/ksnip/issues/\">GitHub</a>"))); |
| 38 | mContent->setTextFormat(Qt::RichText); |
| 39 | mContent->setTextInteractionFlags(Qt::TextBrowserInteraction); |
| 40 | mContent->setOpenExternalLinks(true); |
| 41 | mLayout->addWidget(mContent); |
| 42 | setLayout(mLayout); |
| 43 | |
| 44 | |
| 45 | } |
| 46 | |
| 47 | ContactTab::~ContactTab() |
| 48 | { |
| 49 | delete mLayout; |
| 50 | delete mContent; |
| 51 | } |