diff options
-rw-r--r-- | ui/qt5/networkingpage.cc | 25 | ||||
-rw-r--r-- | ui/qt5/networkingpage.hh | 16 |
2 files changed, 30 insertions, 11 deletions
diff --git a/ui/qt5/networkingpage.cc b/ui/qt5/networkingpage.cc index 140e9af..eb8d883 100644 --- a/ui/qt5/networkingpage.cc +++ b/ui/qt5/networkingpage.cc @@ -1,12 +1,22 @@ +/* + * networkingpage.cc - Implementation of the UI.Network.AddressType 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 "networkingpage.hh" #include "horizonwizard.hh" -#include <cstdint> #include <QLabel> #include <QVBoxLayout> -NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent) -{ +NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent) { QLabel *descLabel; QVBoxLayout *layout; @@ -35,7 +45,7 @@ NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent) radioGroup->addButton(skip); QObject::connect(radioGroup, static_cast<void (QButtonGroup:: *)(QAbstractButton *)>(&QButtonGroup::buttonClicked), - [=](QAbstractButton *button __attribute__((unused))) { + [=](QAbstractButton *) { emit completeChanged(); }); @@ -48,15 +58,12 @@ NetworkingPage::NetworkingPage(QWidget *parent) : HorizonWizardPage(parent) setLayout(layout); } -bool NetworkingPage::isComplete() const -{ +bool NetworkingPage::isComplete() const { return (radioGroup->checkedButton() != nullptr); } -int NetworkingPage::nextId() const -{ +int NetworkingPage::nextId() const { if(radioGroup->checkedButton() == simple) { - /* determine wifi */ if(false) { return HorizonWizard::Page_Network_Wireless; } else { diff --git a/ui/qt5/networkingpage.hh b/ui/qt5/networkingpage.hh index 3353fb6..5914af2 100644 --- a/ui/qt5/networkingpage.hh +++ b/ui/qt5/networkingpage.hh @@ -1,3 +1,15 @@ +/* + * networkingpage.hh - Definition of the UI.Network.AddressType 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 NETWORKINGPAGE_HH #define NETWORKINGPAGE_HH @@ -8,7 +20,7 @@ class NetworkingPage : public HorizonWizardPage { public: - NetworkingPage(QWidget *parent = 0); + NetworkingPage(QWidget *parent = nullptr); bool isComplete() const; int nextId() const; @@ -17,4 +29,4 @@ private: QRadioButton *simple, *advanced, *skip; }; -#endif // NETWORKINGPAGE_HH +#endif /* !NETWORKINGPAGE_HH */ |