From 52661635b4f04c356f0092e5b59f1261dd04b34f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 29 Oct 2023 02:20:25 -0500 Subject: Qt UI: Add Advanced Options screen Allows the user to select arch, repository, signingkey, and version. Closes: #337 --- ui/qt5/intropage.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ui/qt5/intropage.cc') diff --git a/ui/qt5/intropage.cc b/ui/qt5/intropage.cc index ab21657..94e222d 100644 --- a/ui/qt5/intropage.cc +++ b/ui/qt5/intropage.cc @@ -11,6 +11,7 @@ */ #include "intropage.hh" +#include "advoptsdialog.hh" #include #ifdef HAS_INSTALL_ENV @@ -36,6 +37,12 @@ IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { "

For more information about the installfile format and syntax, see the Adélie Linux Installation Handbook.

")); descLabel->setOpenExternalLinks(true); descLabel->setTextFormat(Qt::RichText); + + toolButton = new QPushButton(tr("&Advanced Options..."), this); + connect(toolButton, &QPushButton::clicked, [this](bool) { + AdvOptsDialog dialog(horizonWizard(), this); + dialog.exec(); + }); #else /* HAS_INSTALL_ENV */ QMenu *toolMenu; toolButton = new QPushButton(tr("Launch &Tool..."), this); @@ -56,6 +63,10 @@ IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { p->start("netsurf-gtk3", QStringList()); horizonWizard()->tools.push_back(p); }); + connect(toolMenu->addAction("&Advanced Options"), &QAction::triggered, [this](void) { + AdvOptsDialog dialog(horizonWizard(), this); + dialog.exec(); + }); toolButton->setMenu(toolMenu); descLabel = new QLabel( @@ -75,9 +86,7 @@ IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { layout = new QVBoxLayout; layout->addWidget(descLabel); -#ifdef HAS_INSTALL_ENV layout->addStretch(); layout->addWidget(toolButton, 0, Qt::AlignCenter); -#endif /* HAS_INSTALL_ENV */ setLayout(layout); } -- cgit v1.2.3-70-g09d2