From 10b44ce36c2c0660f2fadd7b9f73690e7b6799dd Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 8 Nov 2019 20:42:18 -0600 Subject: Qt UI: Formatting and file heading fixes --- ui/qt5/horizonhelpwindow.cc | 12 ++++++++++++ ui/qt5/horizonhelpwindow.hh | 14 +++++++++++++- ui/qt5/horizonwizard.cc | 21 +++++++++++++++------ ui/qt5/horizonwizard.hh | 12 ++++++++++++ ui/qt5/horizonwizardpage.cc | 12 ++++++++++++ ui/qt5/horizonwizardpage.hh | 14 +++++++++++++- ui/qt5/intropage.cc | 31 +++++++++++++++++-------------- ui/qt5/intropage.hh | 24 +++++++++++++++++++----- ui/qt5/main.cc | 12 ++++++++++++ 9 files changed, 125 insertions(+), 27 deletions(-) (limited to 'ui/qt5') diff --git a/ui/qt5/horizonhelpwindow.cc b/ui/qt5/horizonhelpwindow.cc index e38fefa..259f11f 100644 --- a/ui/qt5/horizonhelpwindow.cc +++ b/ui/qt5/horizonhelpwindow.cc @@ -1,3 +1,15 @@ +/* + * horizonhelpwindow.cc - Implementation of the Help window + * 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 "horizonhelpwindow.hh" #include diff --git a/ui/qt5/horizonhelpwindow.hh b/ui/qt5/horizonhelpwindow.hh index 7604861..b3ef3f1 100644 --- a/ui/qt5/horizonhelpwindow.hh +++ b/ui/qt5/horizonhelpwindow.hh @@ -1,3 +1,15 @@ +/* + * horizonhelpwindow.hh - Definition of the Help window + * 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 + */ + #ifndef HORIZONHELPWINDOW_HH #define HORIZONHELPWINDOW_HH @@ -12,4 +24,4 @@ private: QFile *helpFile; }; -#endif // HORIZONHELPWINDOW_HH +#endif /* !HORIZONHELPWINDOW_HH */ diff --git a/ui/qt5/horizonwizard.cc b/ui/qt5/horizonwizard.cc index db2722a..5a6527d 100644 --- a/ui/qt5/horizonwizard.cc +++ b/ui/qt5/horizonwizard.cc @@ -1,3 +1,15 @@ +/* + * horizonwizard.cc - Implementation of the main Wizard class + * 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 "horizonwizard.hh" #include "horizonhelpwindow.hh" @@ -11,10 +23,7 @@ #include "networkingpage.hh" #include "netsimplewifipage.hh" -using std::map; -using std::string; - -static map help_id_map = { +static std::map help_id_map = { {HorizonWizard::Page_Intro, "intro"}, {HorizonWizard::Page_Input, "input"}, {HorizonWizard::Page_Partition, "partition"}, @@ -70,8 +79,8 @@ HorizonWizard::HorizonWizard(QWidget *parent) : QWizard(parent) { nohelp.exec(); return; } - string helppath = ":/wizard_help/resources/" + - help_id_map.at(currentId()) + "-help.txt"; + std::string helppath = ":/wizard_help/resources/" + + help_id_map.at(currentId()) + "-help.txt"; QFile helpfile(helppath.c_str()); helpfile.open(QFile::ReadOnly); HorizonHelpWindow help(&helpfile, this); diff --git a/ui/qt5/horizonwizard.hh b/ui/qt5/horizonwizard.hh index adf3791..b027591 100644 --- a/ui/qt5/horizonwizard.hh +++ b/ui/qt5/horizonwizard.hh @@ -1,3 +1,15 @@ +/* + * horizonwizard.hh - Definition of the main Wizard class + * 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 + */ + #ifndef HORIZONWIZARD_HH #define HORIZONWIZARD_HH diff --git a/ui/qt5/horizonwizardpage.cc b/ui/qt5/horizonwizardpage.cc index fd02270..f707876 100644 --- a/ui/qt5/horizonwizardpage.cc +++ b/ui/qt5/horizonwizardpage.cc @@ -1,3 +1,15 @@ +/* + * horizonwizardpage.cc - Implementation of our custom QWizardPage subclass + * 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 "horizonwizardpage.hh" using std::string; diff --git a/ui/qt5/horizonwizardpage.hh b/ui/qt5/horizonwizardpage.hh index c9807c3..4ddb160 100644 --- a/ui/qt5/horizonwizardpage.hh +++ b/ui/qt5/horizonwizardpage.hh @@ -1,3 +1,15 @@ +/* + * horizonwizardpage.hh - Definition of our custom QWizardPage subclass + * 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 + */ + #ifndef HORIZONWIZARDPAGE_HH #define HORIZONWIZARDPAGE_HH @@ -14,4 +26,4 @@ public: HorizonWizard *horizonWizard() const; }; -#endif // HORIZONWIZARDPAGE_HH +#endif /* !HORIZONWIZARDPAGE_HH */ diff --git a/ui/qt5/intropage.cc b/ui/qt5/intropage.cc index 29bec11..2a9cb83 100644 --- a/ui/qt5/intropage.cc +++ b/ui/qt5/intropage.cc @@ -1,3 +1,15 @@ +/* + * 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 @@ -17,23 +29,14 @@ IntroPage::IntroPage(QWidget *parent) : HorizonWizardPage(parent) { #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." + "Horizon will guide you through creation of a basic installfile for installing Adélie Linux on another computer." "

" - "IMPORTANT: Not all advanced settings will " - "be available to you. You may be allowed to " - "specify an invalid or non-bootable disk layout or " - "network configuration. For best results, always " - "run System Installation directly on the computer " - "you wish to run Adélie Linux." + "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 " + "For more information about the installfile format and syntax, see the " "" - "Adélie Linux Installation Guide on the " - "Internet.")); + "Adélie Linux Installation Guide on the Internet.")); descLabel->setOpenExternalLinks(true); descLabel->setTextFormat(Qt::RichText); #else /* HAS_INSTALL_ENV */ diff --git a/ui/qt5/intropage.hh b/ui/qt5/intropage.hh index 5c50d6d..1214854 100644 --- a/ui/qt5/intropage.hh +++ b/ui/qt5/intropage.hh @@ -1,19 +1,33 @@ -#ifndef WELCOMEPAGE_HH -#define WELCOMEPAGE_HH +/* + * intropage.hh - Definition 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 + */ + +#ifndef INTROPAGE_HH +#define INTROPAGE_HH #ifdef HAS_INSTALL_ENV #include -#endif +#endif /* HAS_INSTALL_ENV */ + #include "horizonwizardpage.hh" class IntroPage : public HorizonWizardPage { public: IntroPage(QWidget *parent = nullptr); int nextId() const; + #ifdef HAS_INSTALL_ENV private: QPushButton *toolButton; -#endif +#endif /* HAS_INSTALL_ENV */ }; -#endif // WELCOMEPAGE_HH +#endif /* !INTROPAGE_HH */ diff --git a/ui/qt5/main.cc b/ui/qt5/main.cc index 2fddc23..3e67753 100644 --- a/ui/qt5/main.cc +++ b/ui/qt5/main.cc @@ -1,3 +1,15 @@ +/* + * main.cc - Implementation of the main routine + * 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 #include #include -- cgit v1.2.3-60-g2f50