From 6b85b21a333a0b18edf17b2ac945cf6849d28675 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sun, 23 Feb 2020 21:29:27 -0600 Subject: Qt UI: Add missing What's This and help files --- ui/qt5/horizon.qrc | 4 +++ ui/qt5/horizonwizard.cc | 14 ++++++--- ui/qt5/intropage.cc | 3 +- ui/qt5/networkingpage.cc | 7 +++-- ui/qt5/partitionchoicepage.cc | 8 ++++-- ui/qt5/partitiondiskpage.cc | 2 +- ui/qt5/partitionmanualpage.cc | 4 ++- ui/qt5/partitionmountpage.cc | 19 +++++++++++++ ui/qt5/resources/intro-help.txt | 3 ++ ui/qt5/resources/network-start-help.txt | 23 +++++++++++---- ui/qt5/resources/partition-disk-help.txt | 7 +++++ ui/qt5/resources/partition-help.txt | 9 +++--- ui/qt5/resources/partition-manipulation-help.txt | 36 ++++++++++++++++++++++++ ui/qt5/resources/partition-manual-help.txt | 0 ui/qt5/resources/partition-mountpoints-help.txt | 0 15 files changed, 119 insertions(+), 20 deletions(-) create mode 100644 ui/qt5/partitionmountpage.cc create mode 100644 ui/qt5/resources/partition-disk-help.txt create mode 100644 ui/qt5/resources/partition-manipulation-help.txt create mode 100644 ui/qt5/resources/partition-manual-help.txt create mode 100644 ui/qt5/resources/partition-mountpoints-help.txt diff --git a/ui/qt5/horizon.qrc b/ui/qt5/horizon.qrc index f91afc1..2e55ddf 100644 --- a/ui/qt5/horizon.qrc +++ b/ui/qt5/horizon.qrc @@ -23,6 +23,10 @@ resources/intro-help.txt resources/input-help.txt resources/partition-help.txt + resources/partition-disk-help.txt + resources/partition-manipulation-help.txt + resources/partition-manual-help.txt + resources/partition-mountpoints-help.txt resources/firmware-help.txt resources/network-start-help.txt resources/network-iface-help.txt diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc index 818ed53..161accf 100644 --- a/ui/qt5/horizonwizard.cc +++ b/ui/qt5/horizonwizard.cc @@ -302,6 +302,12 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) { setButtonText(FinishButton, tr("&Save (F10)")); #endif /* HAS_INSTALL_ENV */ + button(HelpButton)->setWhatsThis(tr("Activates the Help screen.")); + button(CancelButton)->setWhatsThis(tr("Prompts to close System Installation.")); + button(BackButton)->setWhatsThis(tr("Goes back to the previous page of System Installation.")); + button(NextButton)->setWhatsThis(tr("Goes forward to the next page of System Installation.")); + button(FinishButton)->setWhatsThis(tr("Completes the information gathering phase of System Installation.")); + f1 = new QShortcut(Qt::Key_F1, this); connect(f1, &QShortcut::activated, button(HelpButton), &QAbstractButton::click); @@ -310,22 +316,22 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) { f3 = new QShortcut(Qt::Key_F3, this); connect(f3, &QShortcut::activated, button(CancelButton), &QAbstractButton::click); - f3->setWhatsThis(tr("Prompts to exit the installation.")); + f3->setWhatsThis(tr("Prompts to close System Installation.")); f6 = new QShortcut(Qt::Key_F6, this); connect(f6, &QShortcut::activated, button(BackButton), &QAbstractButton::click); - f6->setWhatsThis(tr("Goes back to the previous page.")); + f6->setWhatsThis(tr("Goes back to the previous page of System Installation.")); f8 = new QShortcut(Qt::Key_F8, this); connect(f8, &QShortcut::activated, button(NextButton), &QAbstractButton::click); - f8->setWhatsThis(tr("Goes forward to the next page.")); + f8->setWhatsThis(tr("Goes forward to the next page of System Installation.")); f10 = new QShortcut(Qt::Key_F10, this); connect(f10, &QShortcut::activated, button(FinishButton), &QAbstractButton::click); - f10->setWhatsThis(tr("Finishes the wizard.")); + f10->setWhatsThis(tr("Completes the information gathering phase of System Installation.")); #ifdef HAS_INSTALL_ENV interfaces = probe_ifaces(); diff --git a/ui/qt5/intropage.cc b/ui/qt5/intropage.cc index 65bac65..2cbbbe2 100644 --- a/ui/qt5/intropage.cc +++ b/ui/qt5/intropage.cc @@ -3,7 +3,7 @@ * horizon-qt5, the Qt 5 user interface for * Project Horizon * - * Copyright (c) 2019 Adélie Linux and contributors. All rights reserved. + * Copyright (c) 2019-2020 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. * @@ -39,6 +39,7 @@ IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { #else /* HAS_INSTALL_ENV */ QMenu *toolMenu; toolButton = new QPushButton(tr("Launch &Tool..."), this); + toolButton->setWhatsThis(tr("Displays a menu of utilities that you can launch from the Installation Environment.")); toolMenu = new QMenu("&Tools", toolButton); connect(toolMenu->addAction("&Terminal"), &QAction::triggered, [=](void) { QProcess p; diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc index 589ad5f..9997943 100644 --- a/ui/qt5/networkingpage.cc +++ b/ui/qt5/networkingpage.cc @@ -27,9 +27,12 @@ NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent) { simple = new QRadioButton(tr("&Automatic - my computer connects to the Internet directly\n" "or via a modem/router.")); + simple->setWhatsThis(tr("This option will configure your network automatically using DHCP.")); advanced = new QRadioButton(tr("&Manual - my computer connects to an enterprise network,\n" - "or I use a static IP address, VPN, or 802.1X security.")); + "or I use a static IP address.")); + advanced->setWhatsThis(tr("This option will prompt you for your network information.")); skip = new QRadioButton(tr("&Skip - I don't want to connect to a network or the Internet.")); + skip->setWhatsThis(tr("This option disables networking on this computer. You can configure your computer's networking after installation.")); } void NetworkingPage::initializePage() { @@ -48,7 +51,7 @@ void NetworkingPage::initializePage() { { descLabel = new QLabel(tr( "If your computer is directly connected to the Internet via Ethernet or Wi-Fi using a modem or router, choose Automatic.\n\n" - "If you need to set a static IP address, or you use a VPN or proxy server, choose Manual.\n\n" + "If you need to set a static IP address, or you use a proxy server, choose Manual.\n\n" "If you don't want to configure networking or you don't want to use this computer on the Internet, choose Skip.")); } descLabel->setWordWrap(true); diff --git a/ui/qt5/partitionchoicepage.cc b/ui/qt5/partitionchoicepage.cc index ed61768..71979f2 100644 --- a/ui/qt5/partitionchoicepage.cc +++ b/ui/qt5/partitionchoicepage.cc @@ -19,18 +19,19 @@ PartitionChoicePage::PartitionChoicePage(QWidget *parent) : HorizonWizardPage(parent) { loadWatermark("disk"); - setTitle(tr("Choose Partitioning Type")); + setTitle(tr("Select Partitioning Type")); descLabel = new QLabel(tr("Select the method you wish to use for partitioning %1:")); descLabel->setWordWrap(true); eraseButton = new QRadioButton(tr("&Erase and Use Whole Disk")); eraseButton->setHidden(true); + eraseButton->setWhatsThis(tr("This option will erase all data currently on the disk, and then configure the entire disk to be used for Adélie Linux.")); connect(eraseButton, &QRadioButton::clicked, [=] { horizonWizard()->auto_part = true; horizonWizard()->erase = true; }); - eraseLabel = new QLabel(tr("The entire disk will be erased and then automatically partitioned.
Warning: This will destroy all existing data on the disk.")); + eraseLabel = new QLabel(tr("The entire disk will be erased and then automatically partitioned.

