File indexing completed on 2024-12-22 04:46:01

0001 /*
0002   SPDX-FileCopyrightText: 2023-2024 Laurent Montel <montel.org>
0003 
0004   SPDX-License-Identifier: LGPL-2.0-or-later
0005 
0006 */
0007 
0008 #include "needupdateversionmainwidget.h"
0009 #include "needupdateversion/needupdateversionutils.h"
0010 #include "needupdateversion/needupdateversionwidget.h"
0011 #include <QTextEdit>
0012 #include <QVBoxLayout>
0013 
0014 NeedUpdateVersionMainWidget::NeedUpdateVersionMainWidget(QWidget *parent)
0015     : QWidget{parent}
0016     , mNeedUpdateVersionWidget(new NeedUpdateVersionWidget(this))
0017 {
0018     auto mainLayout = new QVBoxLayout(this);
0019     mainLayout->setContentsMargins({});
0020     mainLayout->setSpacing(0);
0021 
0022     mainLayout->addWidget(mNeedUpdateVersionWidget);
0023 
0024     auto textEditor = new QTextEdit(this);
0025     mainLayout->addWidget(textEditor);
0026     checkVersion();
0027 }
0028 
0029 NeedUpdateVersionMainWidget::~NeedUpdateVersionMainWidget() = default;
0030 
0031 void NeedUpdateVersionMainWidget::checkVersion()
0032 {
0033     mNeedUpdateVersionWidget->setObsoleteVersion(NeedUpdateVersionUtils::obsoleteVersionStatus(QStringLiteral("22.04.1"), QDate::currentDate()));
0034 }
0035 #include "moc_needupdateversionmainwidget.cpp"