| 18 | namespace QodeAssist { |
| 19 | |
| 20 | UpdateDialog::UpdateDialog(QWidget *parent) |
| 21 | : QDialog(parent) |
| 22 | , m_updater(new PluginUpdater(this)) |
| 23 | { |
| 24 | setWindowTitle(tr("QodeAssist Update")); |
| 25 | setFixedSize(700, 720); |
| 26 | |
| 27 | m_layout = new QVBoxLayout(this); |
| 28 | m_layout->setSpacing(12); |
| 29 | |
| 30 | auto *supportLabel = new QLabel( |
| 31 | tr("QodeAssist is an open-source project that helps\n" |
| 32 | "developers write better code. If you find it useful, please"), |
| 33 | this); |
| 34 | supportLabel->setAlignment(Qt::AlignCenter); |
| 35 | m_layout->addWidget(supportLabel); |
| 36 | |
| 37 | auto *supportLink = new QLabel( |
| 38 | "<a href='https://ko-fi.com/qodeassist' style='color: #0066cc;'>Support on Ko-fi " |
| 39 | "☕</a>", |
| 40 | this); |
| 41 | supportLink->setOpenExternalLinks(true); |
| 42 | supportLink->setTextFormat(Qt::RichText); |
| 43 | supportLink->setAlignment(Qt::AlignCenter); |
| 44 | m_layout->addWidget(supportLink); |
| 45 | auto *githubSupportLink = new QLabel( |
| 46 | "<a " |
| 47 | "href='https://github.com/Palm1r/" |
| 48 | "QodeAssist?tab=readme-ov-file#support-the-development-of-qodeassist' style='color: #0066cc;' > Support page on github </a>", |
| 49 | this); |
| 50 | githubSupportLink->setOpenExternalLinks(true); |
| 51 | githubSupportLink->setTextFormat(Qt::RichText); |
| 52 | githubSupportLink->setAlignment(Qt::AlignCenter); |
| 53 | m_layout->addWidget(githubSupportLink); |
| 54 | |
| 55 | auto *paypalLink = new QLabel( |
| 56 | "<a href='https://www.paypal.com/paypalme/palm1r' style='color: #0066cc;'>Support via PayPal " |
| 57 | "💳</a>", |
| 58 | this); |
| 59 | paypalLink->setOpenExternalLinks(true); |
| 60 | paypalLink->setTextFormat(Qt::RichText); |
| 61 | paypalLink->setAlignment(Qt::AlignCenter); |
| 62 | m_layout->addWidget(paypalLink); |
| 63 | |
| 64 | m_layout->addSpacing(20); |
| 65 | |
| 66 | auto *registryGroup = new QGroupBox(tr("Install via Extension Registry (recommended)"), this); |
| 67 | auto *registryLayout = new QVBoxLayout(registryGroup); |
| 68 | registryLayout->setSpacing(10); |
| 69 | |
| 70 | auto *registryInfoLabel = new QLabel( |
| 71 | tr("In Qt Creator open Extensions → Browser tab, enable \"Use External Repository\", " |
| 72 | "add one of the URLs below and click Apply to install QodeAssist. Updates are then " |
| 73 | "installed from the same screen."), |
| 74 | registryGroup); |
| 75 | registryInfoLabel->setWordWrap(true); |
| 76 | registryLayout->addWidget(registryInfoLabel); |
| 77 |
nothing calls this directly
no test coverage detected