Warning: This will destroy all existing data on the disk.")); eraseLabel->setHidden(true); eraseLabel->setIndent(25); eraseLabel->setTextFormat(Qt::RichText); @@ -38,6 +39,7 @@ PartitionChoicePage::PartitionChoicePage(QWidget *parent) fitInButton = new QRadioButton(tr("Use &Free Space")); fitInButton->setHidden(true); + fitInButton->setWhatsThis(tr("This option will install Adélie Linux in to the free space present on the selected disk. No existing data will be erased.")); connect(fitInButton, &QRadioButton::clicked, [=] { horizonWizard()->auto_part = true; horizonWizard()->erase = false; @@ -49,6 +51,7 @@ PartitionChoicePage::PartitionChoicePage(QWidget *parent) useExistingButton = new QRadioButton(tr("Use Existing &Partition")); useExistingButton->setHidden(true); + useExistingButton->setWhatsThis(tr("This option will allow you to choose a partition already present on the selected disk for installation. You may select to erase the partition, or install to a partition that is already formatted.")); connect(useExistingButton, &QRadioButton::clicked, [=] { horizonWizard()->auto_part = false; horizonWizard()->erase = false; @@ -60,6 +63,7 @@ PartitionChoicePage::PartitionChoicePage(QWidget *parent) manualButton = new QRadioButton(tr("&Manual")); manualButton->setHidden(true); + manualButton->setWhatsThis(tr("This option will open a partition editor for you to manipulate partitions in whatever way you wish. After you are finished in the partition editor, you will be able to select the mount points of the partitions.")); connect(manualButton, &QRadioButton::clicked, [=] { horizonWizard()->auto_part = false; horizonWizard()->erase = false; diff --git a/ui/qt5/partitiondiskpage.cc b/ui/qt5/partitiondiskpage.cc index af66f7d..eeb07eb 100644 --- a/ui/qt5/partitiondiskpage.cc +++ b/ui/qt5/partitiondiskpage.cc @@ -62,7 +62,7 @@ PartitionDiskPage::PartitionDiskPage(QWidget *parent) descLabel->setWordWrap(true); #ifdef HAS_INSTALL_ENV - descLabel->setText(tr("Choose the hard disk on which to install Adélie Linux.")); + descLabel->setText(tr("Select the hard disk on which to install Adélie Linux.")); diskChooser = new QListWidget; connect(diskChooser, &QListWidget::currentItemChanged, [=]{ diff --git a/ui/qt5/partitionmanualpage.cc b/ui/qt5/partitionmanualpage.cc index 467476d..e949118 100644 --- a/ui/qt5/partitionmanualpage.cc +++ b/ui/qt5/partitionmanualpage.cc @@ -35,6 +35,7 @@ PartitionManualPage::PartitionManualPage(QWidget *parent) "When you have finished partitioning the disk, quit the partitioning utility and choose Next.")); QPushButton *button = new QPushButton(tr("Launch Partitioner")); + button->setWhatsThis(tr("Opens the partition editor.")); connect(button, &QPushButton::clicked, [=]{ QProcess p; p.execute("partitionmanager"); @@ -46,7 +47,7 @@ PartitionManualPage::PartitionManualPage(QWidget *parent) setTitle(tr("Enter Partitioning Information")); descLabel->setText(tr("Enter the partitioning commands you wish to use for the target computer.\n\n" - "For a list of valid commands, choose Help or review the HorizonScript Reference.")); + "For a list of valid commands, review the HorizonScript Reference.")); partitionEdit = new QTextEdit; connect(partitionEdit, &QTextEdit::textChanged, [=]{ @@ -56,6 +57,7 @@ PartitionManualPage::PartitionManualPage(QWidget *parent) partitionEdit->setAcceptRichText(false); partitionEdit->setFontFamily("monospace"); partitionEdit->setReadOnly(false); + partitionEdit->setWhatsThis(tr("Input the HorizonScript commands to partition the disk.")); layout->addWidget(partitionEdit); #endif /* HAS_INSTALL_ENV */ diff --git a/ui/qt5/partitionmountpage.cc b/ui/qt5/partitionmountpage.cc new file mode 100644 index 0000000..687d603 --- /dev/null +++ b/ui/qt5/partitionmountpage.cc @@ -0,0 +1,19 @@ +/* + * partitionmountpage.cc - Implementation of UI.Partition.Install.Mount page + * horizon-qt5, the Qt 5 user interface for + * Project Horizon + * + * Copyright (c) 2020 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 "partitionmountpage.hh" + +PartitionMountPage::PartitionMountPage(QWidget *parent) + : HorizonWizardPage(parent) { + loadWatermark("disk"); + setTitle(tr("Set Mount Points")); +} diff --git a/ui/qt5/resources/intro-help.txt b/ui/qt5/resources/intro-help.txt index 6e6d05e..dc6e5a4 100644 --- a/ui/qt5/resources/intro-help.txt +++ b/ui/qt5/resources/intro-help.txt @@ -7,6 +7,9 @@ your computer.

