/* * intropage.cc - Implementation of the UI.Intro page * horizon-qt5, the Qt 5 user interface for * Project Horizon * * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved. * This code is licensed under the AGPL 3.0 license, as noted in the * LICENSE-code file in the root directory of this repository. * * SPDX-License-Identifier: AGPL-3.0-only */ #include "intropage.hh" #include #ifdef HAS_INSTALL_ENV #include #include #endif /* HAS_INSTALL_ENV */ #include IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { QLabel *descLabel; QVBoxLayout *layout; loadWatermark("intro"); setTitle(tr("Welcome to Adélie Linux")); #ifndef HAS_INSTALL_ENV descLabel = new QLabel( tr("

" "Horizon will guide you through creation of a basic installfile for installing Adélie Linux on another computer." "

" "IMPORTANT: You may be allowed to specify an invalid or non-bootable disk layout or network configuration. " "For best results, run System Installation directly on the computer you wish to run Adélie Linux." "

" "For more information about the installfile format and syntax, see the " "" "Adélie Linux Installation Guide on the Internet.")); descLabel->setOpenExternalLinks(true); descLabel->setTextFormat(Qt::RichText); #else /* HAS_INSTALL_ENV */ QMenu *toolMenu; toolButton = new QPushButton(tr("Launch &Tool..."), this); toolMenu = new QMenu("&Tools", toolButton); connect(toolMenu->addAction("&Terminal"), &QAction::triggered, [=](void) { QProcess p; p.execute("xterm", {"-fa", "Liberation Mono", "-fs", "12"}); }); connect(toolMenu->addAction("&Partition Editor"), &QAction::triggered, [=](void) { QProcess p; p.execute("partitionmanager"); }); /*connect(toolMenu->addAction("&Web Browser"), &QAction::triggered, [=](void){ QProcess p; p.execute("otter-browser"); });*/ toolButton->setMenu(toolMenu); descLabel = new QLabel( tr("Thank you for choosing the reliable, secure, libre Adélie Linux operating system. " "This installation process will take about 10-15 minutes.\n\n" "When you're ready to answer a few questions, you can get started by choosing Continue or pressing F8. " "If you'd like more information about the installation procedure, choose Help or press F1 at any time.\n\n" "The installation procedure will not change anything on your computer until the final step. " "You can safely exit at any time, with no change to your computer, by choosing Exit or pressing F3.\n\n" "If you are unable to use a mouse, you may press the Tab key to cycle between the available inputs. " "The currently selected input will be highlighted.")); #endif /* !HAS_INSTALL_ENV */ descLabel->setWordWrap(true); layout = new QVBoxLayout; layout->addWidget(descLabel); #ifdef HAS_INSTALL_ENV layout->addStretch(); layout->addWidget(toolButton); #endif /* HAS_INSTALL_ENV */ setLayout(layout); }