swift
legalinfocomponent.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (C) 2018 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #ifndef SWIFT_GUI_COMPONENTS_LEGALINFOCOMPONENT_H
7 #define SWIFT_GUI_COMPONENTS_LEGALINFOCOMPONENT_H
8 
9 #include <QFrame>
10 #include <QScopedPointer>
11 #include <QWizardPage>
12 
15 
16 namespace Ui
17 {
18  class CLegalInfoComponent;
19 }
20 namespace swift::gui::components
21 {
26  {
27  Q_OBJECT
28 
29  public:
31  explicit CLegalInfoComponent(QWidget *parent = nullptr);
32 
34  virtual ~CLegalInfoComponent();
35 
37  bool isAgreedTo() const;
38 
40  bool validateAgreement();
41 
42  private:
44  void onAllowCrashDumps(bool checked);
45 
47  void setChecklistInfo();
48 
49  QScopedPointer<Ui::CLegalInfoComponent> ui;
51  };
52 
56  class CLegalInfoWizardPage : public QWizardPage
57  {
58  Q_OBJECT
59 
60  public:
62  using QWizardPage::QWizardPage;
63 
65  void setConfigComponent(CLegalInfoComponent *config) { m_legalInfo = config; }
66 
68  virtual bool validatePage() override;
69 
70  private:
71  CLegalInfoComponent *m_legalInfo = nullptr;
72  };
73 } // namespace swift::gui::components
74 
75 #endif // SWIFT_GUI_COMPONENTS_LEGALINFOCOMPONENT_H
Using this class provides a QFrame with the overlay functionality already integrated.
High level reusable GUI components.
Definition: aboutdialog.cpp:13