Each step of the installation system has a help screen just like this one, accessible via the 'Help' button in the lower left corner of the screen.

+

You can view the pages of this help screen by using the scroll bar, or by +pressing the Page Up and Page Down keys.

+
diff --git a/ui/qt5/resources/network-start-help.txt b/ui/qt5/resources/network-start-help.txt index 872f606..f9b2140 100644 --- a/ui/qt5/resources/network-start-help.txt +++ b/ui/qt5/resources/network-start-help.txt @@ -1,11 +1,24 @@ -

Network Configuration

+

Networking Setup

-

This phase of Horizon allows you to configure your network or Internet connection.

+

This page allows you to configure your network or Internet connection.

Which option should I choose?

diff --git a/ui/qt5/resources/partition-disk-help.txt b/ui/qt5/resources/partition-disk-help.txt new file mode 100644 index 0000000..cc1b64d --- /dev/null +++ b/ui/qt5/resources/partition-disk-help.txt @@ -0,0 +1,7 @@ +

Select Installation Disk

+ +

This page allows you to select the hard disk drive on which to install +Adélie Linux.

+ +

The model name and size of each disk is shown, including the available +space on the disk.

diff --git a/ui/qt5/resources/partition-help.txt b/ui/qt5/resources/partition-help.txt index 0f0bf19..bce62e4 100644 --- a/ui/qt5/resources/partition-help.txt +++ b/ui/qt5/resources/partition-help.txt @@ -1,5 +1,6 @@ -

Partitioning the Hard Disk Drive

+

Disk Detection

-Please help the user partition the disk drive here. - -Do not ship this content. +

System Installation will detect the hard disk drives connected to your +computer, including size and partitions. This process may take a few moments +depending on the speed of your disks and how they are connected to your +computer.

diff --git a/ui/qt5/resources/partition-manipulation-help.txt b/ui/qt5/resources/partition-manipulation-help.txt new file mode 100644 index 0000000..768b37a --- /dev/null +++ b/ui/qt5/resources/partition-manipulation-help.txt @@ -0,0 +1,36 @@ +

Select Partitioning Type

+ +

This page allows you to select how you want to partition the disk you have +selected for installation. Depending on the disk's current configuration, you +may have any of the following options:

+ + diff --git a/ui/qt5/resources/partition-manual-help.txt b/ui/qt5/resources/partition-manual-help.txt new file mode 100644 index 0000000..e69de29 diff --git a/ui/qt5/resources/partition-mountpoints-help.txt b/ui/qt5/resources/partition-mountpoints-help.txt new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3-60-g2f50