8 #include "ui_legalinfocomponent.h"
18 using namespace swift::misc::network;
20 using namespace swift::config;
24 CLegalInfoComponent::CLegalInfoComponent(QWidget *parent)
28 this->setChecklistInfo();
30 const bool crashDumpUploadEnabled = m_crashDumpUploadEnabled.
getThreadLocal();
31 ui->cb_CrashDumps->setChecked(crashDumpUploadEnabled);
32 ui->cb_Agree->setChecked(CBuildConfig::isLocalDeveloperDebugBuild());
34 connect(ui->cb_CrashDumps, &QCheckBox::toggled,
this, &CLegalInfoComponent::onAllowCrashDumps);
50 void CLegalInfoComponent::onAllowCrashDumps(
bool checked)
52 CLogMessage::preformatted(m_crashDumpUploadEnabled.
setAndSave(checked));
55 void CLegalInfoComponent::setChecklistInfo()
57 if (!
sGui) {
return; }
60 ui->lbl_Tip->setText(QStringLiteral(
"Please read the <a href=\"%1\">checklist before your 1st flight</a>")
62 ui->lbl_Tip->setTextFormat(Qt::RichText);
63 ui->lbl_Tip->setTextInteractionFlags(Qt::TextBrowserInteraction);
64 ui->lbl_Tip->setOpenExternalLinks(
true);
data::CGlobalSetup getGlobalSetup() const
Global setup.
Global settings for readers, debug flags, etc.
swift::misc::network::CUrl getHelpPageUrl(const QString &context={}) const
Help page URL.
bool showOverlayMessage(const swift::misc::CStatusMessage &message, std::chrono::milliseconds timeout=std::chrono::milliseconds(0))
Show single message.
Using this class provides a QFrame with the overlay functionality already integrated.
bool validateAgreement()
Validate that the agreement is accepted.
bool isAgreedTo() const
Agreed with?
virtual ~CLegalInfoComponent()
Destructor.
virtual bool validatePage()
CStatusMessage setAndSave(const T &value, qint64 timestamp=0)
Write and save in the same step. Must be called from the thread in which the owner lives.
const T & getThreadLocal() const
Read the current value.
Derived & validationError(const char16_t(&format)[N])
Set the severity to error, providing a format string, and adding the validation category.
Streamable status message, e.g.
Value object encapsulating information of a location, kind of simplified CValueObject compliant versi...
QString getFullUrl(bool withQuery=true) const
Qualified name.
SWIFT_GUI_EXPORT swift::gui::CGuiApplication * sGui
Single instance of GUI application object.
Core data traits (aka cached values) and classes.
High level reusable GUI components.
Free functions in swift::misc.